Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-30-2010, 12:08 PM   #16
LQ Newbie
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0

Did anyone start a howto anywhere? I would find it helpful (if the answer is no, I'd be willing to start one).

Also, I use if [[ `uname` -eq "Darwin" ]] to see if I'm on my macbook.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-01-2010, 11:59 PM   #17
Senior Member
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,075

Rep: Reputation: 203Reputation: 203Reputation: 203
Originally Posted by UK MAdMaN View Post
I don't think there's a command that can identify distros. There has to be something unique to a distro for something to identify the distro, and as all distros use mostly the same code/programs there's nothing unique to be identified.
on slackware "cat /etc/slackware-version" returns "Slackware 13.1.0"
you may or may not have such a file in your /etc directory
ie /etc/<DistroName>-version
Old 10-13-2010, 09:46 PM   #18
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,248
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
lsb_release should work as well..

:~$ lsb_release -d
Description: Debian GNU/Linux 5.0.4 (lenny)
Old 10-14-2010, 06:27 AM   #19
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
I just searched out my "comprehensive" answer from a later thread:

There is also some code here which uses the contents of /etc/lsb-release. I would change the elifs to a case statement -- cleaner code.

As for making a HowTo, this is as good a place as any to shape it; & when it looks good, put it in the LQ Linux Tutorials. If shaping it here is too cumbersome for group editing, then maybe the LQ Wiki is a good place.

A search of each might be in order before we start. We don't want to duplicate effort.
Old 10-14-2010, 07:22 AM   #20
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
A more detailed solution is given in this LQ post.
Old 10-07-2012, 10:47 AM   #21
LQ Newbie
Registered: Sep 2012
Posts: 7

Rep: Reputation: Disabled
Originally Posted by rickh View Post
I have rather quickly come to appreciate infobash, but I'm not sure that it works on anything except Debian.

debian64:~$ infobash -v3
Host/Kernel/OS  "debian64" running Linux 2.6.21-1-amd64 x86_64 [ Debian lenny/sid ]
CPU Info        AMD Athlon 64 3200+ 512 KB cache flags( sse sse2 nx lm ) clocked at [ 1989.862 MHz ]
Videocard       ATI RS480 [Radeon Xpress 200G Series]  X.Org 1.3.0  [ 1280x1024 @75hz ]
Network cards   Realtek RTL-8139/8139C/8139C+, at port: de00 
Processes 93 | Uptime 7:29 | Memory 291.1/436.0MB | HDD MAXTOR 6L080J4,WDC WD800JB-00JJC0 Size 160GB (60%used) | Client Shell | Infobash v2.65
Just tried this on Centos 5.6 i686 and got this:

bash: infobash: command not found

Just throwing that out there and the guy that gave the cmd

cat /etc/*release <- SUPER WIN!! TY! The other cmd cat /etc/*version showed my asterisk pbx version instead of the OS on Centos 5.6

I know this is an old thread but VERY IMPORTANT TO ME!!!!!! I have been on the jump for this, it's already hitting the printer AS WE SPEAK!! Vital news...I got Centos stickers to label a network here and have to SSH threw a mess of machines. Thanks again!


commandline, distribution, version

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 10:48 AM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 12:24 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:58 AM.

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