os/distro information methods
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 Code:
DISTRIB_ID=LinuxMint Code:
NAME="Ubuntu" Code:
RELEASE=16 /etc/debian_version: Code:
wheezy/sid While lsb may stand for Linux Standard Base, I did not see /etc/lsb-release in debian and slackware. Thanks in advance. |
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. Correct me if I'm wrong. Thanks again, Sai |
Quote:
Quote:
Quote:
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.... |
All times are GMT -5. The time now is 02:51 AM. |