LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-28-2018, 10:26 PM   #1
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Rep: Reputation: 13
Request: Standardize discovery of version number


This computer is Debian 9.4

Why does every version of linux seem to have its own favorite way to discovering which version of the system is running? And why doesn’t any of them have a simple command like “version” to do that?
And lacking that, why is it that none of my searches for finding how to discover a version yield a tool that someone has made and can be installed on all versions and flavors of Linux so that I can always and easily discover what version my computer is running?

And no need to reply to those specific questions. They are rhetorical and the purpose is, hopefully, obvious. And if anyone wants to chew me out so very thoroughly over this, …, I will read your reply and probably concede the point.

And yes, I do understand that as noted in multiple people’s signatures, since I don’t want to spend the time and effort to figure out how to do this then I am part of the problem. So be it. I take that hit.

Enough for that rant. Still, I do ask: Will someone please create a common utility for all Linux systems that will tell the user exactly which brand of Linux they are running and which version. I suggest that command should be, …, wait for it, …, you will never guess this one, …,

Quote:
version
Just type in version into any console window and the response should take the format:

Quote:
Debian 9.4 2018-04-28 Hot-Potato
That is the name, followed by a space, followed by a decimal dotted version number, followed by the build date, followed by what ever the coder(s) of that flavor of Linux wants displayed. Some people may want the time but since a full build of the system probably takes several hours and I presume that few distributions are updated and re-released two or more times in one day, the time is probably irrelevant. The date should be sufficient.

And hey, if you want 17 command line options that display all types of information that you might like to see, then go for it.

If so, please keep this request in mind: When I type in the characters “version” with no options, and press Enter, I get the one line response noted above and nothing else.
 
Old 04-29-2018, 08:18 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,389
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
It's pretty standard (I can't say universal) to store version information in /etc/release. I find that

Code:
cat /etc/*release*
generally works to display version information.

Afterthought:

Posting your suggestion here does not guarantee that the decision-makers who need to see it will do so. I wish it did . . . .

Last edited by frankbell; 04-29-2018 at 08:20 PM.
 
1 members found this post helpful.
Old 04-30-2018, 01:46 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,011

Rep: Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194
Sounds like a great little project for you As frankbell points out, there is a reasonably standard way, but feel free to contact all the major suppliers and get them to agree on a standard
and then throw in your 'version' command to show them how it will get the necessary information.

I wish you luck
 
Old 04-30-2018, 03:58 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,577

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
The cat /etc/release command should work on most Linux systems although some don't have that file but do have /etc/issue so either of those commands should get you the information you want on almost any Linux system. Slackware has an /etc/issue but its contents are rather cryptic. It does have a slackware-version file in the /etc directory which is pretty obvious as to contents. Every other Linux system I have used would give the version with one of those two commands. Admittedly, given there are well ove 500 Linux distributions, I'v still got a few hundred to check out.
 
Old 04-30-2018, 04:19 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I (usually) know what version I am running, so yeah, but thanks I learned something today.
Code:
$ cat /etc/*release*
NAME=Slackware
VERSION="14.2"
ID=slackware
VERSION_ID=14.2
PRETTY_NAME="Slackware 14.2"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:14.2"
HOME_URL="http://slackware.com/"
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
how to get that using cat... in case I forget. as long as I do not forget this.
 
Old 05-01-2018, 07:18 AM   #6
bgstack15
Member
 
Registered: Jul 2017
Distribution: korora
Posts: 90

Rep: Reputation: Disabled
Code:
uname -r
And cat /etc/*release as already mentioned.

If the distro doesn't have an indicator in the kernel, I either already know why I'm using that specific kernel build, or I'm not touching it in the first place.
 
Old 05-01-2018, 11:17 AM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by bkelly View Post
followed by a decimal dotted version number,
"Major, Minor:Micro" from back in the day.
Lately it seems to stand for "Major,Minor:Patch"

Quote:
Originally Posted by bkelly View Post
every version of linux
has nothing to do with Debian 9.4
Code:
sudo apt-get install -y debian-handbook
It's free and I still bought the book. I don't even use Debian and the last thing I need is another computer book.
It is very concise.

http://www.fifi.org/doc/debian-polic...-versions.html may help.

Last edited by Habitual; 05-01-2018 at 11:25 AM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Port number is changing dynamically for each Authentication request in RHEL ghvijayakumar Linux - Newbie 4 01-13-2012 05:14 AM
Port number is changing dynamically for each Authentication request in RHEL ghvijayakumar Linux - Networking 1 01-11-2012 07:42 AM
LXer: Nokia Moves To Quash Barnes & Noble's Letter of Request the ITC Sent to Finland Re Discovery LXer Syndicated Linux News 0 01-09-2012 11:00 AM
How to get minor number in block driver transfer request cjlinux Linux - Newbie 0 03-09-2009 10:26 AM
svc: bad direction *some number*, dropping request?? zovres Linux - Newbie 1 02-21-2004 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:28 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration