LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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
  Search this Thread
Old 01-21-2005, 01:46 AM   #1
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

Rep: Reputation: 15
How to know the name of the distribution


Hi friends,

I am new to linux and want to know the name of the distribution by using command.

Is it possible or is there any other way to find the name of the distribution like redhat 7.3 or SuSe 9.0....

Thanks in advance

Suresh Bhat
 
Old 01-21-2005, 01:51 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
You can try "uname -r" at the command line. It returns the version/name of the current kernel. It won't display "SuSE 8.2 Professional", but will give you some very good clues of what you have
 
Old 01-21-2005, 01:54 AM   #3
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Code:
uname -a
will show the kernel version among other information. As for the distro, you can try to "finger" the host, or it might show at login.
 
Old 01-21-2005, 02:00 AM   #4
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

Original Poster
Rep: Reputation: 15
I want the name of the distribution clearly like
redhat 9.0 or Fedora Core 1

It can be any technique ; need not be command
 
Old 01-21-2005, 02:05 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Some distros have:
cat /etc/version
But others may do:
cat /etc/redhat-version
OR
cat /etc/edition

It's not a standard, but might be more of what you want if the distro does it.

Cool
 
Old 01-22-2005, 04:24 AM   #6
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

Original Poster
Rep: Reputation: 15
hi

there is no configuration file like /etc/version or /etc/redhat-version or /etc/edition

is there any way around ?
 
Old 01-22-2005, 05:08 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
It being not a standard, no not really. The best you will likely find that is as close to a standard will be the one mentioned above:
uname -a

Cool
 
Old 01-22-2005, 05:18 AM   #8
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
Quote:
Originally posted by sureshkellemane
hi

there is no configuration file like /etc/version or /etc/redhat-version or /etc/edition

is there any way around ?
hi there,

suse. i think /etc/Suse-release or something like that.
slackware. /etc/slackware-version ...
and so on.
as pointed out already, there is no standard. need to look around.

regards

slackie1000
 
Old 01-25-2005, 06:09 AM   #9
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

Original Poster
Rep: Reputation: 15
thanks a lot...

I can fetch it from release configuration file by writting small script
 
Old 11-04-2010, 06:39 AM   #10
aztrix
LQ Newbie
 
Registered: Sep 2003
Location: Dublin
Distribution: openSUSE 11.3
Posts: 14

Rep: Reputation: 3
howzit folks?

i realise this thread is pretty old but in case other googlers end up here this is what i found for openSUSE:

cat /etc/SuSE-release |grep openSUSE
openSUSE 11.3 (x86_64)

lsb_release -d
Description: openSUSE 11.3 (x86_64)

lsb_release -ds
"openSUSE 11.3 (x86_64)"

hth

cheers
aztrix
 
Old 11-04-2010, 07:30 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Code:
lsb_release -a
 
Old 11-04-2010, 09:41 AM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
rkhunter's rkh_dat_get_os_info function is a very complete solution to this requirement.

EDIT: is "very complete" meaningful? Isn't a thing either complete or not?

Last edited by catkin; 11-04-2010 at 09:43 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
What Distribution Redwolf_Eddy Linux - Newbie 12 12-12-2005 12:18 PM
Distribution ftwomey Linux - General 2 05-02-2004 08:51 PM
Going from distribution to distribution safe? sausagejohnson Linux - General 8 04-30-2004 03:27 AM
What Distribution do you use? njbrain General 52 04-23-2004 11:34 AM
With Distribution is the best??? banana2 Linux - Distributions 5 12-25-2002 04:34 AM


All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration