System Information
Retrieving and displaying information about the Linux system
hostnamectl
The hostnamectl
utility is part of systemd, and it is used to query and change the system hostname. It also displays the Linux distribution and kernel version:
If hostnamectl
is executed by itself, without any additional commands / options, it will output the same information as the command hostnamectl status
Sample output:
uname
The uname
command displays several system information including, the Linux kernel, processor architecture, name version, and release.
Syntax
uname [OPTIONS]...
The options are as follows:
-s
, (--kernel-name
) - Prints the kernel name.-n
, (--nodename
) - Prints the system’s node name (hostname).-r
, (--kernel-release
) - Prints the kernel release.-v
, (--kernel-version
) - Prints the kernel version.-m
, (--machine
) - Prints the name of the machine’s hardware name.-p
, (--processor
) - Prints the architecture of the processor.-i
, (--hardware-platform
) - Prints the hardware platform.-o
, (--operating-system
) - Print the name of the operating system.-a
, (--all
) - Prints all information, except omit-p
and-i
if unknown.
Sample output:
uptime
uptime
gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
Sample output
/proc/ folder
The /proc
directory contains virtual files with information about the system memory , CPU cores , mounted filesystems , processes, and more.
The numbered directories in /proc
correspond to process ids running on the system. The status
file in these folders contains detailed information about the process
Use commands cat
or less
to display contents of these files.
File in /proc/
Contents
/proc/cmdline
shows the parameters passed to the kernel at the time it is started
/proc/cpuinfo
processor information, per core
/proc/meminfo
memory information
/proc/version
kernel information
Sample output:
Last updated