Get Operating System Linux

How to check os version in Linux command line

Step by step instructions to check os form in Linux summon line 



last refreshed January 7, 2018 in Categories CentOS, Debian/Ubuntu, Linux, RedHat and Friends, Suse
Get Operating System Linux




I am another Linux framework client. How would I check os form in linux order line?

Linux is a free and open source working framework. There are numerous variations of Linux out there. They are commonly called Linux conveyance. Suse, OpenSUSE, Debian, Ubuntu, CentOS, Arch, Fedora, RHEL all are regular Linux conveyance names. Knowing your os form and name can be exceptionally valuable for security patches.

Check os form in Linux 


The methodology to discover os name and form on Linux:

Open the terminal application (bash shell)

For remote server login utilizing the ssh: ssh user@server-name

Sort any of the accompanying order to discover os name and form 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.


/etc/os-release file
Type the following cat command:
$ cat /etc/os-release

Sample outputs:

NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.10"
VERSION_ID="17.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=artful
UBUNTU_CODENAME=artful

lsb_release command

The lsb_release order gives LSB (Linux Standard Base) and circulation particular data on the CLI. The linguistic structure is:

$ lsb_release -a

Sample outputs:

LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core

hostnamectl summon 

Utilize hostnamectl summon to inquiry and change the framework hostname and related settings. Simply type the accompanying order to check OS name and Linux bit form:

$ hostnamectl

Sample outputs:

Static hostname: nixcraft-www-42
         Icon name: computer-vm
           Chassis: vm
        Machine ID: beb217fbb4324b7d9959f78c279e6599
           Boot ID: 10f00cc5ca614b518a84d1793d0134bc
    Virtualization: qemu
  Operating System: Ubuntu 16.04.3 LTS
            Kernel: Linux 4.10.0-42-generic
      Architecture: x86-64
uname command
Just print Linux kernel version, run:
$ uname -r

Sample outputs:
Check os version in Linux command line
Another option is to type the following command:
$ cat /proc/version

Sample outputs:

Linux version 3.10.0-693.11.6.el7.x86_64 (mockbuild@x86-041.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Thu Dec 28 14:23:39 EST 2017
/etc/issue file
Use more command/less command as follows:
$ cat /etc/issue
$ more /etc/issue
$ less /etc/issue

Getting help
You can also view the manual page on uname using the following command:
$ man hostnamectl
$ man uname
$ man cat

Yorumlar

Bu blogdaki popüler yayınlar

En İyi 20 Hacker Duvar Kağıtları