Skip to main content
added 413 characters in body
Source Link
Alxs
  • 2.3k
  • 3
  • 23
  • 31

Try this:

$ hostnamectl | grep "Operating System"

If that doesn't return an answer, do this:

$ ls -l /etc/*-release

It will output something like this:

-rw-r--r--. 1 root root  38 Nov 30 02:12 /etc/centos-release
-rw-r--r--. 1 root root 393 Nov 30 02:12 /etc/os-release
lrwxrwxrwx. 1 root root  14 Feb 28 18:40 /etc/redhat-release -> centos-release
lrwxrwxrwx. 1 root root  14 Feb 28 18:40 /etc/system-release -> centos-release

Try this:

$ hostnamectl | grep "Operating System"

Try this:

$ hostnamectl | grep "Operating System"

If that doesn't return an answer, do this:

$ ls -l /etc/*-release

It will output something like this:

-rw-r--r--. 1 root root  38 Nov 30 02:12 /etc/centos-release
-rw-r--r--. 1 root root 393 Nov 30 02:12 /etc/os-release
lrwxrwxrwx. 1 root root  14 Feb 28 18:40 /etc/redhat-release -> centos-release
lrwxrwxrwx. 1 root root  14 Feb 28 18:40 /etc/system-release -> centos-release
Source Link
Alxs
  • 2.3k
  • 3
  • 23
  • 31

Try this:

$ hostnamectl | grep "Operating System"