0% found this document useful (0 votes)
289 views6 pages

Termux Learning - Full Notes

Termux is a terminal emulator for Android that allows users to run a Linux environment without root access, enabling programming, task automation, and ethical hacking. The document provides basic commands, package management instructions, file management, and networking commands, as well as tips for using Termux effectively. It also includes resources for further learning and useful tools that can be installed.

Uploaded by

qxgzftj99n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
289 views6 pages

Termux Learning - Full Notes

Termux is a terminal emulator for Android that allows users to run a Linux environment without root access, enabling programming, task automation, and ethical hacking. The document provides basic commands, package management instructions, file management, and networking commands, as well as tips for using Termux effectively. It also includes resources for further learning and useful tools that can be installed.

Uploaded by

qxgzftj99n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2⃣

1⃣
Termux Learning – Full
Notes
Introduction to Termux
● What is Termux?
Termux is a powerful terminal
emulator for Android that allows
you to run a Linux environment
without root.
● Why use Termux?
○ Run Linux commands
○ Programming on Android
○ Automate tasks
○ Learn ethical hacking /
networking tools
● Install Termux:
Download the latest version
from F-Droid (not Play Store,
outdated).

Basic Commands
Command Use
pwd Show
current
directory
ls List files/
folders
cd <dir> Change
directory
cp file1 file2 Copy file
mv file1 file2 Move/
rename file
rm file Delete file
clear Clear screen
whoami Show
current user
exit Exit Termux
Package Management
Termux uses pkg and apt as package
managers.
● Update packages:

pkg update && pkg upgrade


● Install package:

pkg install <package_name>


● Uninstall package:

pkg uninstall <package_name>


Common Packages:

pkg install git python nano curl


wget unzip zip openssh clang

File & Directory


Management
● Create a folder: mkdir myfolder
● Create a file: touch file.txt
● View file contents: cat file.txt
● Edit a file with nano: nano
file.txt
● Move files to shared storage:
termux-setup-storage
● mv file.txt /sdcard/

Text Editors
● Nano: beginner-friendly
● Vim: advanced users
● Install nano: pkg install nano
● Edit file: nano filename

Git & Version Control

pkg install git


git clone https://github.com/
user/repo.git
cd repo
git pull
git push

Python in Termux

pkg install python


python --version
pip install requests
Run Python scripts:

python script.py

SSH (Remote Login)

pkg install openssh


ssh user@host
Start SSH server:

sshd
passwd
passwd

Networking Commands
Command Description
ping Test network
google.com connectivity
curl Fetch
example.- webpage
com
wget URL Download
files
ifconfig or ip View IP
a address
Compilers & Development
Install:

pkg install clang


pkg install nodejs
pkg install php
Run code:

gcc hello.c -o hello && ./hello


node app.js
php script.php

Storage & Permissions


● First time run:

termux-setup-storage

● Access internal storage under /


storage/emulated/0/.
Automation with Scripts
Create a shell script:

nano script.sh
Add:

#!/bin/bash
echo "Hello from Termux"
Make executable:

chmod +x script.sh
./script.sh

Useful Tools
● htop – System monitor
● figlet – ASCII banners
● cowsay – Fun text cows
● mc – Midnight Commander file
manager
Example:

pkg install figlet


figlet "Hello"

Backup & Restore


Backup packages:

dpkg --get-selections >


packages.txt
Restore:

dpkg --set-selections <


packages.txt
apt-get dselect-upgrade

Learning Resources
● Termux Wiki: https://
wiki.termux.com
● GitHub projects for Termux
● Linux command cheat sheets
Tips
● Always update before installing
new packages.
● Use man <command> to learn
about a command.
● Be careful with scripts from the
internet.
● Practice daily — treat Termux
like a mini Linux lab.

You might also like