Just type the following command to check OS name and Linux kernel version. Use the hostnamectl command to query and change the system hostname and related settings. Sample outputs: LSB Version: :core-4.1-amd64:core-4.1-noarchĭescription:ĜentOS Linux release (Core) The lsb_release command gives LSB (Linux Standard Base) and distribution-specific information on the CLI. Hence, use the apk command on Alpine Linux, dnf command/ yum command on RHEL & co, apt command/ apt-get command on Debian, Ubuntu & co, zypper command on SUSE/OpenSUSE, pacman command on Arch Linux to install the lsb_release. $ egrep '^(VERSION|NAME)=' /etc/os-releaseĮven tiny Linux distro such as Alpine Linux provide the required OS (Operating system) information, including version: NAME="Alpine Linux"īUG_REPORT_URL="" Checking OS version on Linux using the lsb_release commandīy default, lsb_release command may not be installed on your system. We can filter out information such as OS version and name using the grep command/ egrep command as follows: Type the following cat command to view the /etc/os-release file: Let us see all examples in details for common Linux distros.
0 Comments
Leave a Reply. |