Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
Can somebody explain (or point to all-in-one place explanation of) what are /etc/issue, /etc/lsb-release, /etc/$(distro)_version, /etc/os-release? LinuxMint even has /etc/linuxmint/info. Why there are so many ways to identify a distro, what are differences between them, where and how they are used?
From my Linux Mint Petra:
/etc/issue :
Code:
Linux Mint 16 Petra \n \l
/etc/lsb-release :
Code:
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=16
DISTRIB_CODENAME=petra
DISTRIB_DESCRIPTION="Linux Mint 16 Petra"
The /etc/issue file in your above examples isn't part of identifying the OS. It is a pre-login message file, which can hold anything you like (out of the box it most often shows distro and version information).
The reason there are so many ways to fetch distro related info is historic in nature. Many distro's had their own way of making this info available. There are loose conventions /etc/os-release and /etc/distro_name-release are often seen.
The LSB way of doing things is being pushed forward, but to be able to be backward compatible the old way(s) are also still in use. Some applications check this when it is being installed (which makes life interesting some times...).
BTW: Debian does make use of LSB, although there is no /etc/lsb-release file. Run the following command: lsb_release -a
Hi druuna,
Thanks for the info. I read man page for 'issue'. You are correct. I switched between console and GUI, and edited issue file to confirm it.
Wrt other files, if I understood correctly,
a) these are just the way a distro would show its information, there is no right-way or accepted standard. Say, something like setting hostname? with /etc/hostname, /etc/HOSTNAME, /etc/sysconfig/network?
b) the information is used by programs/services.
I could think of one program, grub2 (GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`). And there was a discussion in Archlinux forums that Steam categorises their distro in general category as "Linux (64-bit)" and therefore they are missing valuable info as to how many Arch users are there with Steam _because_ they don't ship lsb-release by default and Steam uses that info in their survey.
Which way to show OS info is between distro and applications that use the info. If the distro is influential, it's method can become the de-facto standard, if not the distro has to change (or atleast provide addtional methods) how it identifies itself.
Thanks for the info. I read man page for 'issue'. You are correct. I switched between console and GUI, and edited issue file to confirm it.
You're welcome.
Quote:
Wrt other files, if I understood correctly,
a) these are just the way a distro would show its information, there is no right-way or accepted standard. Say, something like setting hostname? with /etc/hostname, /etc/HOSTNAME, /etc/sysconfig/network?
Correct, although LSB is being pushed forward as a (future) standard. Not all distro's have implemented it yet. And, as always with "standards", some distro's might even decide to ignore it altogether.
Quote:
b) the information is used by programs/services.
I could think of one program, grub2 (GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`). And there was a discussion in Archlinux forums that Steam categorises their distro in general category as "Linux (64-bit)" and therefore they are missing valuable info as to how many Arch users are there with Steam _because_ they don't ship lsb-release by default and Steam uses that info in their survey.
Which way to show OS info is between distro and applications that use the info. If the distro is influential, it's method can become the de-facto standard, if not the distro has to change (or atleast provide addtional methods) how it identifies itself.
This issue has 2 sides: The (specific) distro needs to implement a standard (be it LSB or something different), but the application builders also need to implement a standard way of determining the distro used.
My money (long run) will be on LSB, but as long as there is no actual standard one might need to be creative to get a certain application to install....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.