uname uname -r uname -s bash —version Basic - Command Line Interface

🔹 uname

What it does:
uname stands for Unix Name, and it displays basic information about the system.

Default behavior:
Running uname with no options typically returns the kernel name (e.g., Linux).

$ uname
Linux

🔹 uname -r

What it does:
Prints the kernel release version.

Example:

$ uname -r
3.10.0-1160.el7.x86_64

This indicates the specific version of the Linux kernel currently running (common in CentOS 7).


🔹 uname -s

What it does:
Prints the kernel name, same as running uname without options.

Example:

$ uname -s
Linux

So:

  • -s = kernel name (e.g., Linux)

  • -r = kernel release (e.g., 3.10.0-1160.el7.x86_64)


🔹 bash --version

What it does:
Displays the version information of the currently installed GNU Bash shell.

Example:

$ bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.

This shows the Bash version (4.2.46 in this example), which is useful for checking compatibility with scripts.


✅ Summary Table

CommandDescriptionExample Output
unameKernel nameLinux
uname -rKernel release/version3.10.0-1160.el7.x86_64
uname -sKernel nameLinux
bash --versionBash shell version infoGNU bash, version 4.2.46