2

I ran uname -a but I still have no clue what distro this is. The result:

Linux (none) 3.18.0 #4 Sun May 29 03:28:04 CEST 2016 i686 GNU/Linux

All I can get from that is that it has a i686 processor, and runs the Linux 3.18.0 kernel.

Any help is appreciated, and thank you all in advance!

ddnomad
  • 1,978
  • 2
  • 16
  • 31

2 Answers2

3

Try this:

$ hostnamectl | grep "Operating System"

If that doesn't return an answer, do this:

$ ls -l /etc/*-release

It will output something like this:

-rw-r--r--. 1 root root  38 Nov 30 02:12 /etc/centos-release
-rw-r--r--. 1 root root 393 Nov 30 02:12 /etc/os-release
lrwxrwxrwx. 1 root root  14 Feb 28 18:40 /etc/redhat-release -> centos-release
lrwxrwxrwx. 1 root root  14 Feb 28 18:40 /etc/system-release -> centos-release
Alxs
  • 2,200
  • 3
  • 21
  • 31
  • While correct, this only works on systemd based *NIX systems. – 0xSheepdog Apr 20 '17 at 17:16
  • @0xSheepdog, yep, but we're guessing here as we don't know what he runs. :) – Alxs Apr 20 '17 at 17:17
  • Sure. So why not go with something that is going to be useful on a larger number of systems? Nothing wrong with hostnamectl, but its not standard on any Enterprise Linux system older than 7x, and whenever the Debians went over to systemd. It won't work at all on *BSD afaik. – 0xSheepdog Apr 20 '17 at 17:21
  • @0xSheepdog because of the kernel release he provided and the likelihood of anything that recent being systemd is pretty high and it can return a precise answer. It beats giving him a list of individual files to look for; you could have at least provided him a glob. – Alxs Apr 20 '17 at 17:29
  • @don_crissti If he is running something. This looks more like more homework, 2016? – Rui F Ribeiro Apr 20 '17 at 17:31
  • 2
    @don_crissti A Google search was enough; if not the amount of getting it right with the amount of noise/ratio this group gets with beginner kali questions would make me what, a 50% change of getting it right? – Rui F Ribeiro Apr 20 '17 at 17:35
  • This worked, it turned out it was just buildroot. – Joshua Herron Mar 11 '18 at 15:41
2

Common ways to identify a modern UNIX like system include looking in the following:

/etc/system-release
/etc/system-release-cpe
/etc/os-release
/etc/redhat-release
/etc/centos-release
...
Etc ad naseum.

More info can be found here: CPE dictionary

It will vary depending on distribution, version, etc.

0xSheepdog
  • 2,750