I rooted a HTC Wildfire S device recently and flashed an Android 4.1.2 AOKP Jelly Bean Custom ROM. One benefit is that I can use the terminal now.

I'm a little used to using terminal emulators on desktop machines but never did that on an Android device before. I noticed some commands are not found, for example:

$ tree
/system/bin/sh: tree: not found

Is there a way to add more commands to my device, maybe a bundle of GNU packages for Android available somewhere?

  • Lists of items are not generally a good fit for Stack Exchange. If you have a specific problem with concrete answer, please feel free to ask it. May 26, 2013 at 8:52
  • I tried to improve my question.
    – q9f
    May 26, 2013 at 9:18

3 Answers 3


Yes that's possible with the termux terminal.

Homepage | Google Play

You can install additional shell commands using apt.

$ apt update
$ apt upgrade
$ apt install tree


using termux

Bonus: Also works on non-rooted devices!

  • 1
    Termux only works on >= Lollipop devices
    – Caio Lucas
    Jul 26, 2016 at 21:09

tree command is not instaled by default. I don't know how to install it in android via terminal but you could allways use the ls command, but yes it doesn't show you a tree format that it is easy to understand, but still does the job.

ls -d */

Only list the directories in the current directory.

ls -ltr

List all files by the time they were last modified in reverse order. In other words the last files listed are the most recently modified files.

I will try and find a way to install the tree package. If i find something I will let you know.

Also install busybox to have more unix command avaible. Reference


Isn't even installed on Ubuntu by default.

That said, you can install BusyBox on non CyanogenMod ROMs that lack common utilites. YMMV, but on most "stock" ROMs seem to lack the utilities. AFAIK Busybox doesn't include tree.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .