[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

cat /etc/debian_version returns stretch/sid instead of version

Posted on 2016-08-16
12
Medium Priority
?
891 Views
Last Modified: 2016-08-17
subject
0
Comment
Question by:Taras Shumylo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41758005
So what is your question?

Try hostnamectl instead.

Or cat /etc/issue
0
 

Author Comment

by:Taras Shumylo
ID: 41758010
I need that cat /etc/debian_version returns version of debian instead of stretch/sid or I need other way of knowing debian version.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41758026
Tried the 2 suggestions above?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Expert Comment

by:Dan Craciun
ID: 41758409
@Gerwin: /etc/issue is for Ubuntu. Does not work on Debian.
What's hostnamectl got to do with Debian version?


@Taras:
apt-get install lsb_release
lsb_release -a

Open in new window

Result:
Distributor ID: Debian
Description:    Debian GNU/Linux 7.9 (wheezy)
Release:        7.9
Codename:       wheezy

Open in new window



HTH,
Dan
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41758471
Hi Dan, about your remark:  /etc/issue is for Ubuntu. Does not work on Debian.

It does work on my Debian installation:

root@bpi ~ # cat /etc/issue
Debian GNU/Linux 8 \n \l

And Debian with systemd (https://wiki.debian.org/Debate/initsystem/systemd) has hostnamectl which (without parameters) will show hostname, OS etc.
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 41758498
You're right. Tested now in Debian 8 and it works.

I've stuck with Debian 7 for my VMs. Don't feel the need for systemd yet...
0
 

Author Comment

by:Taras Shumylo
ID: 41759428
I do not have root access to the system.
cat /etc/issue does return
Debian GNU/Linux stretch/sid \n \l

Open in new window

0
 

Author Comment

by:Taras Shumylo
ID: 41759431
Running hostnamectl return
Failed to create bus connection: No such file or directory

Open in new window

0
 

Author Comment

by:Taras Shumylo
ID: 41759433
What does this stretch/sid even mean?
0
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 2000 total points
ID: 41759621
It means you're on the testing branch (stretch, or Debian 9), possibly (but not necessarily) with unstable packages (from sid).

See the changelog here: https://sources.debian.net/src/base-files/9.6/debian/changelog/

"* Changed issue, issue.net, debian_version and os-release to read
    "stretch/sid", and dropped VERSION and VERSION_ID from os-release."
1
 

Author Closing Comment

by:Taras Shumylo
ID: 41759659
That awesome man, thank you!
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 41759729
You're welcome. Glad I could help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question