LinuxQuestions.org
Help answer threads with 0 replies.
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, 12: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, 12:51 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
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, 12: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, 01: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, 01:05 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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, 03: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, 04:08 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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, 04: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, 05: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, 05:39 AM   #10
aztrix
LQ Newbie
 
Registered: Sep 2003
Location: Sydney
Distribution: openSUSE Leap 42
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, 06:30 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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 08: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 11:18 AM
Distribution ftwomey Linux - General 2 05-02-2004 07:51 PM
Going from distribution to distribution safe? sausagejohnson Linux - General 8 04-30-2004 02:27 AM
What Distribution do you use? njbrain General 52 04-23-2004 10:34 AM
With Distribution is the best??? banana2 Linux - Distributions 5 12-25-2002 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:43 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
Open Source Consulting | Domain Registration