Basic Usage - Termux App
Now that you have Termux OS installed, lets explore some basic usage and essential commands to help you get started.
Navigating the File System
- Print Working Directory:
pwd
2. **List Files and Directories**:
```shellscript
ls
ls -l # Detailed list
ls -a # Show hidden files
- Change Directory:
cd /sdcard # Go to your device's storage
cd ~ # Go to your home directory
cd .. # Go up one directory
- Create a Directory:
mkdir my_project
- Remove a Directory:
rmdir empty_directory
rm -r non_empty_directory # Be careful with this!
File Operations
- Create a File:
touch newfile.txt
- Edit a File:
nano myfile.txt
- View File Contents:
cat myfile.txt
less longfile.txt # For longer files
- Copy a File:
cp source.txt destination.txt
- Move or Rename a File:
mv oldname.txt newname.txt
- Delete a File:
rm unwanted_file.txt
Package Management
- Update Package Lists:
pkg update
- Upgrade Installed Packages:
pkg upgrade
- Install a Package:
pkg install package_name
- Remove a Package:
pkg uninstall package_name
- Search for a Package:
pkg search keyword
Process Management
- View Running Processes:
ps
- Kill a Process:
kill process_id
- Run a Process in the Background:
command &
Network Operations
- Check Network Connectivity:
ping google.com
- Download a File:
wget https://example.com/file.zip
- Check IP Address:
ifconfig
Text Processing
- Search for Text in Files:
grep "search_term" file.txt
- Count Lines, Words, and Characters:
wc file.txt
Permissions
- Change File Permissions:
chmod 644 file.txt
- Change File Ownership:
chown user:group file.txt
Useful Termux-specific Commands
- Access Device Clipboard:
termux-clipboard-get
echo "text" | termux-clipboard-set
- Get Device Battery Status:
termux-battery-status
- Take a Photo:
termux-camera-photo image.jpg
- Get Device Location:
termux-location
Tips for Efficient Usage
- Use the Tab key for auto-completion of commands and file names.
- Use the up and down arrow keys to navigate command history.
- Use Ctrl+C to interrupt a running command.
- Use Ctrl+Z to suspend a process and
fg
to bring it back to the foreground.
Next Steps
Now that you're familiar with basic Termux OS usage, you're ready to explore more advanced features. In the next section, we'll dive into advanced features and customizations to help you get the most out of your Termux OS environment.
Installing -Termux App
This guide will walk you through the process of installing Termux OS on your Android device and setting up your initial environment.
Advanced Features - Termux App
As you become more comfortable with Termux OS, you can take advantage of its advanced features to create a more powerful and customized environment. This guide will introduce you to some of these advanced capabilities.