Ubuntu System Information: Viewing Hardware Configuration with lscpu/lspci

In the Ubuntu system, understanding hardware configuration is fundamental for operations, and you can quickly obtain information using the `lscpu` and `lspci` commands. `lscpu` focuses on CPU and memory: executing it directly reveals details such as CPU architecture, number of logical/physical cores, model, cache, and total memory capacity. For example, "Model name" shows the CPU model, "CPU(s)" indicates the number of threads, and "Memory" displays the memory size. `lspci` is used to list PCI devices (such as graphics cards and network cards). Commonly used parameters include `-v` (detailed information), `-t` (tree structure), and `-nn` (hardware ID). The output includes device type, manufacturer, and model. For instance, "01:00.0 VGA compatible controller: NVIDIA Corporation..." can identify the graphics card. Practical tips: Redirect output to a file to save configurations, use `lspci -vnn | grep -i vga` to filter graphics card information, and `lspci -t` to display the device connection structure. These two commands help quickly troubleshoot hardware issues or confirm compatibility.

Read More