Sometimes it’s needed to get hardware information on your Linux desktop or server using the command line only. Of course, you can do everything via CLI in Linux. Here just some reminders for myself how to do it.

Most of the information you can get using the following three commands:

  • lspci - list all PCI devices
  • lshw - list hardware
  • dmidecode - DMI table decoder

Using multiple keys to these CLI tools you can get everything you need.

It's not a full guide. It's just a list of commands to quickly identify what hardware do you have. I recommend executing all commands with root privileges to get more information.

1. What CPU do I have?

1.1. I think, almost everybody knows the command to get CPU information about your CPU. Here is just a friendly reminder:

# cat /proc/cpuinfo

2. How to get your GPU information?

2.1. A very short information:

# lspci | grep -i --color 'vga\|3d\|2d'

01:00.0 VGA compatible controller: ***

2.2.Need more details about your GPU?

# lspci -v -s 01:00.0

2.3. In the case of Nvidia GPUs you can collect some use `nvidia-smi` tool to get some information:


$ nvidia-smi

3. Motherboard

3.1. If you need just a model name:

#dmidecode -s baseboard-product-name

3.2. If you’re too lazy to google your motherboards specs, you can do it via the command below:

# dmidecode -t baseboard

4. RAM

Everybody knows `free` utility. It’s one of the easiest ways to see how many free or used memory you have. To determinate what actually RAM do you have you can use ‘dmidecode` or `lshw` utilites.

4.1. dmidecode:

# dmidecode --type 17

4.2. lshw:

# lshw -short -C memory

5. How to get your HDD or SSD hardware info?

For Linux, it doesn’t matter you’ve got SSD or HDD. To get their hardware information such a serial or model number, configuration and capabilities you can use the same software.

5.1. hdparm - get/set SATA/IDE device parameters

# hdparm -I /dev/sda

5.2. If you need to know more about your storage controllers and storage devices, just type the following command:

# lshw -class disk -class storage

6. Network Controllers Info (NIC)

Last but not least, there are two commands to get the information about your NICs.

6.1. lspci:

# lspci | egrep -i --color 'network|ethernet'

6.2.  lshw:

# lshw -class network



cong ty tran thach cao United States

Wednesday, October 10, 2018 10:40 AM

cong ty tran thach cao

Hi there, all is going fine here and ofcourse every one is sharing information, that's in fact fine, keep up writing.

catalogue dep United States

Wednesday, October 10, 2018 10:44 AM

catalogue dep

Hey There. I found your blog using msn. This is an extremely well written article. I'll be sure to bookmark it and return to read more of your useful info. Thanks for the post. I will certainly return.

dich vu giay phep lao dong United States

Wednesday, October 10, 2018 10:44 AM

dich vu giay phep lao dong

I think this is among the most important info for me. And i am glad reading your article. But want to remark on few general things, The website style is wonderful, the articles is really great : D. Good job, cheers

thi cong san go United States

Wednesday, October 10, 2018 10:44 AM

thi cong san go

First of all I would like to say wonderful blog! I had a quick question in which I'd like to ask if you do not mind. I was curious to find out how you center yourself and clear your thoughts prior to writing. I've had difficulty clearing my mind in getting my ideas out there. I do take pleasure in writing but it just seems like the first 10 to 15 minutes are generally lost just trying to figure out how to begin. Any suggestions or hints? Appreciate it!

ve may bay United States

Wednesday, October 10, 2018 10:47 AM

ve may bay

Hey there just wanted to give you a brief heads up and let you know a few of the pictures aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different internet browsers and both show the same outcome.

dinh cu eb5 United States

Friday, October 12, 2018 4:38 AM

dinh cu eb5

Ahaa, its nice discussion on the topic of this piece of writing here at this weblog, I have read all that, so at this time me also commenting here.

visa du lich han quoc co thoi han bao lau United States

Friday, October 12, 2018 11:27 AM

visa du lich han quoc co thoi han bao lau

What's up everyone, it's my first pay a visit at this web site, and piece of writing is truly fruitful in favor of me, keep up posting such articles.

lap dieu hoa United States

Wednesday, October 17, 2018 2:47 PM

lap dieu hoa

Oh my goodness! Awesome article dude! Many thanks, However I am experiencing difficulties with your RSS. I don't know why I can't join it. Is there anybody else getting the same RSS issues? Anybody who knows the answer can you kindly respond? Thanks!!

Add comment

(Will show your Gravatar icon)

  Country flag

[b] [i] [u] [quote]