Hey Folks, in this tutorial we are going to share with you some useful commands of Termux emulator. Almost all the termux commands are classified from the beginning to the advance level.

About Termux Emulator

Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically – additional packages are available using the APT package manager. You can go here for more information.

let’s take a look 😛 !!

Termux File and Directory Creating

  • touch [file name] – used to create new file
  • cat > [file name] – used to create new file with content
  • echo “hello world” > [file name] – create new file with content
  • cat >> [file name] – Add content in existing file
  • mkdir [name] – create a directory or folder

Termux Usage of CD Commands

  • cd – used to change directory
  • cd / – back to root directory
  • cd .. – change current directory to parent directory
  • cd – – move one directory back from current location
  • cd — – show last working directory from where we moved
  • cd ~ – move to users home directory from anywhere

Termux Copy and Move Commands

  • cp [file name] [location where you want copy] – used to copy any file
  • cp -r – used to copy any directory
  • cp -n – no file overwrite
  • mv [file name] [location where you want copy] – used to permanently move any file
  • mv -v – to move any directory
  • mv [file1 name] [new file2 name] – move or rename two file at a same time
  • mv -i – interactive prompt before overwrit
  • mv -f – force move by overwriting destination files without prompt

Termux ls Commands

  • ls – list directory
  • ls –help – show display how to use “ls” command
  • ls -l – show file action like – modified, date and time, owner of file, permissions Etc.
  • ls -n – to display UID and GID directory
  • ls –version – check the version of ls command
  • ls -a – list all hidden files
  • ls -al – formatted listing with hidden files
  • ls -i – Display number of file or directory

Termux More Useful Commands

  • rm – remove or delete files
  • rm [filename] – remove any text files
  • rmdir [dir name] – remove any directory
  • rm -rf – force remove a directory or a folder
  • rm -r [name] – delete a directory called name
  • pwd – it show your current working directory
  • wget [url] – install tool , apt install wget
  • git clone [url] – install any tools with git clone, apt install git
  • curl -O [url] – apt install curl
  • apt search [qurey] – use to get available packages
  • pkg search [qurey] – find a package
  • apt remove [package name] – uninstall / remove a package
  • apt show – view package information
  • more [file name] – output the contents of file
  • head [file name] – output the first 10 line of file
  • tail -f [file name] – output the contents of file as it grows
  • zip name.zip [file] – compress file using this commands
  • unzip [zip file] – to unzip file
  • bye – terminate current ftp session, exit
  • bell – bell sound after each command
  • uname -m – used to find the architecture of your device
  • uname -a – used to display kernal information
  • du – display directory space usage
  • df – display disk usages
  • cal – show display calendar
  • w – show display who is currently online
  • cat /proc/meminfo – show memory related information
  • cat /proc/cpuinfo – show cpu information
  • whoami – show your login name
  • date – show the current date and time
  • uptime – show the system current uptime
  • man command – show manual a command
  • free – display memory and swap usage
  • kill – send signal to process
  • kill- l – list all of the signal that are possible to send with kill
  • locate [file] – find all files with filename
  • whereis [command] – find location binary /source/man file for a command
  • which [command] – find of an executable
  • grep pattern [files] – searching for pattern in files
  • grep -r pattern files – searching for certain pattern in files
  • command | grep pattern – search for pattern in the output of command
  • find / -cmin -60 – find change files in last 1 hour
  • find / -type d -name mll – find all directories whose name is mll in directory
  • tracerout ipadress – display number of hops & respone time to get to a remote system and website
  • whois domain – get whois information of domain
  • dig domain – get DNS information of domain
  • scp – copies file, over a source
  • whereis app – shows possible location for an app
  • nano [file name] – display and edit text files
  • append [local-file] – remote file append a local file to one on the remote
  • ifconfig – shows all configuration a network interface like ip, mac
  • ifconfig eth0 – used view the network setting on the interface eth0
  • ifconfig wlan0 – view the network setting on wlan0
  • ping [host] – to ping host ip and show results
  • arp – check network card & show ip adress
  • host – display specific server

Termux Common Programs

  • 7z: pkg i p7zip
  • FFMpeg: pkg i ffmpeg
  • Git: pkg i git
  • Hydra: pkg i hydra
  • Nano: pkg i nano
  • Nmap: pkg i nmap
  • Node: pkg i nodejs
  • SQLMap: pkg i python2 && pip2 install -U sqlmap
  • Vim: pkg i vim
About the Author
Shubham Goyal Certified Ethical Hacker, information security analyst, penetration tester and researcher. Can be Contact on Linkedin.

Leave a Reply