Any command to know the version of debian?

If none of the more specific forums is the right place to ask

Any command to know the version of debian?

Postby cola » 2009-05-04 18:54

Hi,
Is there any command to know the version of debian installed like debian 5.0.1 or something like that?
User avatar
cola
 
Posts: 180
Joined: 2009-03-09 21:28
Location: Dhaka,Bangladesh

Re: Any command to know the version of debian?

Postby debil » 2009-05-04 19:05

Code: Select all
$ lsb_release -a
User avatar
debil
 
Posts: 470
Joined: 2008-05-11 08:55
Location: Esperantujo

Re: Any command to know the version of debian?

Postby cola » 2009-05-04 19:14

debil wrote:
Code: Select all
$ lsb_release -a

Code: Select all
bash: lsb_release: command not found
User avatar
cola
 
Posts: 180
Joined: 2009-03-09 21:28
Location: Dhaka,Bangladesh

Re: Any command to know the version of debian?

Postby debil » 2009-05-04 19:16

Code: Select all
$ cat /etc/debian_version
User avatar
debil
 
Posts: 470
Joined: 2008-05-11 08:55
Location: Esperantujo

Re: Any command to know the version of debian?

Postby cola » 2009-05-05 02:01

debil wrote:
Code: Select all
$ cat /etc/debian_version

Thanks debil.
User avatar
cola
 
Posts: 180
Joined: 2009-03-09 21:28
Location: Dhaka,Bangladesh

Re: Any command to know the version of debian?

Postby craigevil » 2009-05-05 03:01

$ cat /etc/issue
Debian GNU/Linux squeeze/sid \n \l


$ cat /etc/debian_version
squeeze/sid

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux unstable (sid)
Release: unstable
Codename: sid

lsb_release is a python module ,
$ locate lsb_release
/usr/bin/lsb_release
/usr/lib/pymodules/python2.5/lsb_release.py
/usr/lib/pymodules/python2.5/lsb_release.pyc
/usr/share/man/man1/lsb_release.1.gz
/usr/share/python-support/lsb-release/lsb_release.py
Debian Sid LXDE Kernel 2.6.32 Pentium 4 CPU 2.80GHz nVidia G96 [GeForce 9400 GT]
Debian - "If you can't apt-get something, it isn't useful or doesn't exist"
Giant Debian sources.list Debian upgrade script smxi
User avatar
craigevil
 
Posts: 1570
Joined: 2006-09-17 03:17
Location: Hades

Re: Any command to know the version of debian?

Postby drakeman » 2009-05-05 03:01

cola wrote:
debil wrote:
Code: Select all
$ lsb_release -a

Code: Select all
bash: lsb_release: command not found


The command lsb_release -a works fine, but if you are not root you should
Code: Select all
sudo lsb_release -a


Regards!
drakeman
 
Posts: 88
Joined: 2008-11-19 16:46

Re: Any command to know the version of debian?

Postby jalu » 2009-05-05 03:10

not here:
Code: Select all
lets_rock$ apt-cache search lsb_release
lets_rock$ su
Password:
ROOT # lsb_release -a
bash: lsb_release: command not found
ROOT # cd /usr/lib/pymodules/python2.5/;ls
cairo         ecm           pygtk.py
dbus         ecsm-0.6.0.egg-info  pygtk.pyc
dbus_bindings.py   gtk-2.0           python_xlib-0.12.egg-info
dbus_bindings.pyc   istanbul        reportbug
_dbus_bindings.so   libtorrent.so        reportbug-4.2.egg-info
_dbus_glib_bindings.so   libxml2mod.so        selinux
deluge         libxml2.py        xdg
deluge-1.1.6.egg-info   libxml2.pyc        Xlib
drv_libxml2.py      ORBit.so
drv_libxml2.pyc      pygtk.pth
ROOT # exit

greetings
jalu
 
Posts: 1397
Joined: 2008-11-19 23:26

Re: Any command to know the version of debian?

Postby debil » 2009-05-05 05:14

drakeman wrote:The command lsb_release -a works fine, but if you are not root you should
Code: Select all
sudo lsb_release -a

Code: Select all
$ which lsb_release
/usr/bin/lsb_release

It should work alright run as a normal user as well.
User avatar
debil
 
Posts: 470
Joined: 2008-05-11 08:55
Location: Esperantujo

Re: Any command to know the version of debian?

Postby jalu » 2009-05-05 10:55

but of what package is it a part? as said, not everybody has got it
(on buntu it is default, but on debian it doesn`t seem to be :roll: )
jalu
 
Posts: 1397
Joined: 2008-11-19 23:26

Re: Any command to know the version of debian?

Postby Qew » 2009-05-05 11:46

We find out what package /usr/bin/lsb_release belongs to (package name is the left entry).

Code: Select all
~$ apt-file search lsb_release
lsb-release: /usr/bin/lsb_release
lsb-release: /usr/share/man/man1/lsb_release.1.gz


We find out that it's not installed on the machine (the first "p" suggests it isn't installed, an "i" would suggest it's installed, a "c" would suggest it used to be installed, but its configuration files were kept after it was previously removed).

Code: Select all
~$ aptitude search lsb-release
p   lsb-release                     - Linux Standard Base version reporting...


We now install it (as root, naturally).

Code: Select all
aptitude install lsb-release


All done.
User avatar
Qew
 
Posts: 228
Joined: 2007-04-26 14:45

Re: Any command to know the version of debian?

Postby jalu » 2009-05-05 13:07

each to his own goes the saying, but instead of installing apt-file to find out what i need to install to run lsb_release and then installing lsb-release to find out what version i run, i`d prefer using cat /etc/debian_version.
that said i`ll have a look at apt-file
{post-edit, due to Qew`s following post: btw, quite a good hint for me}
Last edited by jalu on 2009-05-05 16:25, edited 3 times in total.
jalu
 
Posts: 1397
Joined: 2008-11-19 23:26

Re: Any command to know the version of debian?

Postby Telemachus » 2009-05-05 14:07

drakeman wrote:
cola wrote:
debil wrote:
Code: Select all
$ lsb_release -a

Code: Select all
bash: lsb_release: command not found


The command lsb_release -a works fine, but if you are not root you should
Code: Select all
sudo lsb_release -a

Most of the folks here prefer su to sudo. More importantly, sudo is (1) often not installed on a Debian system (if you do a minimal installation) and (2) if it is installed (via the Desktop task during installation, perhaps), it is still not set up as it is on Ubuntu.

Bottom line: you are probably better off recommending su rather than sudo on this board, since su should be installed and working on any standard Debian system, but sudo is not.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thomspon, The UNIX Time-Sharing System
User avatar
Telemachus
 
Posts: 3927
Joined: 2006-12-25 15:53

Re: Any command to know the version of debian?

Postby Qew » 2009-05-05 16:12

jalu wrote:each to his own goes the saying, but instead of installing apt-file to find out what i need to install to run lsb_release and then installing lsb-release to find out what version i run, i`d prefer using cat /etc/debian_version.
that said i`ll have a look at apt-file.


My own preference would have been cat /etc/debian_version, too, it's just that you asked what package was lsb_release part of, so I answered your request. Yes, each to their own... even if their own is the same as yours. ;)
User avatar
Qew
 
Posts: 228
Joined: 2007-04-26 14:45


Return to General Questions

Who is online

Users browsing this forum: No registered users and 2 guests