LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 09-30-2010, 12:08 PM   #16
swirve
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.
 
Old 10-01-2010, 11:59 PM   #17
rob.rice
Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 680

Rep: Reputation: 68
Quote:
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
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,230
Blog Entries: 5

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

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

Rep: Reputation: 229Reputation: 229Reputation: 229
I just searched out my "comprehensive" answer from a later thread:
http://www.linuxquestions.org/questi...2/#post3736674

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
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.37, Debian Squeeze
Posts: 7,983
Blog Entries: 25

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
A more detailed solution is given in this LQ post.
 
  


Reply

Tags
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 03:41 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration