getting linux distro used...

D

deostroll

Hi,

I just found that you could use platform.system() to get the
underlying os used. But is there a way to get the distro used...?

--deostroll
 
R

r-w

deostroll said:
Hi,

I just found that you could use platform.system() to get the
underlying os used. But is there a way to get the distro used...?

--deostroll

platform.dist() returns
('debian', 'lenny/sid', '')
on my Ubuntu box.

Ross
 
J

JanC

deostroll said:
I just found that you could use platform.system() to get the
underlying os used. But is there a way to get the distro used...?

Major modern distros support 'lsb_release', I suppose:

$ lsb_release -i -r -c -d
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty


If that doesn't work; try '/etc/issue'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top