Termux for Beginners: Essential Commands and Operations

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:

  1. Download Termux from F-Droid or Google Play Store (if available).
  2. Open Termux and allow storage permissions:
  3. termux-setup-storage
  4. Update package lists to ensure you have the latest repositories:
  5. pkg update && pkg upgrade -y

2. Basic Commands

Navigating the File System

  • ls – List files and directories
  • cd directory_name – Change directory
  • pwd – Print the current working directory
  • mkdir my_folder – Create a new directory
  • rm file_name – Remove files

Managing Files

  • touch myfile.txt – Create a new empty file
  • cp file.txt /path/to/destination/ – Copy files
  • mv 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 Python

Conclusion

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.

Post a Comment

Previous Post Next Post