Termux for Beginners: Essential Commands and Operations
Published on HYDRA TERMUX
Introduction
Termux is a powerful terminal emulator for Android that brings the Linux command-line environment to your mobile device. Whether you want to learn Linux, automate tasks, or run development tools, Termux is an excellent choice. In this article, we will cover the essential commands and operations to help beginners get started with Termux effectively.
1. Installing and Setting Up Termux
Installation:
- Download Termux from F-Droid or Google Play Store (if available).
- Open Termux and allow storage permissions:
- Update package lists to ensure you have the latest repositories:
termux-setup-storage
pkg update && pkg upgrade -y
2. Basic Commands
Navigating the File System
ls
– List files and directoriescd directory_name
– Change directorypwd
– Print the current working directorymkdir my_folder
– Create a new directoryrm file_name
– Remove files
Managing Files
touch myfile.txt
– Create a new empty filecp file.txt /path/to/destination/
– Copy filesmv oldname.txt newname.txt
– Move or rename files
3. Package Management in Termux
Termux uses pkg
(a wrapper for apt
) to manage
software packages.
Commonly Used Packages
Package | Purpose |
---|---|
nano | Text editor |
python | Run Python scripts |
git | Version control system |
4. Useful Operations in Termux
Running Python
pkg install python -y
python --version
Running a Web Server
python -m http.server 8080
Then, open your browser and go to http://localhost:8080.
5. Running Termux in Background
pkg install tmux -y
tmux new -s mysession
CTRL + B, then D (to detach)
tmux attach -t mysession
How To Install Python In Termux
Click For How To Install PythonConclusion
Termux is a versatile tool that brings the power of Linux to Android. With these basic commands and operations, you can start navigating the Termux environment, managing files, and even running web servers and SSH connections. Keep experimenting and exploring more commands to unlock Termux's full potential! 🚀
For more tech guides, visit HYDRA TERMUX.