Basic commands in termux.
Cyber Souls! Termux is a great tool that allows you to access and use advanced Linux tools without root on your android phone. Termux is Command-line based and to use this app the most basic thing you should know is commands. In this thread, we are going to learn about the most basic commands in the termux app.
If you know all the commands below you can easily navigate in termux and please practice this command so you can learn more advanced stuff more easily. if you wanna know why you must learn termux then check this post.[what is termux?]
List of All the 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 so reply to this thread.>Note: If any part of the command is green that means it is a variable. The green part of the code will change according to the situation.
Update all the packages and dependencies installed on the system:
QUOTE:
apt update && apt upgrade
Grant storage permission:
QUOTE:
termux-setup-storage
Know Which directory you are in:
QUOTE:
This command will tell you, your present working directory
List all the files and directories:
QUOTE:
List all the files and directories including Hidden Files:
QUOTE:
ls -a
Move forward in directories:
QUOTE:
cd storage
Move backward in directories:
QUOTE:
cd ..
Clear Screen:
QUOTE:
clear
Create a folder or a directory:
QUOTE:
mkdir folderName
Delete a folder or a directory:
QUOTE:
rmdir folderName
Delete Non-Empty directory or folder in termux:
QUOTE:
rm -rf folderName
Copy a file from one directory to another directory:
QUOTE:
cp files-name file-path
Move a file from one directory to another directory:
QUOTE:
mv files-name file-path
Search for the specific package in termux:
QUOTE:
pkg search package-name
See the Details of a Package in Termux:
QUOTE:
apt show nano
List all the available packages in termux:
QUOTE:
pkg list-all
Install a Package:
QUOTE:
pkg install packageName
Uninstall a Package:
QUOTE:
pkg uninstall packageName
Install Python in termux:
QUOTE:
pkg install python
Install Git in termux:
QUOTE:
pkg install git
Git will allow you to download any project from GitHub.
QUOTE:
pkg install git
Download projects from GitHub repository :
QUOTE:
git clone Link-of-the-project
e.g: git clone https://github.com/owner/project
Check all the running processes in Termux:
QUOTE:
Make any bash file Executable :
QUOTE:
chmod +x filename
Create a text file in termux:
- first, you have to download a package name nano. Type on termux pkg install nano press y when asking for confirmation.
- type nano on the terminal.
- type anything you want I am typing hello world.
- Press CTRL+X and press Y to save the file.
- Give the file name anyname.txt and press enter.
- Type ls command to see your directory.
See what's inside a text file:
QUOTE:
cat file-name
e.g: cat data.txt
Delete a file in termux:
QUOTE:
rm file-name
e.g: rm data.txt
List all the installed Packages in termux:
QUOTE:
dpkg --list
List all commands that You have used in termux:
QUOTE:
history
Check your Username :
QUOTE:
whoami
Check your Termux usage time :
QUOTE:
uptime
Check your Kernel info in Termux:
QUOTE:
uname -a
Check your Memory Usage in Termux:
QUOTE:
free -h -t