In this tutorial, we will become familiar with the commands that are used to retrieve information about the software and hardware of a system, as well as information about the system parameters themselves. We will be able to handle this process with the assistance of the uname command line tool.
One of the key administrative procedures is finding out information about the hardware and software of your Linux system. In this post, we’ll examine the commands used with the uname command line tool to discover system settings. We will also use the lshw function to obtain more comprehensive hardware information.
The commands should function on any terminal of a distribution that utilizes the Linux kernel since they are intrinsic to Linux. Please take note that the Linux terminal is required for all of the instructions mentioned below.
Finding information about software and hardware
First, let’s find out the details of the software used, such as the Linux kernel, distribution, and others. The command used to find system information is uname . The syntax looks like this:
We will break down all the parameters of the uname command with sample output from our test VPS based on CentOS 7. The uname –help command in the terminal provides all the details of how this command can be used:
The operating system, hostname, and kernel are Linux
The -o or –operating-system option displays the operating system in use:
The -n or –nodename option displays the hostname:
To find the Linux kernel release, use the -r or –kernel-release option :
The -v or –kernel-version option displays the kernel version:
If you need all of the above information in one command, use the -a or –all option as follows:
Finally, to find out the version of the uname utility, use the –version command :
The List Hardware (lshw) command is another popular command used by system administrators to get very detailed information about a machine’s hardware. This is done by reading various files in the /proc directory on the Linux machine.
The lshw utility needs root access to get information. It can report RAM configuration, firmware version, motherboard configuration, processor information, cache configuration, bus speed, etc. This command is present by default on most Linux distributions. If the commands below do not work, then the utility is not in your distribution. To install it, go to the official GitHub page .
lshw [-format] [-options…]
The output format can be any of the following:
- html – output of hardware configuration in HTML format;
- xml – output of the hardware configuration in XML format;
- json – hardware configuration output as a JSON object;
- short – displays only basic information;
- businfo – displays information about the bus.
The parameters can be any of the following:
- -class CLASS – shows only a certain class of equipment;
- -C CLASS same as ‘-class CLASS’;
- -c CLASS same as ‘-class CLASS’;
- -disable TEST – disable the test (for example, pci, isapnp, cpuid, etc.);
- -enable TEST – enable test (for example, pci, isapnp, cpuid, etc.);
- -quiet – do not display status;
- -sanitize – remove sensitive information such as serial numbers, etc.;
- -numeric – numeric identifiers (for PCI, USB, etc.);
- -notime – exclude mutable attributes (time stamps) from the output.
Since the command must be run as root, use sudo before the command:
sudo lshw -short
Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!