I'm following this guide to set up Home Assistant on HASSbian on a Raspberry Pi 3. Then it throws this at me:

If you’re on Debian or Ubuntu, you might have to install the packages for arp and nmap. Do so by running $ sudo apt-get install net-tools nmap. On a Fedora host run $ sudo dnf -y install nmap.

How do I know which one I'm on? I can't remember having come across any of these names during the process so far.

  • You could just run each command one will work, one will not. Then you'd know what flavor you're running... Commented Mar 7, 2017 at 22:14
  • Ok. Thanks, @ElefantPhace. I wasn't sure if a Debian package would interfere with the Fedora package somehow, or vice versa.
    – Henrik
    Commented Mar 8, 2017 at 7:08
  • Impossible, you'll either have apt-get or dnf but not both. You'd only be able to install the package that's available for your distribution Commented Mar 8, 2017 at 14:40
  • Relevant XKCD for that approach xkcd.com/1654 :)
    – mattdm
    Commented Mar 8, 2017 at 20:51

2 Answers 2


Based on the name HASSbian, you are likely on a Debian derivative.

You can get the name of the distrubution with the following command line command:

cat /etc/*-release

Note this will likely return HASSbian. However if you look at the VERSION line it will likely return Jessie or Wheezy (these are Debian releases).

Assuming my assumption is correct you would follow the commands for Debian.


On recent versions of all of these Linux distributions, which all run systemd, the best way is to run the command hostnamectl:

$ hostnamectl 
   Static hostname: jrcitizen.example.org
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 519ed96bb6cb4bb695ebb9630707999a
           Boot ID: 9fbb67db78ba46fc9394db5c06c979a5
  Operating System: Fedora 25 (Workstation Edition)
       CPE OS Name: cpe:/o:fedoraproject:fedora:25
            Kernel: Linux 4.9.7-201.fc25.x86_64
      Architecture: x86-64

and look at the Operating System line. Or, you can look in the file /etc/os-release, you will see something similar in the line PRETTY_NAME:

$ grep NAME /etc/os-release 
PRETTY_NAME="Fedora 25 (Workstation Edition)"
  • Here is the OS line i get: Operating System: Raspbian GNU/Linux 8 (jessie). Doesn't really tell which of the three.
    – Henrik
    Commented Mar 11, 2017 at 6:43
  • 1
    @Henrik, that's because it isn't one of the three. It is Raspian, which is a Debian-derived distro (as is Ubuntu, for that matter).
    – mattdm
    Commented Mar 11, 2017 at 22:22
  • It's possible that ID_LIKE will be set to debian, but that's not mandatory.
    – mattdm
    Commented Mar 11, 2017 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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