I tried to install TREE via the sudo apt-get install tree command but nothing but an error happens ("sudo: apt-get: command not found"). How do I fix this?

  • Could you post what errors apt-get writes? – Mathieu Dec 11 '15 at 11:51
  • Whick kind of error? It could be about permissions, dependencies, etc. – jcbermu Dec 11 '15 at 11:51
  • @jcbermu sudo: apt-get: command not found – Ergkjr Dec 11 '15 at 11:59
  • 1
    If its custom build linux system, it may not even have a package management system, you may have to build all software from sources. You can find sources for tree from here mama.indstate.edu/users/ice/tree . – StefanR Dec 11 '15 at 12:17
  • 1
    Then let's hope a compiler is installed :). Or check if at least wget or curl is installed, so you can download the binaries. – Daniel Dec 11 '15 at 12:25


A system built on Linux is called a "distribution".

Distribution examples:

  • Ubuntu
  • Debian
  • Fedora
  • Arch
  • OpenSuse
  • ...

To install a software on a distribution, you have several possibilities:

  • Build the software from source,
  • Install the program with a "package manager".

Package manager

Almost each distribution use one package manager, most known are:

  • apt-get (debian, ubuntu)
  • pacman (arch)
  • yum (fedora)
  • ...

Each package manager has its syntax, type man <package manager>.

Build from source

It will depends on the software you want to install, but in most cases:

  • get the sources:
    • go to software web page
    • download the source (.tar.gz, .tgz, .zip... file)
    • uncompress it
  • build it:

    # in software source directory
    make install
  • Okay, so I presume that I download the source because everything else doesn't work? – Ergkjr Dec 11 '15 at 12:21
  • I think so. Downloald the tgz file from tree site (StefanR gives you the link), unzip it, and try to build it. – Mathieu Dec 11 '15 at 12:24
  • I also often install things from source on Debian, even althought that distro has a very nice pacakge management. I do it because when I install from source I get newer versions and features. – Daniel Dec 11 '15 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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