FUNDAMENTALS

Termux Basics

Learn the essential commands for file management, package installation, and terminal navigation. The foundation for everything in Termux.

Package Management

2 commands

Update & Upgrade

Update package lists and upgrade all installed packages to latest versions

$ pkg update && pkg upgrade

Install a Package

Install any package from Termux repositories

$ pkg install <package-name>

Files & Directories

10 commands

List Files

List all files and folders in the current directory

$ ls

Change Directory

Navigate into a folder or directory

$ cd <folder>

Go Back a Directory

Move up one level in the directory hierarchy

$ cd ..

Create Directory

Create a new folder

$ mkdir <folder>

Create Empty File

Create a blank file quickly

$ touch <filename>

View File Contents

Display the complete contents of a text file

$ cat <file>

Move or Rename File

Move a file to another location or rename it

$ mv <source> <destination>

Copy File

Create a duplicate of a file

$ cp <source> <destination>

Delete File

Permanently remove a file

$ rm <file>

Delete Directory

Remove a directory and all its contents recursively

$ rm -rf <folder>

Text Editing

1 commands

Open Nano Editor

Edit text files using the Nano text editor

$ nano <file>

Utilities

2 commands

Clear Terminal

Clear the terminal screen and remove all text

$ clear

Help

View detailed help and options for any command

$ <command> --help

💡 Beginner Tips

  • • Use pwd to check your current directory location
  • • Always use ls to see what files are in a directory before operating on them
  • • Use --help flag on any command to learn more about it
  • • Be careful with rm - deleted files cannot be recovered easily
  • • Use tab key for auto-completion while typing commands
  • • Regular pkg update && pkg upgrade keeps your system secure