Your First Termux Commands: pwd, ls, cd, clear and pkg search
You already installed Termux from F-Droid. This lesson is your first five minutes in the shell: where you are (pwd), what’s here (ls), how to move (cd), how to clear the screen, and how to search packages with pkg search. Assumes F-Droid Termux is open and you see a prompt like ~ $.
What You Need
- Termux installed from F-Droid only (see Install Termux via F-Droid).
- Internet optional for this lesson (needed later for
pkg searchindex freshness).
Navigate the Termux home
Step 1: See where you are with pwd
Type and press Enter:
pwd
You’ll get a long path under Termux’s private app storage (often ending in
.../files/home). That folder is your home—Android file managers usually can’t browse it until you set up shared storage.Step 2: List files with ls
Run:
ls ls -la
lslists names;ls -laadds hidden files (names starting with.) and permissions. A fresh home may look nearly empty—that’s normal.Step 3: Change directory with cd
Move into Termux’s
usrtree briefly, then return home:cd $PREFIX pwd ls cd ~ pwd
$PREFIXis where Termux installs packages.cd ~(or justcd) always brings you back home. Usecd ..to go up one level.Step 4: Clear the screen
When the scrollback gets noisy:
clear
Or press Ctrl+L on a hardware keyboard. History still exists—this only cleans the view.
Step 5: Search packages with pkg search
Prefer the wiki’s
pkgwrapper over rawapt. Search without installing:pkg search git pkg search python pkg search nano
You’ll see matching package names from Termux’s repos. Next lesson: install them with
pkg install.
Official docs
- Package management (
pkg search): wiki.termux.com/wiki/Package_Management - Getting started: wiki.termux.com/wiki/Getting_started