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
img

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:

img

Outputs the kernel's name by default

All Information

1
uname -a    # This is equivalent to uname --all
img

Outputs all the system information

Hardware Platform

1
uname -i    # This is equivalent to uname --hardware-platform
img

Outputs the system's hardware platform

Hardware Name

1
uname -m    # This is equivalent to uname --machine
img

Outputs the system's machine hardware name

Network Node Hostname

1
uname -n    # This is equivalent to uname --nodename
img

Outputs the system's network node hostname

Processor Type

1
uname -p    # This is equivalent to uname --processor
img

Outputs the system's processor type

Operating System

1
uname -o    # This is equivalent to uname --operating-system
img

Outputs the operating system's name

Kernel Release

1
uname -r    # This is equivalent to uname --kernel-release
img

Outputs the kernel's release

Kernel Name

1
uname -s    # This is equivalent to uname --kernel-name
img

Outputs the kernel's name

Kernel Version

1
uname -v    # This is equivalent to uname --kernel-version
img

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
img

Outputs the number of available processors

Installed Processors

1
nproc --all
img

Outputs the number of installed processors

System Name

We can get the name of the current host through the hostname command:

1
hostname
img

Outputs the system's name

Numeric Host Identifier

We can get the identifier of the current host through the hostid command:

1
hostid
img

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
img

Outputs the system's running time, logged-in user counts, and the average load over the last 1, 5 and 15 minutes

References 21 System context, 21.2 arch: Print machine hardware name, 21.3 nproc: Print the number of available processors, 21.4 uname: Print system information, 21.5 hostname: Print or set system name, 21.6 hostid: Print numeric host identifier, 21.7 uptime: Print system uptime and load

Buy me a coffeeBuy me a coffee