Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux and Linux versions

Posted on 2015-02-16
5
Medium Priority
?
221 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 36

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 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:
Suggested Courses
Course of the Month6 days, 22 hours left to enroll

782 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