How to install Tree on Ubuntu 17.04

To install Tree on Ubuntu 17.04   

Tree is Linux command that is used to view the contents of a specified directory. It will list the contents of the directory that is linked in tree like structure. When the directory arguments are given, tree will list all the files and directories in the given parent directory. This tutorial explains the installation of Tree on Ubuntu 17.04. 


Installation procedure

To proceed with the installation procedure, add the repo in the target system by running the following command. 

root@linuxhelp1:~# add-apt-repository ppa:eugenesan/ppa
 This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted.

| Disclaimer:
* Packages in this a nd related PPAs are for personal use only.
  They developed specifically for several custom environments and may not work for you.
* Usage of packages in this PPA, in some forms, might contradict licenses of software
  packaged in this and related PPAs. End users and administrator are responsible for
  runtime licensing and possible legal consequences.
* Some packages provided with their dependencies while some might require additional
  Ubuntu repositories and external PPAs. Below is the list of

| To add this repository, to your Ubuntu installation, invoke:
$ sudo add-apt-repository ppa:eugenesan/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmppatt4lru/pubring.gpg' created
gpg: /tmp/tmppatt4lru/trustdb.gpg: trustdb created
gpg: key E61380B28313A596: public key "Launchpad synergy+" imported
gpg: Total number processed: 1
gpg:               imported: 1

The repositories are successfully added. Now update the repo by executing the apt-get update command

root@linuxhelp1:~# apt-get update
Hit:1 zesty InRelease                           
Hit:2 zesty-security InRelease                    
Hit:3 zesty-updates InRelease       
Get:4 zesty InRelease [15.4 kB]
Hit:5 zesty-backports InRelease                 
Get:6 zesty/main amd64 Packages [4,192 B]
Get:7 zesty/main i386 Packages [4,192 B]
Get:8 zesty/main Translation-en [3,288 B]
Fetched 27.0 kB in 3s (7,526 B/s)
Reading package lists... Done

The target system has been updated with the required repositories. Install the tree package by running the following command and press y to continue. 

root@linuxhelp1:~# apt-get install tree -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 246 not upgraded.
Need to get 40.7 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Get:1 zesty/universe amd64 tree amd64 1.7.0-5 [40.7 kB]
Fetched 40.7 kB in 2s (16.1 kB/s)
Selecting previously unselected package tree.
(Reading database ... 170562 files and directories currently installed.)
Preparing to unpack .../tree_1.7.0-5_amd64.deb ...
Unpacking tree (1.7.0-5) ...
Setting up tree (1.7.0-5) ...
Processing triggers for man-db ( ...

The tree package has been installed successfully. To use the package, enter the following command and it lists the files and directories stored in the given parent directory. 

root@linuxhelp1:~# tree /etc
??? acpi
?   ???
?   ???
?   ??? events
?   ?   ??? asus-keyboard-backlight-down
?   ?   ??? asus-keyboard-backlight-up
?   ?   ??? asus-wireless-off
?   ?   ??? asus-wireless-on
?   ?   ??? ibm-wireless
?   ?   ??? lenovo-undock
?   ?   ??? powerbtn
?   ?   ??? thinkpad-cmos
?   ?   ??? tosh-wireless
??? xml
?   ??? catalog
?   ??? catalog.old
?   ??? xml-core.xml
?   ??? xml-core.xml.old
??? zsh_command_not_found

351 directories, 2692 files

The installation of tree package on Ubuntu 17.04 is done without any glitches. 

Thank you! for using Linux Help.

You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website
Be the first to comment, we value your suggestions. For further queries please comment below.

Tags: Ubuntu Tree command
user image Author :  Mason