
This guide helps you set up Termux with essential packages and languages. If you encounter errors or issues with certain tools in Termux, follow these steps for troubleshooting:
pkg update && pkg upgrade && pkg install git python python2 && pkg install wget ruby proot clang && termux-setup-storage && apt install php git golang -y && apt install nano && apt install cmatrix && pkg install figlet && pkg install wget && pkg install cowsay && pkg install toilet && pkg install ruby && gem install lolcat && pkg install curl && pkg install unzip && pkg install openssh && pkg install tor && pkg install net-tools && pkg install unrar && pkg install clang && pkg install w3m && pkg install proot && pip2 install wget && pip2 install requests && pkg install pacman4console && pkg install vim && pip install colorama && pip install bundle && gem install bundle && gem install bundler && pip2 install requests && pip install --upgrade pip
# If packages fail to install
pkg update --fix-missing
pkg upgrade -y
termux-change-repo # Change to a faster mirror
# Fix storage access problems
termux-setup-storage
# If it fails:
rm -rf ~/storage
termux-setup-storage
# Fix missing commands
pkg update
pkg install command-not-found -y
source $PREFIX/etc/profile.d/command-not-found.sh
# Fix Python environment
pkg reinstall python -y
pip install --upgrade pip
pip install wheel setuptools
# Refresh shell environment
source ~/.bashrc
exec bash # Restart shell
# Clean system cache
pkg clean
apt autoremove -y
rm -rf ~/.cache/* ~/.tmp/*
# Reinstall broken packages
pkg reinstall $(pkg list-installed | grep -v ok | cut -d/ -f1)
pkg install texinfo -y && info > commands.txt && cat commands.txt
pkg --check-mirror update
pkg install git -y
pkg install fish -y
Ensure the following languages are installed for development:
apt install python -y
apt install python2 -y
apt install ruby -y
apt install php -y
apt install golang -y
apt install clang -y
apt install dart -y
| Command | Description |
|---|---|
pkg list-all |
List all available packages |
pkg search <tool> |
Search for a package |
pkg show <package> |
Show package details |
termux-info |
Display Termux system info |
termux-open <file> |
Open a file |
termux-clipboard-set |
Copy text to clipboard |
# If Termux crashes completely
# Uninstall and reinstall the app
# Then restore from backup or start fresh
# Nuclear option - reset everything
rm -rf $PREFIX
pkg update && pkg upgrade
# Always backup first!
tar -zcf backup-before-fix.tar.gz /data/data/com.termux/files
pkg clean
apt autoremove
tar -zcvf termux-backup.tar.gz /data/data/com.termux/files
tar -zxvf termux-backup.tar.gz -C /data/data/com.termux/files
# Fix shared library problems
pkg install libandroid-support -y
pkg reinstall $PREFIX/bin/*
# Fix file permissions
chmod 755 $PREFIX/bin/*
chmod +x ~/storage/shared/termux-scripts/*.sh 2>/dev/null || true
# Check system resources
free -m
df -h
# If low on memory:
pkg clean
rm -rf ~/.cache
tmux for multitaskingtermux-wake-lock to prevent sleep~/storage/shared/termux-scriptstermux-api for Android integration