100% found this document useful (3 votes)
7K views9 pages

Termux Basic Commands List

Uploaded by

Njo Too
This document provides a list of basic commands that can be used in Termux, an Android terminal emulator app. It describes commands for clearing the screen, checking the current working directory, changing directories, creating and deleting files and directories, editing files, installing packages, and more. More than 50 commands are outlined along with their usage examples to help users learn the basic functionality of Termux.

Copyright:

© All Rights Reserved

Available Formats

Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (3 votes)
7K views9 pages

Termux Basic Commands List

Uploaded by

Njo Too
This document provides a list of basic commands that can be used in Termux, an Android terminal emulator app. It describes commands for clearing the screen, checking the current working directory, changing directories, creating and deleting files and directories, editing files, installing packages, and more. More than 50 commands are outlined along with their usage examples to help users learn the basic functionality of Termux.

Copyright:

© All Rights Reserved

Available Formats

Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 9

DROIDMAZE.

COM

TERMUX BASIC
COMMANDS LIST
List of Termux Basic
Commands
You can run this command in a sequence to practice and know yourself
how these commands work on Termux. If you have any questions or
ideas please comment I will be happy to help you.

LEARN MORE AT: https://droidmaze.com

Termux – Clear Screen


For clear all screen content run the clear command.
Clear

Termux – Current Working Directory


This command will tell you, your current working directory.
Pwd

Termux – Changing Directory


cd command use for change our current working directory to another directory, type
cd and your directory name. I’m moving in /home directory.
cd /home

Termux – Move Back Directory


If you want one directory to move back by using cd .. you can easily back one
directory. and you wanna back two directories use the cd ../../ command.
cd ..
cd ../../

Termux – Create New File


by using the touch command we can easily create a file
touch <file-name>

Termux – Create New Directory


Mkdir Stands for creating a new directory. Let’s Type the mkdir command and give a
directory and using a space gape and hit the enter button.
mkdir <new-directoy-name>

How to Delete Directory in Termux


delete any directory by using the command, just type the rmdir <delete directory-
name> and press enter and it will be deleted. delete the directory and their
contents recursively rm -r < directory-name >
rmdir <directory-name>
rm -r <directory-name>

Termux – Delete File


delete any file type the rm <your-filename> and press enter and it will be deleted
within a second.
rm <file-name>

Termux – Rename File and Directory & Move a File


The mv command is a Linux command-line utility that moves files or directories
from one place to another. rename filename type the command mv <old-filename>
<new-filename>
mv <old-filename> <new-overwirte-filename>
mv -r <currnet-file-location> <your-new-destination-directory>

Termux – Copy File and Directory


copy file source to destination. this is another Linux command-line utility for copy
file and directory. if you want to copy a directory you must use cp -r copy directories
and their contents recursively.
cp <filename> <new-filename>
cp -r <directory-name> <new-directory-name>

Termux – File Editor nano and VI


Termux has many command-line editors but there have most useful editor vi and
nano. if you already have a file run the vi <filename> enter the edit mode by
pressing ( i ) after edit the file press the ESC button and type ( :wq ) write and quite.
read more about vi editor.
nano is another Termux editor type nano <filename> edit your file and save the file
by using ( Ctrl+x ) and type y for yes and again hit enter and your file is saved.
vi <filename>
nano <filename>

Termux – Read File Content cat command


Run the cat command with using extra argument <your-read-file-name> and
everything is see in terminal inside the text file.
cat <filename>

Termux – All running background Process Top command


Know all running processes in Termux you can easily see all running processes by
using the top command.
top

Termux – Change Permission and Group


you can easily change every file permission and change file ownership group and
user. for adding execute permission to run the command. ( chmod +x <file-name> )
if you want to change file ownership run the command ( chown newuser:newgroup
<filename>. more about Linux permission read the article.
chmod (permission-mode) <filename>
chown (newuser:newgroup) <filename>

Termux – Clone Source code from Github


Download new project and cloning project from git hub run the command.
git clone <cloning url>

Termux – Download File wget and curl


If you want to download the file through the terminal. there are many download
tools but we are mostly using these tools. wget and curl you can download every file
from the internet by using those tools.
wget <download-file-url>
curl <download-file-url> -o <output-filename>
Termux – history All Previous run Command
checking all previous run command.
History

Termux Install all Packages Command 2021


List all installed Packages
The command will display a list of all installed packages including the packages
versions.
dpkg –list

Install New Package


installing a new package let’s try one example install python3. run the command <
pkg install python3 > and you see a promote type y for yes and your package is
install soon. it depends on your internet speed.
pkg install <package-name>

Remove Installed Package


you can uninstall any package from the list, just type pkg remove and <remove-
package-name>.it will ask you. if you wanna delete the package press y or not n
After type y the package will be removed automatically.
pkg remove <remove-package-name>

Update all packages


update all old installed package
apt update && apt upgrade -y

Update New added Package mirrors


If you add a new repository in your source.list file. before installing a new package
you just need run the apt update command.
apt update

MORE COMMANDS
COMMANDS USAGE

cp -v used to prints informative massage

cp -r used to copy any directory

mv -u update-move when source is newer than destination

mv -v to move any directory


COMMANDS USAGE

ls -n to display UID and GID directory

ls --version to check the version of ls command

cd -- show last working directory from where we moved

ls -l show file action like - modified, date and time, owner of file,
permissions Etc.

ls help show display how to use "ls" command

cp -n no file overwrite

cd ~ move to users home directory from anywhere

mv [file1 name] [new file2 move or rename two file at a time


name]

cd - move one directory back from current location

mv [file name] move any file and folder

ls list directory

ls -a list all files including hidden files

pwd it show your current working directory

mv -i interactive prompt before overwrit

wget [url] install tool , apt install wget

git clone [url] install any tools with git clone, apt install git

ls -al formatted listing with hidden files

mv -f force move by overwriting destination files without prompt

ls -i Display number of file or directory

cp copy any file

cd / change to root directory

cd change directory

cd .. change current directory to parent directory


COMMANDS USAGE

curl -O [url] apt install curl

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

apt remove [package uninstall / remove a package


name]

touch [file name] create new file

mkdir [name] create a directory or folder

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

apt install zip install zip file tool

zip name.zip [file] compress file using this commands

unzip [zip file] to unzip file

ftp launch ftp client from terminal

-p use passive mode

bye terminate current ftp session, exit

ascii set file transfer to ascii protocols

bell bell sound after each command

status shows current status about ftp server

open host open a connection to remote host

remotehelp [cmdname] request help from ftp server

account [password] supply a password required by remote


COMMANDS USAGE

uname -m used to find the architecture of your device

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

fingure username shows information about user

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

lspci show PCI devices

lsusb show usb devices

apt search [qurey] find a package


pkg search [qurey]

locate [file] find all files with filename

locate [query] find all path names contains a pharse

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


COMMANDS USAGE

command | grep pattern search for pattern in the output of command

find / -atime40 to find all the files, which are accessed 40 days back

find / -cmin -60 find change files in last 1 hour

find / -type d -name mll find all directories whose name is mll in directory

find . -type f -perm 0777 find all tghe files, whose permission are 777
-print

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

netstat review network connection

nslookup find out DNS related query

tracerout ipadress display number of hops & respone time to get to a remote
system and website

whois domain get whois information of domain

telnet [ip address [post] telnet connection

dig domain get DNS information of domain

scp copies file, over a source

uname -a used to display kernal information

whereis app shows possible location for an app

nano [file name] display and edit text files

apt show view package information

append [local-file] remote append a local file to one on the remote


file
COMMANDS USAGE

$ execute a macro

You might also like