BYTESLIP ← Back
Knowledge Base // Tutorial 54 · Termux

Your First Termux Commands: pwd, ls, cd, clear and pkg search

Difficulty: Easy ~5–10 min Termux · F-Droid

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 ~ $.

Termux first commands~ $ pwd/data/data/com.termux/files/home~ $ ls · cd · clear · pkg searchEASY · FIRST COMMANDS
Checklist // Before You Start

What You Need

Walkthrough // Steps

Navigate the Termux home

  1. 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.

  2. Step 2: List files with ls

    Run:

    ls
    ls -la

    ls lists names; ls -la adds hidden files (names starting with .) and permissions. A fresh home may look nearly empty—that’s normal.

  3. Step 3: Change directory with cd

    Move into Termux’s usr tree briefly, then return home:

    cd $PREFIX
    pwd
    ls
    cd ~
    pwd

    $PREFIX is where Termux installs packages. cd ~ (or just cd) always brings you back home. Use cd .. to go up one level.

  4. 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.

  5. Step 5: Search packages with pkg search

    Prefer the wiki’s pkg wrapper over raw apt. 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.

Pro Tip
Sources // Verified

Official docs

← All Tutorials Install Termux (F-Droid) Termux tutorials