- How to Display Linux Hardware Info via Command Line
- 1. lshw
- 2. Inxi
- 3. hwinfo
- 4. lscpu
- 5. lsscsi
- 6. lsblk
- 7. lsusb
- 8. lspci
- 9. Using dmesg
- 10. Using dmidecode command
- 11. hdparm
- 12. From /proc file
- 13. free
- Conclusion
- 5 GUI Tools to See Hardware Information in Ubuntu/Linux
- 1. I-Nex
- 2. Hardinfo
- 3. Sysinfo
- 4. lshw-gtk (Hardware Lister)
- 5. KInfoCenter (KDE Info Center)
- Author: Jaber Al Nahian
- Linux Command To Find the System Configuration And Hardware Information
- Linux cpu/hardware information
- Linux show free and used memory in the system
- Find ram speed and max supported ram by the server
- Linux find out the current running kernel version
- Find out information about the Linux distribution and version
- List all PCI devices
- List all USB devices
- List all block devices (hard disks, cdrom, and others)
- Display installed hard disk and size
- Display information about hardware RAID
- Say hello to lshw
- Dump all hardware information
How to Display Linux Hardware Info via Command Line
When a user works on a Linux system, in some cases, the user needs to know the information about the hardware under the operating system. This helps us to install compatible applications and utilities which adapt to hardware components of the system.
This tutorial will go through many utilities with detailed explanations of how to get the Linux hardware information.
1. lshw
The lshw stands for List Hardware. It collects the detailed information of the hardware on your system. lshw can show you the name of mainboard, CPU information, bus speed and firmware version and more.
In order to display the information of all the hardware components, run:
If you want to shorten the result, run the command with -short option:
You will receive the brief list of hardware components on your Linux system:
Display disk properties and storage device properties on Linux system by running:
You can get the brief result you may use the option -short :
This tool is also available in a GTK graphical version:
2. Inxi
Inxi is a powerful feature-rich command line tool for Linux users when they want to get the information of system hardware, CPU, RAM, Graphics card, drivers, battery, kernel, process information, and more.
By default, Inxi is not pre-installed on Linux. In order to use it, install the inxi package by running the following command:
Running inxi without any option:
The command will return the information of CPU and Memory as follows:
In order to get the graphics info, run the following command:
To show audio/sound card information, run:
To show battery data, charge, condition, plus extra information (if battery present), run the command with -B option:
3. hwinfo
The hwinfo command is a powerful tool for Linux users to get the detail of hardware components of system. It helps you collect almost of information about: CPU, USB controller, graphics controller, network devices and more.
You can use hwinfo command with —short and —devicetype options to list a specific type of information.
Display information about NIC cards and find out what eth0, eth1 stands for by running:
In order to display storage information with hwinfo command, run:
Likewise, to display list of partitions and hard disks, run the following command:
4. lscpu
The lscpu will show you all the information of your CPU such as number of CPUs, cores, threads, sockets and CPU family, caches, model and more.
You can get the detail of the CPU by running the following command:
The output of the command will be something likes this:
Moreover, if you want to view the speed of the CPU in MHz, run the command:
5. lsscsi
The lsscsi is used to list all of the SCSI (Small Computer System Interface) devices and NVMe (Non-Volatile Memory express) devices on your machine.
By default, the lsscsi is not pre-installed on Ubuntu, run the following command to install:
You can simply use the command by running:
6. lsblk
The lsblk command will show you the details of all the block devices in a tree format. It gathers information from sysfs filesystem and udev database.
In order to list all of block devices and their partitions and sizes, let’s run the following command:
7. lsusb
The lsusb is a powerful tool for displaying all the information about USB devices connected to USB buses of your Linux system. The information contains: speed, class, vendor id, product id, bus of USB devices etc.
You can run the following command to get brief information:
If you want to display the specified device with Bus and Device number, run the command with ‘-s’ option. For example:
8. lspci
This standard Linux utility shows what your systems have got internally. The command is a combination of ls, the standard command to list files and PCI that is for the peripheral connection. You can also expect your results to include AGP and onboard components like your USB chipset.
The command is much helpful in diagnosing bugs related to PCI devices. Using ‘-t’ option of lspci command you can see PCI layout in a tree format.
In order to get more detailed information, use -v option with -t option:
You can just run lspci command to display basic device information:
9. Using dmesg
The dmesg command is useful to find out some info about hardware events. It displays the contents of the system log.
The following command lists all references to universal serial bus devices:
In order to display the details about physical memory that is RAM, run:
10. Using dmidecode command
Dmidecode stands for Desktop Management Interface decode, it is a powerful tool for retrieving the information of CPU, RAM, serial numbers, BIOS. The command will show you the hardware details in a human-readable format.
In order to get the Information about BIOS, run:
If you want to display the hardware components information by ID, run the command with -t option following by a number ID (DMI).
For example, the following command will show you the information of memory Device:
11. hdparm
The hdparm stands for Hard Disk Parameter. It’s a Linux command line utility used for handling hard disk devices. You can also use hdparm command to set parameters such as power management, sleep mode, drive caches, Direct Memory Access settings, etc.
For instance, in order to display information of the hard disk, run the following command:
Another example, you can use hdparm to test the speed of hard disk by running the following command:
12. From /proc file
The /proc directory contains lots of system and hardware information. You can try the following commands to get more info on devices:
The output of the command will be something likes this:
In addition, you can run some other commands in order to get information about CPU, Memory, and PCI devices respectively.
13. free
Sometimes, you want to know whether the free memory (RAM) is enough to launch or install a new program? In this case, you can use free command to get information about memory detail in your Linux system.
The free command not only shows you information about the total amount of physical RAM and swap but also free and used memory. For example:
Conclusion
In this tutorial, we learned how to use Linux command line to get information about the hardware components of the system.
Thanks for reading and please leave your suggestion in the below comment section.
Источник
5 GUI Tools to See Hardware Information in Ubuntu/Linux
Here are 5 best graphical tools to check your Linux hardware information without using harsh commands.
Checking hardware (CPU, motherboard, process, etc.) information is one of the most common and important tasks we do in our computers. Viewing details of physical components of a computer lets us get idea about a computer’s configuration. It let’s us assume which physical system we are working with, as well as having idea how good a machine would perform and which operating systems and drivers are applicable for it. In one word, hardware info is an obvious part of the details a user should know about his/her system.
In Windows OS, the most general way to see hardware configuration is to right-click on My Computer icon and then clicking Properties from context menu. This provides a minimal information. For more detailed view, Windows Device Manger and System Information utilities can be used. As third party tools, Speccy and CPU-Z seem to be very popular, though the number of system/hardware information tool for Windows is endless.
As of Linux OS, most of the tools you get to see system information are command-line based. This means, once you install those tools, you need to type-in commands in Terminal to get output about installed hardware units. This is really a boring procedure and not convenient to anyone.
I have searched for programs that present hardware specifications in Linux system without requiring any command to input, and found a plenty of utilities. I have selected 5 best ones to show here that works out of the box. You may search for the following tools in your software store (if you have one in your Linux) for jump installation.
1. I-Nex
Probably the best CPU-Z alternative for Linux. I-Nex resembles CPU-Z’s UI. And you would probably like it.
I-Nex shows detailed information on your CPU, Graphics(GPU), Motherboard, Audio hardware and many more in very beautiful way. Major hardware units have their one tab. Every tab contains the device name/model, manufacturer, driver info, and other available data. The presentation provided here is very clear and easy to understand. It even lets you generate customizable report on the whole system. It lets you take screenshot too.
Along with hardware, in also shows useful details on your operating system, such as, Linux distro name, version, GCC version, X.Org version, etc. There’s also a tab for Kernel information.
To install I-Nex on Ubuntu/Mint or any derivatives, type the following commands one after another at each prompt in Terminal.
For Arch Linux, Fedora, openSUSE, Manjaro and other derivatives, here’s the official guide to install.
2. Hardinfo
HardInfo is a hardware analysis, system benchmark and report generator tool that can be found pre-installed in Linux Mint. It lists all hardware units vertically on left side of the program. You need to click on the name of a device to reveal details of that component. The Summary entry shows overview of your whole system in a short form.
Besides generating report in HTML, you can compare your system with other systems with its benchmarking tools from bottom.
To install Hardinfo, run the following commands into Terminal in Debian/Ubuntu/Mint and its derivatives.
On Fedora, use the following command:
3. Sysinfo
A lightweight program that shows your hardware information in simple way. Unlike above programs, it doesn’t show much information.
Use the following command to install in Ubuntu/Mint:
4. lshw-gtk (Hardware Lister)
This the graphical version the popular command-line hardware info tool lshw. Use Refresh from toolbar if you see blank window. Though it looks so simple, the information it provides are really extensive and informative. It also features export function with XML, HTML and plain text support. Use Save button to export your report.
Installation command for Ubuntu/Mint:
Then type lshw-gtk in Terminal to launch it.
For Fedora, use the following command:
Use lshw-gui command in Terminal to launch it.
5. KInfoCenter (KDE Info Center)
KInfoCenter is a part of KDE desktop environment. But it can be installed on other desktops too. This utility provides various information that are unique to your hardware. You get information on PCI, Network Interfaces, X Server, USB Devices, IO Ports, etc. along with main hardware units. If you have a Linux with KDE desktop, you may already have this installed.
Install KInfoCenter in Ubuntu/Mint using following command:
To install in Fedora, use following command:
On both OS, type kinfocenter in Terminal to launch it.
I personally like I-Nex. It’s sleek design and faster startup beats anything. Let us know which hardware info utility you are using.
Author: Jaber Al Nahian
Jaber is a Programmer and Tech Enthusiast Geek from Dhaka, Bangladesh. He is the founder and Chief-Editor of TechGainer. While he is away from his keyboard, either he’s fishing or messing with wildlife. In case, you can contact him at rijans[at]techgainer[dot]com.
Источник
Linux Command To Find the System Configuration And Hardware Information
W hat is the command to find the system configuration on Linux operating system using command line (text) mode?
On Linux based system most of the hardware information can be extracted from /proc file system, for example display CPU and Memory information, enter:
Tutorial details | |
---|---|
Difficulty level | Intermediate |
Root privileges | Yes |
Requirements | None |
Est. reading time | 10 minutes |
cat /proc/meminfo
cat /proc/cpuinfo
The following list summarizes commands to get various hardware from the system:
Linux cpu/hardware information
Use any one of the following command:
# less /proc/cpuinfo
OR
# lscpu
Sample outputs:
Linux show free and used memory in the system
Use any one of the following command:
# cat /proc/meminfo
OR
# free
# free -m
# free -mt
# free -gt
Sample outputs:
You can also run top/htop/atop commands to see used and free memory and cpu usage and more:
# top
# htop
# atop
Find ram speed and max supported ram by the server
# dmidecode —type 17
# lshw -short -C memory
# perl memconf.v3.06.pl -v
Sample outputs:
Linux find out the current running kernel version
Type the following command:
# cat /proc/version
Sample outputs:
OR use the following command:
# uname -mrs
# uname -a
Find out information about the Linux distribution and version
# lsb_release -a
Sample outputs:
OR use the following command:
$ cat /etc/*release*
Sample outputs:
List all PCI devices
# lspci
Sample outputs:
List all USB devices
# lsusb
Sample outputs:
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
List all block devices (hard disks, cdrom, and others)
# lsblk
Sample outputs:
Display installed hard disk and size
# fdisk -l | grep ‘^Disk /dev/’
Sample outputs:
Display information about hardware RAID
See info about Adaptec hardware RAID:
# arcconf getconfig DEV
# /usr/StorMan/arcconf getconfig 1
See info about 3ware hardware RAID:
# tw_cli /dev show
# tw_cli /c0 show
Say hello to lshw
The lshw is a small command line tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work):
# lshw | more
# lshw -html > output.htmlq
# lshw -short | less
Sample outputs:
Dump all hardware information
Type the following command to see your motherboard, cpu, vendor, serial-numbers, RAM, disks, and other information directly from the system BIOS:
# dmidecode | less
Sample outputs:
Источник