Linux provides commands that allow you to view system-related information, and with these commands, you can quickly get some necessary system information.
Machine Hardware Name
We can get the name of the machine’s hardware by the arch command:
1
arch # This is equivalent to uname -m
Outputs machine's hardware name
System Information
We can use the uname command plus some of the parameters it provides to get the system-related information:
Outputs the kernel's name by default
All Information
1
uname -a # This is equivalent to uname --all
Outputs all the system information
Hardware Platform
1
uname -i # This is equivalent to uname --hardware-platform
Outputs the system's hardware platform
Hardware Name
1
uname -m # This is equivalent to uname --machine
Outputs the system's machine hardware name
Network Node Hostname
1
uname -n # This is equivalent to uname --nodename
Outputs the system's network node hostname
Processor Type
1
uname -p # This is equivalent to uname --processor
Outputs the system's processor type
Operating System
1
uname -o # This is equivalent to uname --operating-system
Outputs the operating system's name
Kernel Release
1
uname -r # This is equivalent to uname --kernel-release
Outputs the kernel's release
Kernel Name
1
uname -s # This is equivalent to uname --kernel-name
Outputs the kernel's name
Kernel Version
1
uname -v # This is equivalent to uname --kernel-version
Outputs the kernel's version
Available Processors
We can view the number of logical cpu cores available through the nproc command.
Current Process
1
nproc
Outputs the number of available processors
Installed Processors
1
nproc --all
Outputs the number of installed processors
System Name
We can get the name of the current host through the hostname command:
1
hostname
Outputs the system's name
Numeric Host Identifier
We can get the identifier of the current host through the hostid command:
1
hostid
Outputs the system's host identifier
System Uptime and Load
We can use the uptime command to get the system’s running time, the number of users logged in, the average load, and so on:
1
uptime
Outputs the system's running time, logged-in user counts, and the average load over the last 1, 5 and 15 minutes