How to Install "Tree" with Command-Line?

How do I install "tree" via apt-get in Terminal? I have been trying to do apt-get update tree but nothing seems to happen.

Is it necessary to include sudo in the command?

1

Use this command in Terminal:

sudo apt-get install tree

The command apt-get update only updates the package lists. You need apt-get install and the package name to install a new package.

And yes, sudo is required as you need root privileges in order to install and remove software.

3
Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest