tree command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
tree: command not found
or when using sudo you get the following error message
sudo: tree: command not found
Solutions to tree: command not found
How To Fix tree: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu tree is provided by tree package.
tree is:
Tree is a recursive directory listing command that produces a depth indented listing of files, which is colorized ala dircolors if the LS_COLORS environment variable is set and output is to tty.
To fix this problem, we can install more using the command below.
sudo apt-get -y install tree
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install tree.
sudo apt -y install tree
Or if you have aptitude installed you can use the following command.
sudo aptitude install tree
Summary
In this tutorial we learn how to fix tree command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.