Skip to main content
1 of 2
Mat
  • 54.9k
  • 11
  • 164
  • 143

I'd go with this as a first step:

ls /etc/*release

Gentoo, RedHat, Arch & SuSE have a file called e.g. /etc/gentoo-release. Seems to be popular, check this site about release-files.

Debian & Ubuntu should have a /etc/lsb-release which contains release info also, and will show up with the previous command.

Another quick one is uname -rv. If the kernel installed is the stock distro kernel, you'll usually find the name in there.

Mat
  • 54.9k
  • 11
  • 164
  • 143