-
-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ubuntu] use /etc/os-release instead of lsb_release #6780
base: master
Are you sure you want to change the base?
Conversation
The /etc/os-release file is the standard. Any distribution based on systemd, including Red Hat Enterprise Linux, CentOS, Fedora, Gentoo, Debian, Mint, Ubuntu, and many others, is required to have that file. Distributions that don't use systemd may also have the file.
Thank you for opening this pull request 👍. If you are not familiar with the project, please check out our Contributing Guidelines and our Guiding Principles. Also take a look at our Hacking Guide if you intend to work on site internals. |
But this is the Ubuntu specific page, so others are irrelevant. I remember picking lsb_release because it gave a clearer answer to the question of "what release am I at". But I noticed today, that it's not installed on Ubuntu minimal containers, so it's not perfect either. I want to double check on this, give me a bit. |
lsb_release is a common tool for almost all linux distro and ubuntu is also have it default. It doesnt just gives release version but also other info ( if you use with -a ) . And as far as i know it first checks /etc/lsb-release and if it doesnt exist it takes values from /etc/os-release . So this what this commit/PR brings for us ? [ the related tool already exist in *ubuntu distros except minimal containers ] |
https://lwn.net/Articles/658809/ - linux standard base has been deprecated from 2015 and removed. They've kept this command around but for posterity. The recommended way is to use /etc/os-release. |
My 2 cents: if |
I had been thinking about this and wondered if it was worth updating it all over the project. |
The /etc/os-release file is the standard. Any distribution based on systemd, including Red Hat Enterprise Linux, CentOS, Fedora, Gentoo, Debian, Mint, Ubuntu, and many others, is required to have that file. Distributions that don't use systemd may also have the file.