Computer hardware is the term for the physical components that make up a computer system. These include the case, CPU, RAM, monitor, mouse, keyboard, storage devices, graphics card, sound card and motherboard. Computer hardware can be internal or external, and can be connected by cables or wireless networks. Computer hardware works together with software to perform different tasks on a computer.
To view the hardware in your Linux server, you can use either of the methods outlined in the following two sections.
Using the lshw Command
lshw is a command that lists hardware information on Linux systems. It can show details such as memory configuration, firmware version, CPU speed, bus speed, and more. To use it, just enter the following command.
Using DMI (Desktop Management Interface)
DMI (Desktop Management Interface) is a standard for managing and tracking components in a desktop, laptop or server computer. The dmidecode command is used to retrieve hardware information from the DMI tables on a Linux system. The most common dmidecode types are:
- Type 0: BIOS Information
- Type 1: System Information
- Type 2: Baseboard Information
- Type 3: Chassis Information
- Type 4: Processor Information
- Type 5: Memory Controller Information
- Type 6: Memory Module Information
- Type 7: Cache Information
- Type 8: Port Connector Information
- Type 9: System Slots
- Type 10: On Board Devices Information
- Type 11: OEM Strings
- Type 12: System Configuration Options
- Type 13: BIOS Language Information
- Type 15: System Event Log
- Type 17: Memory
For example, let’s take Type 2 for baseboard information. The command will be:
dmidecode -t 2
*Note: The example below is from a virtual machine so the output will be more detailed on your dedicated server.