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

subject
Taras ShumyloAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Gerwin Jansen, EE MVETopic Advisor Commented:
Tried the 2 suggestions above?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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
Dan CraciunIT 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Taras ShumyloAuthor Commented:
That awesome man, thank you!
0
Dan CraciunIT ConsultantCommented:
You're welcome. Glad I could help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

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.