Linux Uname Command Tutorial With Examples To List Operating System, Kernel, Machine, Processor Architecture – POFTUT

Linux Uname Command Tutorial With Examples To List Operating System, Kernel, Machine, Processor Architecture


uname  command is a simple tool that provides information about the kernel, machine, processor, and operating system. There are a lot of more complex and feature applications that can provide more information but the simplicity makes uname best choose.

Syntax

We will use the following syntax for uname command.

uname [OPTION]...

Help

Brief help can be displayed with the --help option.

$ uname --help
Help
Help

Display Kernel Name

Kernel name is set by compiling the kernel. Distributions generally provide their name in the kernel name or they set their original versioning convention. We can list kernel name with -s or --kernel-name option.

$ uname -s
Display Kernel Name
Display Kernel Name

Display Host Name

We can display the hostname of the system with -n or --nodename options. The other name of the hostname is the node name.

$ uname -n
Display Host Name
Display Host Name

Display Kernel Release

We can display kernel release information. This information may be useful while looking for security vulnerabilities or comp-ability options about the application and kernel-related tools. We will use -r or --kernel-release options.

$ uname -r
Display Kernel Release
Display Kernel Release

Display Kernel Version

Kernel version provides information like when the kernel is compiled what distribution is used. We can display kernel version information with –v option.

$ uname -v
Display Kernel Version
Display Kernel Version

Display Processor

There is a lot of different type of processors in the IT world. ARM, X86, X86_64, MIPS, etc. Each processor architecture requires kernel compiled for its architecture to work. We can get kernel architecture and related processor type with -p or --processor options.

$ uname -p
Display Processor
Display Processor

Display Operating System

Operating system information can be listed with -o option.

$ uname -o
Display Operating System
Display Operating System

Display All Information

Up to now we have listed and displayed related information part by part. We can print and display all information in a single line with a single option. We will use -a or --all option.

$ uname -a
Display All Information
Display All Information

We can see that the current system Linux Kernel version is 4.8 and the operating system is Ubuntu.

LEARN MORE  How To Use Multiple SSH Keys?

Leave a Comment