We’ll just use it to check the Linux kernel, in this guide: $ uname -r version output version information and exit o, -operating-system print the operating system i, -hardware-platform print the hardware platform (non-portable) p, -processor print the processor type (non-portable) m, -machine print the machine hardware name v, -kernel-version print the kernel version r, -kernel-release print the kernel release n, -nodename print the network node hostname a, -all print all information, in the following order, To see all the options, just run: $ uname -help With it, you can check the name, version, kernel and other details about the current machine and operating system. Lastly, we can check our Linux kernel using the uname utility, which is short for unix name. Linux Mint Linux version 4.15.0-43-generic (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #46-Ubuntu SMP Thu Dec 6 14:45: Check Linux Kernel Using “uname” Linux Mint Static hostname: dracula.prime Operating System: Debian GNU/Linux 9 (stretch) Hostnamectl is a command that lets you display the hostname of the machine, but you can also use it to check a few more details, among them being your OS version and kernel: $ hostnamectlĬentOS Static hostname: Let’s see for ourselves: $ lsb_release -aĬentOS -bash: lsb_release: command not foundĭescription:ĝebian GNU/Linux 9.4 (stretch)Ĭodename: tara Check Linux OS Version Using “hostnamectl” Although it is useful for easily displaying version information in a straightforward manner, it’s not always installed by default. Lsb_release is a utility that displays Linux Standard Base information about the Linux distro. Linux Mint Linux Mint 19 Tara \n \l Check Linux OS Version Using the “lsb_release” Utility In this case, we’re checking the contents of the /etc/issue file, which contains system identification text: UBUNTU_CODENAME=bionic Check Linux OS Version Using “cat /etc/issue”Īgain, we’ll use the cat command, to check the contents of a file. Let’s check the output of this command on the distros mentioned above: $ cat /etc/os-releaseĭebian PRETTY_NAME="Debian GNU/Linux 9 (stretch)" In this guide we’re testing it on CentOS, Debian and Linux Mint (which is based on Ubuntu).Īs you’ll see, the other commands may not work on expected on every distro. This command works on multiple distributions. Check Linux OS Version Using “cat /etc/os-release”Ī reliable way to check your Linux OS name and version is checking the contents of the /etc/os-release file. Let’s explore each of the commands a little more in depth. To check the Linux Kernel version, run one of the following commands: cat /proc/version.Run any of the following commands to check the Linux OS version details: cat /etc/os-release.Open up a terminal (on desktop) or log in via SSH (on a remote server).To find the Linux operating system’s name, version or kernel: Check Linux Kernel Using “cat /proc/version”Ĭheck Linux Distribution Name, Version & Kernel.Check Linux OS Version Using “hostnamectl”.Check Linux OS Version Using the “lsb_release” Utility.Check Linux OS Version Using “cat /etc/issue”.Check Linux OS Version Using “cat /etc/os-release”.Check Linux Distribution Name, Version & Kernel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |