← Back

guest@termux:~$ cat understanding-linux-basics-in-termux.md

Understanding Linux Basics In Termux

·2 min read·Learn Termux

Learn basic Linux commands in Termux to navigate files, manage folders, and use the terminal confidently.

Understanding Linux Basics In Termux

Why Learn Linux Commands?

Termux works like a Linux terminal on Android.

Learning a few basic Linux commands will help you:

You do not need to memorize everything. Start with the basics.


Check Your Current Folder

Use:

pwd

This shows your current directory path.


List Files and Folders

ls

Show hidden files:

ls -a

Detailed view:

ls -l

Change Directory

Move into a folder:

cd folder-name

Go back one folder:

cd ..

Go to home directory:

cd

Create a Folder

mkdir myfolder

Create multiple folders:

mkdir folder1 folder2

Create a File

touch file.txt

Delete Files and Folders

Delete a file:

rm file.txt

Delete a folder:

rm -r folder-name

Be careful with rm commands. Deleted files usually cannot be recovered.


Copy Files

cp file.txt backup.txt

Copy a folder:

cp -r myfolder backup-folder

Move or Rename Files

Rename a file:

mv old.txt new.txt

Move a file:

mv file.txt /storage/emulated/0/

View File Content

Show file content:

cat file.txt

Edit a file using Nano:

nano file.txt

Clear the Terminal

clear

Update Packages

Keep Termux updated:

pkg update && pkg upgrade

Install Packages

Example:

pkg install python

Useful Beginner Tip

Use the TAB key for auto-completion.

Example:

cd Down<TAB>

Termux will automatically complete folder names if possible.


Common Beginner Mistake

Command Not Found

If you see:

command not found

It usually means:

Double-check spelling before retrying.


Final Thoughts

Learning a few Linux basics makes using Termux much easier.

Start practicing these commands daily, and you will quickly become comfortable using the terminal on Android.

guest@termux:~$ whoami

Dexter

Sharing practical Termux guides, Linux tips, and Android hacking tutorials for beginners and advanced users.

guest@termux:~$ subscribe --email you@example.com

Get new guides delivered to your inbox. No spam, unsubscribe anytime.

guest@termux:~$ grep -l 'related' /guides/*.md