Tree is a simple Linux command-line tool that displays files and folders in a tree-like structure. It makes it easier to explore directories, understand folder layouts, and organize files. You can install and use Tree in Termux to view your Android file system from the terminal using simple commands.
Here’s what you can do with Tree in Termux:
- Display files and folders in a tree structure.
- View directory contents easily.
- Show hidden files and folders.
- Limit the directory depth.
- Display only directories.
- Check files and directory sizes.
Install Tree in Termux
Below are the simple commands to install Tree in Termux. Copy and run each command one by one to install the tool.
Update Termux packages.
pkg update && pkg upgrade -yInstall Tree.
pkg install tree -yCheck the installed version.
tree --versionTree is now installed and ready to use.
Use Tree in Termux
After installing Tree in Termux, you can use different commands to view files and folders in a tree structure. Below are some useful commands that help you navigate and organize directories.
Display the current directory.
treeDisplay a specific directory.
tree /sdcardShow only directories.
tree -dDisplay hidden files and folders.
tree -aLimit the directory depth to two levels.
tree -L 2Display full file paths.
tree -fShow file sizes.
tree -sDisplay file permissions.
tree -pSave the output to a text file.
tree > tree-output.txtDisplay help information.
tree --helpChoose the command you want and Tree will display your files and folders inside the Termux terminal.
End Note
Tree is a useful command-line tool for viewing files and folders in a clear tree structure. It makes it easier to understand directory layouts, organize files, and navigate the file system directly from the Termux terminal.

