This tutorial explains Linux “uname” command, options and its usage with examples.
DESCRIPTION
This command is useful for obtaining certain hardware information.
SYNOPSIS
uname [OPTION]
OPTIONS :
-a, –all
print all information, in the following order:
-s, –kernel-name
print the kernel name
-n, –nodename
print the network node hostname
-r, –kernel-release
print the kernel release
-v, –kernel-version
print the kernel version
-m, –machine
print the machine hardware name
-p, –processor
print the processor type
-i, –hardware-platform
print the hardware platform
-o, –operating-system
print the operating system
EXAMPLES
Note : for information regarding various options, see above
1. Printing general system information
$ uname
Linux
2. Printing all system information
$ uname -a Linux ubuntu 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
3. Printing machine hardware name
$ uname -m x86_64
4. Printing hardware platform information
$ uname -i x86_64
5. Printing kernel name
$ uname -s Linux
6. Printing network host name
$ uname -n ubuntu
7. Printing kernel release information
$ uname -r 3.8.0-19-generic
8. Printing kernel version information
$ uname -v #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013
9. Using multiple options together
$ uname -prnv ubuntu 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.
- Buy Linux Books
- Practice Programming MCQs
- Apply for Linux Internship
- Buy Information Technology Books
- Apply for Programming Internship