I am a new Linux system user. How do I check os version in linux command line?
Linux is a free and open source operating system. There are many variants of Linux out there. They are typically called Linux distribution. Suse, OpenSUSE, Debian, Ubuntu, CentOS, Arch, Fedora, RHEL all are common Linux distribution names. Knowing your os version and name can be very useful for security patches.
Check os version in Linux
The procedure to find os name and version on Linux:
Open the terminal application (bash shell)
For remote server login using the ssh: ssh user@server-name
Type any one of the following command to find os name and version in Linux: cat /etc/os-release lsb_release -a hostnamectl
Type the following command to find Linux kernel version: uname -r
Let us see all examples in detailed.
Type the following cat command: $ cat /etc/os-release Sample outputs:
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.