Some Common Linux Commands

Here are some common Linux commands that can be used to obtain hardware information:

  1. lshw: Provides detailed information about all hardware components in the system. Use sudo lshw to get detailed output.
  2. lsblk: Lists information about block devices (e.g., hard drives, SSDs, partitions). Use lsblk -f to display filesystem-related information.
  3. lspci: Displays information about PCI buses and the devices connected to them.
  4. lsusb: Lists USB buses and connected USB devices.
  5. dmidecode: Retrieves information from the system’s DMI (Desktop Management Interface) table, which includes details about the hardware components, BIOS, and more. Use sudo dmidecode for full output.
  6. hwinfo: Provides detailed information about various hardware components. You may need to install the hwinfo package first.
  7. cat /proc/cpuinfo: Shows information about the CPU(s) installed, including their model, architecture, and speed.
  8. free: Displays information about the system’s memory usage and availability.
  9. df: Lists information about disk space usage for mounted filesystems.
  10. lsdev: Lists information about installed devices on the system.
  11. inxi: A versatile command that provides extensive system information, including hardware details. You may need to install the inxi package first.
  12. lscpu: Shows detailed information about the CPU(s) installed, including architecture, number of cores, cache sizes, and more.
  13. lsmod: Displays the status of loaded kernel modules.
  14. udevadm: Allows querying the udev database for device information. For example, udevadm info -a /dev/sda provides information about a specific device (e.g., /dev/sda).

These commands should help you gather various hardware-related information in a Linux environment. Remember to use sudo where necessary to ensure access to privileged information.