The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find and replace command in one line using one command vasikaran UNIX for Dummies Questions & Answers 10 08-20-2008 07:40 AM
Getting Command line on HP-UX rucha_mahajan HP-UX 2 05-12-2008 01:06 AM
how to? launch command with string of command line options TinCanFury Shell Programming and Scripting 5 04-28-2008 03:06 PM
Add line command felixwhoals UNIX for Dummies Questions & Answers 3 12-16-2007 09:12 PM
How do I get ssh to run a command in one line? LordJezo Shell Programming and Scripting 2 07-01-2004 08:54 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-15-2007
Registered User
 

Join Date: Dec 2006
Posts: 80
how to tell which OS via command line

What is the command line to find out what OS you are running on linux?

I initially thought uname -a would do it, but it only lists kernel version.. can someone tell me?

thanks in advance.
Reply With Quote
Forum Sponsor
  #2  
Old 05-15-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,664
"uname -a" is the right command, but it is not too helpful in determining which Linux Distro you have. It should at least inform you that you are running Linux and not HP-UX, FreeBSD, SunOS, etc.

As for which distro, Linux does not yet have a great way to do this, but it is moving towards a way. See: http://linuxmafia.com/faq/Admin/release-files.html for a good write-up on the current state of affairs.
Reply With Quote
  #3  
Old 05-15-2007
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Depends on Linux distribution.

Take a look under /etc for a file named *release*

Code:
ls /etc/*release*
cat /etc/*release*
Not all distributions provide this file.

Cheers
ZB
Reply With Quote
  #4  
Old 05-15-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by hankooknara
What is the command line to find out what OS you are running on linux?
Code:
echo linux
Reply With Quote
  #5  
Old 05-15-2007
Registered User
 

Join Date: Dec 2006
Posts: 10
uname -X

uname -X is one ofthe commands which gives all the operating system variables.

Regards
Adhir Garg
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0