𝐓𝐄𝐑𝐌𝐔𝐗 𝐀𝐍𝐃 𝐁𝐀𝐒𝐈𝐂 𝐂𝐎𝐌𝐌𝐀𝐍𝐃𝐒 𝐅𝐎𝐑 𝐁𝐄𝐆𝐈𝐍𝐄𝐑𝐒 | Cybersecurity Guide

Termux Beginner Guide: Basic Commands (2026)


Want to run Linux commands on your Android phone without rooting? Meet Termux – a powerful, free, and open‑source terminal emulator that turns your smartphone into a mini Linux environment. Whether you're a beginner learning command‑line basics, a programmer who wants to code on the go, or an aspiring ethical hacker practicing penetration testing tools, Termux is your gateway. In this guide, I'll walk you through what Termux is, how to install it, and the most essential commands you need to know – with real‑world examples and safety tips.

What Is Termux? (And Why Every Tech Enthusiast Should Try It)

Termux is a terminal emulator for Android that provides a Linux environment without requiring root access. It comes with its own package manager (pkg) and allows you to install hundreds of software packages – from Python and Node.js to Git, SSH clients, and even hacking tools like Nmap and Metasploit (for ethical use only). Unlike other terminal apps that only give you basic Android shell commands, Termux offers a complete Linux userland.

Real‑world use cases:

  • Learn Linux commands on your phone – Perfect for students who don't have a PC.
  • Run Python scripts anywhere – Automate tasks, test code, or even run a simple web server.
  • Practice ethical hacking – Use tools like `nmap` for network scanning or `hydra` for password testing (only on your own systems with permission).
  • SSH into remote servers – Manage your cloud VPS directly from your Android device.
  • Develop and test code – Use Vim or Nano to edit files, compile C programs, or run Git commands.

For a deeper understanding of ethical hacking and how tools like Termux fit in, check out Domebytes' Complete Guide to Ethical Hacking.

How to Install Termux (2026 Update)

Termux is no longer available on the Google Play Store for new installs (due to Android API changes), but you can safely download it from F-Droid or GitHub. Follow these steps:

  1. Go to F-Droid and install the F-Droid app, then search for Termux.
  2. Or download the latest APK from the official GitHub releases page.
  3. Install the APK (allow installation from unknown sources if prompted).
  4. Open Termux – it will automatically set up the base environment (this may take a minute).
  5. Run pkg update && pkg upgrade to update all packages.

Beginner tip: Grant storage access by running termux-setup-storage. This allows you to access your phone's internal storage from Termux.

Essential Termux Basic Commands (With Explanations)

Below are the most useful commands for beginners. I've grouped them by purpose and added real examples.

Package Management (Installing & Updating)

  • pkg update && pkg upgrade – Updates all installed packages. Do this first after installation.
  • pkg install python – Installs Python. Replace 'python' with any package name (e.g., `nmap`, `git`, `nano`).
  • pkg uninstall nano – Removes a package.
  • pkg list-all – Shows all available packages (huge list).

File System Navigation

  • pwd – Print working directory (shows where you are).
  • ls – List files and folders in current directory. Add `-la` to see hidden files and details.
  • cd folder-name – Change to that folder. `cd ..` goes up one level. `cd ~` goes to home.
  • mkdir myfolder – Creates a new directory called "myfolder".
  • rm filename – Deletes a file. Use `rm -r foldername` to delete a folder and its contents (careful!).
  • cp source.txt dest.txt – Copies a file.
  • mv oldname.txt newname.txt – Moves or renames a file.
  • touch emptyfile.txt – Creates an empty file.

Working with Text (Editors & Viewing)

  • nano filename.txt – Opens the Nano text editor (beginner‑friendly). Save with Ctrl+O, exit with Ctrl+X.
  • cat filename.txt – Displays the content of a file in the terminal.
  • echo "Hello" > file.txt – Writes text into a file.

Network & Connectivity

  • ping google.com – Checks if you can reach a server (press Ctrl+C to stop).
  • wget https://example.com/file.zip – Downloads a file from the internet.
  • ssh user@192.168.1.100 – Connects to a remote server via SSH (great for managing cloud servers).
  • ifconfig – Shows network interfaces (you may need to install `net-tools` first).

