From LQWiki
Jump to: navigation, search

uname is a command which prints system information like the kernel name. This can be very useful if you're trying to install or make a program and it requires headers for your kernal or similar. Instead of having to keep searching for your specific ones, if you have apt-get or similar program you can pass the output from uname to install whatever files are required for your architecture and kernel.


All about the running kernel:

$ uname -a
Linux kolossus #1 SMP Tue Apr 17 08:42:35 UTC 2007 i686 i686 i386 GNU/Linux


$ uname -r

Machine type:

$ uname -m

Processor type:

$ uname -p

Provided by

Not all distributions provide this command, but most (all?) of the ones that do incorporate this from the GNU Coreutils: and use its man page

Related Commands

All of these relate to system-wide information.

  • date - set or show the time.
  • arch - show CPU hardware details.
  • nproc - Show the number of cores.
  • hostname - Set or show the host's name.
  • hostid - Show the host's numeric ID.
  • uptime - Show system uptime and recent load averages.

See also