4

I have an unknown (let's assume uname -a returns nothing) Linux distribution I have root access to.

How can I verify, looking at file structure, that it is based on Debian?

5

You can view if a file called /etc/debian_version exists.

$ cat /etc/debian_version
wheezy/sid

If it exists, you also can see the version of debian. Also distributions like Ubuntu, Linux Mint, and so on, which are based on Debian have that file.

Actually most distributions have a release file you can also try and see what comes out:

cat /etc/*release
1

This does not concern the filesystem structure, but you could check whether the apt-get (Debian) or the yum (non-Debian) package management commands are installed.

1

Try to first look if a /etc/debian_version exists. It should be there if it's a Debian based distro.

Usually, looking for apt files could give a clue. For instance, look at the conf in /etc/apt/ or if a /var/cache/apt/ exists.

Unforunately, apt can be setup on another distro, or an admin could have set dummy files or directories for some compatibility reasons...

As stated in one answer of this post, the best would be to try to run:

 dpkg-vendor --derives-from Debian
1

Check for the existance of /etc/debian_version.

Or you could use lsb_release -a.

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