Unix/Linux Go Back    


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

how to tell which OS via command line

UNIX for Dummies Questions & Answers


Tags
linux commands, linux operating commands, linux operating system

Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-15-2007
hankooknara hankooknara is offline
Registered User
 
Join Date: Dec 2006
Last Activity: 30 September 2007, 3:54 PM EDT
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
how to tell which OS via command line

What is the linux operating 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.
Sponsored Links
    #2  
Old Unix and Linux 05-15-2007
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 27 April 2015, 10:26 AM EDT
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 449 Times in 264 Posts
"uname -a" is the right linux operating 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.
Sponsored Links
    #3  
Old Unix and Linux 05-15-2007
zazzybob's Unix or Linux Image
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 25 Times in 23 Posts
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
    #4  
Old Unix and Linux 05-15-2007
porter porter is offline Forum Advisor  
Registered User
 
Join Date: Jan 2007
Last Activity: 8 January 2008, 6:50 PM EST
Posts: 2,965
Thanks: 0
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by hankooknara
What is the command line to find out what OS you are running on linux?

Code:
echo linux

Sponsored Links
    #5  
Old Unix and Linux 05-15-2007
adhirgarg adhirgarg is offline
Registered User
 
Join Date: Dec 2006
Last Activity: 9 June 2009, 4:19 AM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
uname -X

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

Regards
Adhir Garg
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to replace html line into a command line? nitrofurano Shell Programming and Scripting 2 04-22-2012 03:02 PM
Bash - Loading a command's output line by line into an array Azrael Shell Programming and Scripting 4 09-20-2011 04:42 AM
Need help in sed command [ printing a pattern + its line no or line no alone ] frozensmilz Shell Programming and Scripting 4 06-28-2009 10:38 AM
reading ps command's output line by line s. murat Shell Programming and Scripting 5 05-22-2008 04:23 AM



All times are GMT -4. The time now is 10:36 PM.