Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I am working on a perl script that must write configuration file. I need to know if the script is running on Ubuntu to set some Ubuntu-specific values (basically, disable the unified bar). The script cannot require any Perl packages that may not be present on user system.

How can I check if the system is Ubuntu or some other Linux distro?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can check contents of the /etc/lsb-release file.

share|improve this answer
Thanks, I did it this way. – Eugene Jun 22 '12 at 18:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.