43+basic command for termux 2022 - techy teacher
Termux is a terminal emulator for Android and a Linux environment for Android that works both with and without root. The Terminal basic system is automatically installed; additional packages can be found using the APT package management.
For Termux Emulator, there are a few basic commands. These Termux commands are simple to understand if you already use a Linux system and are familiar with Linux OS commands.
1. Clear Screen – Termux
Run the clear command to clear all screen material.
Clear
2. Current Working Directory-Termux
Your current working directory will be displayed by this command.
Pwd
3. Directory Changing - Termux
The cd command is used to move our current working directory to another directory. Type cd followed by the name of the directory you want to go to. I'm relocating to the /home directory.
cd /home
4. Move Back Directory/two step back
You may easily back up one directory by using the command cd.. Use the cd../../ command to go back two directories.
cd ..
cd ../../
5. Create New File -Termux
We may quickly create a file by using the touch command.
touch <file-name>
6. Make New Directory - Termux
Mkdir (Mkdir) The term "new directory" refers to the creation of a new directory. Let's type the mkdir command, specify a directory, leave a space, and press the enter key.
mkdir <new-directoy-name>
7. How to Delete Directory in Termux ?
By using the command, you can delete any directory by typing rmdir delete directory-name> and pressing enter. Recursively delete the directory and its contents rm -r /path/to/folder/
rmdir <directory-name>
mv -r <currnet-file-location> <your-new-destination-directory>
8. Copying File and Directory
copy the source file to the destination This is another command-line tool for copying files and directories under Linux. If you want to copy a directory, use cp -r to recursively copy directories and their contents.
cp <filename> <new-filename>
cp -r <directory-name> <new-directory-name>
9. File Editor nano and VI -Termux
Termux includes a number of command-line editors, but the most useful are vi and nano. If you already have a file, type vi filename> and then click I to enter edit mode. Once you've finished editing the file, press the ESC button and type ( :wq ) Write in peace. More information on vi editors may be found here.
nano filename> is another Termux editor type. Edit your file and save it using (Ctrl+x), then write y for yes and push enter again, and your file will be saved.
vi <filename>
nano <filename>
10. Read File Content by Using cat command.
When you run the cat command with the optional argument your-read-file-name>, everything in the text file appears in the terminal.
cat <filename>
11. Processes that are currently executing the highest authority
In Termux, you may quickly observe all running processes by using the top command.
top
12. Permissions and groups can be changed.
Every file permission, as well as the file ownership group and user, may be readily changed. for adding the ability to run the command with execute authorization. (chmod +x file>) Run the command (chown newuser:newgroup filename>) to change file ownership. Read the article to learn more about Linux permissions.
chmod (permission-mode) <filename>
chown (newuser:newgroup) <filename>
13. Source code may be cloned from Github.
Run the script after downloading a new project and copying it from github.
git clone <cloning url>
14 . wget and curl are two programmes that may be used to download files.
If you wish to use the terminal to download the file. There are several download tools available, however we mostly use these. Using the programmes wget and curl, you may download any file from the internet.
wget <download-file-url>
curl <download-file-url> -o <output-filename>
15. All previous runs in history Command
examining all previously executed commands
history
16. List of all installed Packages
The programme will provide a list of all installed packages, along with their versions.
dpkg --list
17. Install New Package/software
Let's use python3 as an example of how to install a new package. When you execute the command pkg install python3 >, you'll see a promotion type y for yes, which means your package is about to be installed. It is dependent on your internet connection speed.
pkg install <package-name>
18. Installed Package should be removed.
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 typing y the package will be removed automatically.
pkg remove <remove-package-name>
19. We may use this command to update all of our installed packages.
apt update && apt upgrade -y
20. New package mirrors have been added.
If you add a new repository to your source.list file, it will appear in your source.list file. You just need to perform the apt update command before installing a new package.
apt update
21. Too see your kernel information
uname -a
22. Using Termux, get the domain's whois information.
whois domain.com
23. Check Active Port in Termux
netstat -tnlp
24. In Termux, check all network interfaces or allocated IP and mac addresses.
ifconfig
25. In Termux, look for an executable file.
which filename
26. Find all files that have the same name.
locate filename
27. Display PCI devices
lspci
28. In termux, send a ping packet to the destination.
ping ip,domain
29. In the Termux Terminal, connect to an SSH server.
ssh username@ip
30. In the Termux Terminal, connect to an FTP server.
ftp ip-address
31. In Termux, look at the background process.
top
Comments
Post a Comment