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

subject
Taras ShumyloAsked:
Who is Participating?
 
Dan CraciunConnect With a Mentor IT ConsultantCommented:
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
 
Gerwin Jansen, EE MVETopic Advisor Commented:
So what is your question?

Try hostnamectl instead.

Or cat /etc/issue
0
 
Taras ShumyloAuthor Commented:
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
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Gerwin Jansen, EE MVETopic Advisor Commented:
Tried the 2 suggestions above?
0
 
Dan CraciunIT ConsultantCommented:
@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
 
Gerwin Jansen, EE MVETopic Advisor Commented:
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
 
Dan CraciunIT ConsultantCommented:
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
 
Taras ShumyloAuthor Commented:
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
 
Taras ShumyloAuthor Commented:
Running hostnamectl return
Failed to create bus connection: No such file or directory

Open in new window

0
 
Taras ShumyloAuthor Commented:
What does this stretch/sid even mean?
0
 
Taras ShumyloAuthor Commented:
That awesome man, thank you!
0
 
Dan CraciunIT ConsultantCommented:
You're welcome. Glad I could help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.