Solved

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

Posted on 2016-08-16
12
163 Views
Last Modified: 2016-08-17
subject
0
Comment
Question by:Taras Shumylo
  • 5
  • 4
  • 3
12 Comments
 
LVL 37

Expert Comment

by:Gerwin Jansen
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 37

Expert Comment

by:Gerwin Jansen
ID: 41758026
Tried the 2 suggestions above?
0
 
LVL 34

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 37

Expert Comment

by:Gerwin Jansen
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 34

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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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 34

Accepted Solution

by:
Dan Craciun earned 500 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 34

Expert Comment

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

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
linux installs 6 49
CentOS/RHEL 7 Linux maillog worldwide readable 2 43
add some character at the end of line in vi 7 64
VMware Workstation 12 Player 16 42
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

864 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now