1

I installed the tree command today on Ubuntu 18.04 using:

$ sudo apt update
$ sudo apt install tree

The version that was installed is:

$ tree --version
tree v1.7.0 (c) 1996 - 2014

But I see from here the latest version is 1.8.0

How can I install the latest version of tree? More generally, how can I ensure the latest versions of programs get installed?

Kulfy
  • 17,696
cjt
  • 143

2 Answers2

1

You can use either of the two methods to install tree 1.8.0:

  1. Using Snap:

    Tree is available as a snap package too. You can install it using

    snap install tree
    

    Verify version:

    tree --version
    
  2. Installing deb package:

    Tree 1.8.0 is packed in Ubuntu 19.04 (Disco Dingo). Tree 1.8.0 depends on lib6 (>=2.17). In 18.04 lib6 v2.27 is available. You can download the deb package from Ubuntu pool and install that using dpkg.

    • Download deb package:

      wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/t/tree/tree_1.8.0-1_amd64.deb
      
    • Install using dpkg:

      sudo dpkg -i tree_1.8.0-1_amd64.deb
      
    • Install any left dependency:

      sudo apt install -f
      
    • Verify version:

      tree --version
      

      You must get an output like:

      tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro 
      

Further Reading:

Kulfy
  • 17,696
1

Download the source package.

decompress the source package. Change directory into the tree-1.8.0 directory open a terminal, and type make

from the INSTALL File in tree-1.8.0 source:

Installation instructions:

  1. Edit the Makefile for your OS. Comment out the Linux options and un-comment the options for your OS.
  2. Type: make
  3. Type: make install
  4. Enjoy colorful directory trees.

you may find it necessary to run sudo make install if you see "permission denied", do that. I also looked at the MakeFile, you shouldnt have to change anything, just go to step 2, and give the make command. if you get errors, update your post.

j0h
  • 14,825