LinuxCommandLibrary

uname

Print system information

TLDR

Print kernel name

$ uname
copy

Print all available system information
$ uname [[-a|--all]]
copy

Print system architecture and processor information
$ uname [[-mp|--machine --processor]]
copy

Print kernel name, kernel release, and kernel version
$ uname [[-srv|--kernel-name --kernel-release --kernel-version]]
copy

Print system hostname
$ uname [[-n|--nodename]]
copy

Print the current operating system name
$ uname [[-o|--operating-system]]
copy

Display help
$ uname --help
copy

SYNOPSIS

uname [options]

PARAMETERS

-a, --all
    Print all information

-s, --kernel-name
    Print kernel name

-n, --nodename
    Print network node hostname

-r, --kernel-release
    Print kernel release

-v, --kernel-version
    Print kernel version

-m, --machine
    Print hardware name

-p, --processor
    Print processor type

-o, --operating-system
    Print operating system

DESCRIPTION

uname prints system information including the operating system name, kernel version, hardware architecture, and hostname. It's commonly used in scripts to determine the system type and tailor behavior accordingly.

CAVEATS

Some options may not work on all systems. Output format is not standardized across Unix variants.

SEE ALSO

Copied to clipboard