LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 12-20-2005, 01:36 AM   #1
raajesh_ak
LQ Newbie
 
Registered: Dec 2005
Posts: 7

Rep: Reputation: 0
Question Need Command to find linux operating system information


Hi Linuxions

I am Linux Newbie.I just want to know how to find what version of linux os is running in a system. Is there any command available?.

Looking for help

With Thanks
Raajesh
 
Old 12-20-2005, 02:12 AM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Do you mean what version of the kernel? If so
Code:
uname -r
Welcome to LQ!
 
Old 12-20-2005, 09:35 AM   #3
Mishra100
Member
 
Registered: Jan 2005
Posts: 44

Rep: Reputation: 15
uname -a
Will also give you additional info.

you could
man uname
for information
 
Old 12-20-2005, 03:45 PM   #4
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
If you need to know which distribution it's running, you could try something like:

Code:
cat /etc/*-version
or

Code:
cat /etc/*-release
There might be others, but i think the these are the most common ones.
 
Old 12-20-2005, 03:47 PM   #5
Mishra100
Member
 
Registered: Jan 2005
Posts: 44

Rep: Reputation: 15
Quote:
Originally Posted by alienDog
If you need to know which distribution it's running, you could try something like:

Code:
cat /etc/*-version
or

Code:
cat /etc/*-release
There might be others, but i think the these are the most common ones.
I recently learned that

cat /etc/issue

works really well
 
Old 12-20-2005, 05:24 PM   #6
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
/etc/issue doesn't contain distribution information on all distributions, but it can well be used on some of them. In my opinion there really should be a standard location for this information /etc/distribution or something alike.

Last edited by alienDog; 12-20-2005 at 05:27 PM.
 
Old 12-20-2005, 11:19 PM   #7
raajesh_ak
LQ Newbie
 
Registered: Dec 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks a lot for your replies.

Many Thanks
raajesh
 
Old 12-21-2005, 03:43 AM   #8
james.math.u
LQ Newbie
 
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
about version

I just tried out the command /etc/*-release, and it worked fine for me....
My doubt is..where is this info stored...like, i did ls -a inside etc, but i couldn't find any file with the word release...
 
Old 12-21-2005, 06:41 AM   #9
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
Quote:
Code:
cat /etc/*-version
Works fine.
Quote:
Code:
cat /etc/*-release
File not found. Does that depend upon the distibution ?

Code:
uname -o
works.

--
Prasanta

Last edited by prasanta; 12-21-2005 at 06:42 AM.
 
Old 12-21-2005, 06:38 PM   #10
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
Yep, it depends on the distribution. uname -o doesn't tell you the distribution, only the operating system name (which in Linux systems is always GNU/Linux).

The information is stored in a file with -release or -version ending under /etc/, it is there for sure james.math.u, look closer In redhat systems it's /etc/redhat-release, in slackware /etc/slackware-version and in debian (I believe) /etc/debian-version and so on.

Last edited by alienDog; 12-21-2005 at 06:42 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I Find My System Architecture Information On Windows And Also On Linux pak_abdul Linux - Hardware 2 05-21-2005 12:57 PM
Where to find system services information joeyBig Linux - General 1 07-24-2004 08:52 AM
Why Linux is best Operating System for Learning/Doing System Programming ? ubaid_t General 6 03-21-2004 02:10 PM
dd command - missing operating system samnjengah Linux - General 8 01-08-2004 01:49 PM
System Information Command? Pete Dogg Linux - General 16 05-13-2003 01:58 PM


All times are GMT -5. The time now is 12:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration