System Details
Kernel version, uptime, and other information to characterize the system.
Commands
uname -a
Prints kernel name, release, and version.
uname -r
Prints just the kernel release.
uname -v
Prints the kernel version.
uname -o
Prints the operating system.
uname -i
Prints the hardware platform.
cat /etc/*rel*
Prints information regarding the OS.
cat /etc/issue
Displays distribution-specific information.
cat /etc/*-release
Displays distribution information.
cat /etc/os-release
Displays operating system details.
uptime
Displays system uptime.
lsb_release -a
Shows Linux distribution information.
hostnamectl
Displays the system hostname and other system information (systemd systems).
File Locations
/etc/os-release or /usr/lib/os-release
On modern Linux distributions adhering to the Freedesktop.org Desktop Entry Specification, contains OS and version information. Provides structured data including operating system name, version, ID, and more.
/etc/lsb-release
Stores OS and version information on some distributions like Ubuntu. Contains distribution ID, release number, and description.
/etc/redhat-release
Typically found on Red Hat-based distributions such as Red Hat Enterprise Linux (RHEL) and CentOS. Contains distribution name and version.
/etc/debian_version
Stores the Debian release version on Debian-based distributions like Debian and Ubuntu.
/etc/issue or /etc/issue.net
May contain a message or banner with OS information, typically displayed during system startup or login.
/proc/version
Contains information about the kernel version and build date. Often used to determine the kernel version.
/etc/hostname
Stores the system hostname on some Unix systems.
/etc/*-release
Some distributions may have release-specific files in the /etc/ directory, such as /etc/centos-release or /etc/centos-release-upstream on CentOS.
ls /etc/release
Lists files related to release information in the /etc/ directory.
Last updated
Was this helpful?