System Monitoring & Process Management

  • top or htop – Shows running processes and resource usage (install `htop` separately).
  • ps aux – Lists all running processes with details.
  • kill 1234 – Terminates the process with ID 1234.
  • df -h – Shows disk space usage on your device storage (within Termux's sandbox).
  • du -sh ~ – Shows total size of your home directory.

Searching & Help

  • grep "text" filename.txt – Searches for a pattern inside a file.
  • find . -name "*.py" – Finds all Python files in the current directory.
  • history – Shows your command history.
  • command --help or man command – Shows help for any command.

Real Example: Using Termux for a Simple Python Project

Let's say you want to write and run a Python script that fetches the weather. Here's how you'd do it in Termux:

pkg update && pkg upgrade
pkg install python
nano weather.py
    # Inside nano, type:
    import requests
    response = requests.get('https://wttr.in/London?format=%C+%t')
    print(response.text)
# Save with Ctrl+O, exit with Ctrl+X
python weather.py
    

This shows how Termux turns your phone into a development machine. You can even install Git and push your code to GitHub.

Ethical Hacking with Termux: What's Allowed?

Termux can install tools like Nmap, Metasploit, and Hydra. But with great power comes great responsibility. Only use these tools on your own devices or networks where you have explicit written permission. Unauthorized scanning or attacks are illegal under the Indian IT Act and similar laws worldwide. Domebytes strongly promotes ethical hacking as a career – you can learn more in our cyber security guide and Metasploit introduction.

If you're serious about ethical hacking, start by learning Linux basics, networking, and programming. Termux is a great practice environment – but always stay legal.

Beginner Tips: Avoid Common Termux Mistakes

  • Don't run random scripts from the internet – They could contain malware. Only install packages from the official Termux repositories.
  • Use `pkg` instead of `apt` – Termux has its own package manager optimized for Android.
  • Grant storage access early – `termux-setup-storage` lets you access your Downloads, DCIM, etc.
  • Long‑press on screen for special keys – Termux has an extra keyboard row with Ctrl, Alt, Tab, etc.
  • Backup your Termux environment – You can tar your home directory to save your setup.

Conclusion: Your Linux Terminal Anywhere

Termux is a game‑changer for Android users who want to learn Linux, code on the go, or practice ethical hacking. With the basic commands you've learned today, you can navigate files, install software, write scripts, and even connect to remote servers. The best part? It's completely free and open‑source.

Start small: install Termux, run `pkg update`, and try a few commands like `ls` and `pwd`. Then challenge yourself to write a simple Python script. Over time, you'll build skills that translate directly to real IT and cybersecurity jobs.

For more hands‑on projects, check out Domebytes' ATM simulator in Python or the coding journey guide – both can be done inside Termux!

Frequently Asked Questions (Termux for Beginners)

1. Is Termux safe to use? Can it harm my phone?

Termux itself is safe and open‑source. However, installing malicious scripts or untrusted packages could harm your data. Stick to the official Termux repositories and only run code you understand. Also, avoid giving Termux root access unless absolutely necessary (and you know what you're doing).

2. Why can't I find Termux on Google Play Store anymore?

Google removed Termux from Play Store due to outdated API targets. The developers now distribute it via F-Droid and GitHub. Download from f-droid.org or the official GitHub releases – these are safe and updated regularly.

3. Do I need to root my phone to use Termux?

No – Termux works perfectly without root. Most features (installing packages, running scripts, SSH) are available. Some advanced network tools (like running a raw socket listener) may require root, but for learning basics, root is unnecessary.

4. Can I run Kali Linux tools in Termux?

Many Kali tools are available in Termux repositories (Nmap, Hydra, Metasploit). For a full Kali experience, you can install a proot-distro (like Ubuntu or Kali) inside Termux, but that's advanced. Start with basic packages first. Always use ethical hacking tools responsibly and legally.

5. How do I uninstall Termux completely?

Simply uninstall the app like any other Android app. This removes all Termux files from your device's internal storage. If you granted storage access, you may need to manually delete the `Termux` folder in your internal storage root.

Related Posts from Domebytes

External Resources

About the author

AMAL AJI
Web wizard

Post a Comment

💡 Got a question or feedback about this post? Drop your comment below! We review all messages before publishing to keep the discussion clean and useful.