Display gpu name, hard drive size etc

About programming and getting involved with Linux Mint development
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
Zgrywus
Level 1
Level 1
Posts: 16
Joined: Mon Jul 19, 2021 3:15 pm

Display gpu name, hard drive size etc

Post by Zgrywus »

Hello, I need some help.
I want to display GPU name. I tried with inxi -gx and grep but its showing gpu name with kernel, driver etc. I need only gpu name.
Secondly, I want to display mounted hard drives size (sata, nvme) but only real size in GB, I mean 128, 256. Any help?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
ajgringo619

Re: Display gpu name, hard drive size etc

Post by ajgringo619 »

lsblk -o NAME,SIZE will give you the disk/partition sizes.
inxi -G works for the GPU.
Zgrywus
Level 1
Level 1
Posts: 16
Joined: Mon Jul 19, 2021 3:15 pm

Re: Display gpu name, hard drive size etc

Post by Zgrywus »

Yes, I know this commands but need command which will show exactly ONLY gpu name (NVIDIA RTX 3080 etc) and drives in GB, like 256, 512 etc
ajgringo619

Re: Display gpu name, hard drive size etc

Post by ajgringo619 »

Well, this command is closer (I think):

Code: Select all

$ nvidia-smi -L
GPU 0: GeForce GTX 1070 (UUID: GPU-1f3d5e07-70af-abf8-84d3-4a0b2c6cbe6f)
ajgringo619

Re: Display gpu name, hard drive size etc

Post by ajgringo619 »

I should have done some more investigating. The following works with any Nvidia card:

Code: Select all

$ nvidia-smi --query-gpu=name --format=csv,noheader
GeForce GTX 1070
Similarly, you can get the driver version this way as well:

Code: Select all

$ nvidia-smi --query-gpu=driver_version --format=csv,noheader
460.91.03
If you'd like, you can run these commands together, like this:

Code: Select all

$ nvidia-smi --query-gpu=name,driver_version --format=csv,noheader
GeForce GTX 1070, 460.91.03
User avatar
BJZilberman
Level 2
Level 2
Posts: 55
Joined: Mon Jul 26, 2021 7:37 am
Location: Holon, Israel
Contact:

Re: Display gpu name, hard drive size etc

Post by BJZilberman »

Zgrywus wrote: Thu Jul 22, 2021 12:52 pm Secondly, I want to display mounted hard drives size (sata, nvme) but only real size in GB, I mean 128, 256. Any help?
You can view the drives using parted (there are many other options aswell, not mint-specific).

Code: Select all

sudo parted -l
If your questions were answered, please add [SOLVED] to your topic title 😉
User avatar
AndyMH
Level 21
Level 21
Posts: 13736
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Display gpu name, hard drive size etc

Post by AndyMH »

Code: Select all

andy@T432 ~ $ inxi -G | grep Graphics\ driver | cut -f3 -d:
 i915 v
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Programming & Development”