Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Back in my (sucky) Windows days, I used the tree command to view the file hierarchy in a pretty display. I am aware of the find command, but to actually process any data in my clogged 241,416 folders/files from just checking each line is as possible as time travelling...


Output of find on one folder holding the files of a one-file, incomplete C++ project

On Windows, the tree command gave a diagram-like output that is human readable

Screenshot of tree command in command prompt Screenshot of the pretty tree command

So, my question is, is there anything graphically close to the Windows/DOS tree command?

share|improve this question

marked as duplicate by Sylvain Pineau, Radu Rădeanu command-line Jun 15 '14 at 12:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

there's a tree command for linux – Tatakai Wasumi Jun 14 '14 at 18:37
@SylvainPineau Yes, by to search for it, it didn't have very similar wording, plus, Stack Exchange's search engines are so embarrassingly awful – user280208 Jun 15 '14 at 9:41
up vote 9 down vote accepted

Same command exist. To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install tree

enter image description here

share|improve this answer
I know how to open up the Terminal ;-) – user280208 Jun 14 '14 at 18:46
@Abdullah0v0 Nothing wrong with extra information ;) Besides, someone else who reads the question/answer might need that tip ;) – Dan Jun 14 '14 at 20:09
For better convenience, I'd pair tree with less when using it for easier scrolling functionality. $ tree | less – Dan Jun 14 '14 at 20:12
@Dan Excellent tip, you should edit it into your answer... – user280208 Jun 14 '14 at 21:02
@Dan Even better: tree -C | less -R preserves colours. – Bakuriu Jun 15 '14 at 7:50

You have tree command in linux. All you have to do is install it. It works very similar to the one in windows.

sudo apt-get install tree

share|improve this answer