p/s: copy from https://ourcodeworld.com/articles/read/768/how-to-check-system-specifications-in-ubuntu-server-16-04-with-the-cli
$sudo apt-get install hardinfo
or
1. Install lshw (HardWare LiSter for Linux)
lshw is a small tool to provide 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 EFI (IA-64) systems and on some ARM and PowerPC machines (PowerMac G4 is known to work). The information can be output in plain text, XML or HTML. It currently supports DMI (x86 and EFI only), OpenFirmware device tree (PowerPC only), PCI/AGP, ISA PnP (x86), CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), USB and SCSI.To install this package on your ubuntu system, run the following command:
After the installation you will be able to list all the specifications of your server eitherin HTML format or plain text. For more information about this project, visit the official repository here.
2. Generate inline short specs list
The prefered way for almost every user of this tool, is a short list with the description and values of the components of our interest, namely the processor, RAM, storage capacity and network information. lshw allows you to see such description with the following command:That will generate an output similar to:
3. Generate general specs list as HTML
If for you isn't enough a short description on the CLI, lshw is able to generate an HTML based report with the a detailed description of all the components of your ubuntu based server, just set the output format to html and pipe its content into a HTML file:The content of the
server_specs.html
file will then look something like:This option is pretty useful when you have to provide a detailed description for someone that doesn't have access to the server. You can simply print the file or send it to someone else.
4. Generate specific component description
If you want detailed description about a specific component of your system, simply filter the output specifyng the component that you want with the-c
argument:For example:
Network
To display information about the network interface use:This will generate an output similar to:
Storage (partitions)
To display information about the storage capacity and partitions in your system use:This will generate an output similar to:
Processor
To display information about the processor use:This will generate an output similar to:
Sound
To display information about the sound card use:This will generate an output similar to:
Memory
To display information about the RAM memory use:This will generate an output similar to:
As mentioned at the beginning of the article, lshw is a pretty nice utility with a lot of options, so you will be able to learn more about it in the man page for this tool as well.
No comments:
Post a Comment