Selected topic

Uname

System Information

Prefer practical output? Use related tools below while reading.

uname is a command-line utility in Linux that displays information about the system, including its kernel name, version, and other details.

Options:


  • -a: Displays all available information.
  • -s: Displays the kernel name.
  • -v: Displays the kernel release version.
  • -n: Displays the hostname.
  • -r: Displays the kernel release number.
  • -m: Displays the machine type (architecture).
  • -o: Displays the operating system.

Example Usage:


bash
# Display all available information
uname -a

# Display kernel name
uname -s

# Display kernel release version
uname -v

# Display hostname
uname -n

# Display kernel release number
uname -r

# Display machine type (architecture)
uname -m

# Display operating system
uname -o


Output Examples:


bash
$ uname -a
Linux hostname 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 8 00:04:38 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ uname -s
Linux

$ uname -v
#48-Ubuntu SMP Tue Jan 8 00:04:38 UTC 2019

$ uname -n
hostname

$ uname -r
4.15.0-45-generic

$ uname -m
x86_64

$ uname -o
GNU/Linux

The uname command is commonly used in scripts and automation tools to retrieve system information, making it a useful tool for system administrators and developers.