Solved

Linux and Linux versions

Posted on 2015-02-16
5
212 Views
Last Modified: 2015-03-18
I have been given access to what was called a "Linux server"

The problem is I am not told if its CeentOS, Red Hat, etc

Is there a simple command that will tell me the version of Linux, no matter what the version of Linux you are running?

Thanks
0
Comment
Question by:Anthony Lucia
5 Comments
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40612612
uname -a will give you the kernel version and architecture; can probably guess from the version the distribution
if it's a red hat or variant, you can do cat /etc/redhat-release and it will show the OS version
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 40612614
cat /proc/version

could also help.

(Not only) on Ubuntu you can try

cat /etc/issue

if you didn't modify the content of this file too much, that is.
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 40612634
also cat /etc/redhat*
0
 
LVL 48

Expert Comment

by:Tintin
ID: 40613189
In most cases

cat /etc/*release
0
 

Expert Comment

by:Saravanan Palanisamy
ID: 40675050
In redhat & centos, Use this command dmesg | sed -n '3p'
It will show Linux distro, version details as well as kernel version.
In Ubuntu & Debian, Use this command dmesg | sed -n '4p'
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question