Uname

From LQWiki
Jump to navigation Jump to search

The uname command prints system information, like the kernel name or machine architecture.

Availability

On nearly every Unix-like system, the uname program is available. This includes all desktop-oriented GNU/Linux distributions, OpenBSD, FreeBSD, and more.

Usage

uname has many flags, including -a, which will make the program act as if all of the below flags were given.

  • -s Prints the kernel name.
  • -r Prints the kernel release.
  • -v Prints information about how and when the kernel was compiled.
  • -m Prints your machine's architecture.
  • -o Prints operating system name, often "GNU/Linux".
  • -n Prints your system's hostname.
  • -p Prints your processor architecture, sometimes will report "unknown".
  • -i Prints your hardware platform, sometimes will report "unknown".

Examples

$ uname -a
Linux lucuma 6.11.0-rc1 #8 SMP PREEMPT_DYNAMIC Wed Jul 31 10:08:34 EDT 2024 x86_64 GNU/Linux
$ uname -m
x86_64
$ uname -o
GNU/Linux

See Also