5. Understanding the Termux Environment and Home Directory
When you launch Termux, you land in your Home Directory. Understanding the file system hierarchy is fundamental to working in Linux.
The Home Directory (~)
In Termux, your personal working area is represented by ~ (tilde).
- Absolute Path:
/data/data/com.termux/files/home - Symbolic Path:
~
This is where you will store your scripts, projects, configuration files, and downloaded content.
Key Directories in Termux
Although Termux runs in a sandbox, it mimics a standard Linux file system structure:
| Directory | Purpose |
|---|---|
/bin | Essential executables (commands) |
/usr/bin | Additional user binaries |
/etc | System-wide configuration files |
/tmp | Temporary files |
/data/data/.../files/home | The user's home directory (~) |
/data/data/.../files/usr | Where packages are installed |
The PATH Variable
The PATH variable tells the shell where to look for executable programs. In Termux, when you type ls, the system searches the directories listed in PATH (like /bin and /usr/bin) until it finds the ls program.
Command to view your current directory:
bash $ pwd /data/data/com.termux/files/home
Command to list environment variables (including PATH):
bash $ printenv | less
We will explore navigating these directories in the next lesson.