mhd_sulu_786
โ† All posts
Guides21 August 2026

๐Ÿ“ฑ Termux Commands for Beginners: 50+ Essential Commands, Setup and Troubleshooting

By Muhammed Sulaiman T (WebDeveloper)

Termux turns an Android phone into a powerful command-line environment where users can learn Linux, run Python scripts, work with Git, manage files, connect to remote servers and experiment with development tools.

For beginners, however, opening Termux for the first time can be confusing. Commands may fail because the package repository has not been updated, storage permissions have not been enabled, or the installation is outdated.

This guide covers the most useful Termux commands for beginners and explains what each command does.

What Is Termux?

Termux is an Android terminal emulator and Linux environment. It allows users to work with command-line programs without requiring a traditional Linux computer.

Common uses include Linux learning, Python programming, Bash scripting, Git, SSH, file management, automation, development and server administration.

First Termux Commands

After installing a current Termux version from a maintained source, update the package repository:

pkg update

Upgrade installed packages:

pkg upgrade

You can also use:

pkg update && pkg upgrade

Enable Storage Access

One of the most useful Termux commands is:

termux-setup-storage

Android will request storage permission. After permission is granted, Termux creates storage shortcuts under:

~/storage

Inspect the available storage directories:

ls ~/storage

Basic Navigation Commands

Show the current directory:

pwd

List files:

ls

Show hidden files:

ls -la

Change directory:

cd Downloads

Move back:

cd ..

Return home:

cd ~

Create Files and Folders

Create a folder:

mkdir projects

Create a file:

touch notes.txt

Read a file:

cat notes.txt

Edit a file:

nano notes.txt

Copy and Move Files

Copy a file:

cp notes.txt backup.txt

Move a file:

mv backup.txt ~/storage/downloads/

Remove a file:

rm backup.txt

Use rm carefully because terminal deletion may not provide a recycle-bin confirmation.

Search Files

Find files by name:

find . -name "*.txt"

Search text:

grep "hello" notes.txt

Search recursively:

grep -r "keyword" .

Install Packages

Search for a package:

pkg search python

Install Python:

pkg install python

Install Git:

pkg install git

Install OpenSSH:

pkg install openssh

Install Nano:

pkg install nano

Install multiple packages:

pkg install python git openssh nano

Python on Termux

Install Python:

pkg install python

Check the version:

python --version

Start Python:

python

Test Python:

print("Hello from Termux")

Exit Python:

exit()

Create a Python file using Nano and execute it with:

python hello.py

Git on Termux

Install Git:

pkg install git

Check the version:

git --version

Clone an authorized repository:

git clone repository-url

Enter the project directory:

cd project-name

Check repository status:

git status

SSH From Android

Install OpenSSH:

pkg install openssh

Connect to an authorized server:

ssh username@server-address

SSH keys can provide stronger authentication than passwords. Never expose private SSH keys or copy them into untrusted applications.

Networking Commands

Show network interfaces:

ip addr

Show routes:

ip route

Test connectivity:

ping example.com

Make an HTTP request:

curl https://example.com

These commands are useful for learning networking concepts.

Download Files

Termux can use tools such as curl and wget.

Install wget:

pkg install wget

Download a file:

wget https://example.com/file.zip

Always verify the source before downloading executable files or scripts.

Environment Variables

Display the home directory:

echo $HOME

Display the PATH:

echo $PATH

Display environment variables:

env

Disk Space

Check filesystem usage:

df -h

Check current directory size:

du -sh .

Clear the Terminal

clear

Command History

history

Avoid putting passwords, API keys or other secrets directly into shell commands because they may remain in command history.

Common Termux Error: Package Not Found

If a package cannot be found, first update the repository:

pkg update

Then search again:

pkg search package-name

If a package is unavailable in the Termux repositories, avoid downloading random binaries from unknown websites.

Common Error: Permission Denied

For executable scripts, check permissions:

chmod +x script.sh

Then run:

./script.sh

For Android storage access, use:

termux-setup-storage

Common Error: Command Not Found

If a command is unavailable, search for the package that provides it:

pkg search command-name

Then install the appropriate package through Termux's package manager.

Can Termux Run Linux Desktop Environments?

Termux can be combined with additional software to provide graphical Linux environments, although this is more complex than using the standard terminal.

Beginners should first learn the terminal, file management, package management, Python and networking before attempting a graphical desktop setup.

Termux vs Kali Linux

Termux and Kali Linux serve different purposes. Termux is an Android terminal environment while Kali Linux is a security-focused Linux distribution designed for security auditing, penetration testing, digital forensics and related activities.

Feature Termux Kali Linux
Platform Android Linux PC or VM
Python Yes Yes
Git Yes Yes
SSH Yes Yes
Security tools Selected tools Extensive collection
Hardware access Android controlled Greater control
Best for Mobile Linux learning Full security labs

Is Termux Legal?

Termux is legitimate open-source software. The legality depends on how its tools are used. Programming, Linux learning, automation, SSH administration and authorized security testing are legitimate uses. Only test systems you own or have explicit permission to test.

Best Termux Learning Path

Start with file navigation and management, then learn package management, Python, Git, SSH and networking. After building these fundamentals, you can explore more advanced Linux and cybersecurity environments.

Final Thoughts

Termux is one of the easiest ways for Android users to begin learning Linux and programming. The most valuable skill is not memorizing hundreds of commands but understanding what each command does and how it interacts with the operating system.

Start with Linux basics, then move into Python, Git, SSH and networking. This creates a strong foundation for development, automation and cybersecurity learning.

Frequently Asked Questions

What are the most useful Termux commands for beginners?

Start with pwd, ls, cd, mkdir, touch, cat, cp, mv, rm, pkg, grep, find, chmod, python, git and ssh.

How do I update Termux packages?

Use pkg update to refresh package information and pkg upgrade to upgrade installed packages.

How do I access phone storage in Termux?

Run termux-setup-storage and allow the Android storage permission when prompted.

Can I run Python in Termux?

Yes. Install Python with pkg install python and run Python scripts directly from the Termux terminal.

Does Termux require root access?

Basic Termux usage does not require root access and operates within Android's application security environment.

Like what you read? I also build production systems for businesses.

Let's work together