Introduction
- Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
- Termux wiki
- Github
- Gitter
- Facebook Page
- Facebook Group
- IRC Channel #Termux on freenode
How termux is different from Linux
Termux:Addons
Termux has some extra features. You can add them by installing addons:
Termux:API Access Android and Chrome hardware features.
Termux:Boot Run scripts when your device boots.
Termux:Float Run Termux in a floating window.
Termux:Styling Have color schemes and powerline-ready fonts customize the appearance of the Termux terminal.
Termux:Task An easy way to call Termux executables from Tasker and compatible apps.
Termux:Widget Start small scriptlets from the home screen.
Shells in Termux
- Zsh
- Bash
- Xonsh
- IPython
- Fish
- TCSH
- Read Wiki to learn more
Text Editors in Termux
- Emacs : Extensible, customizable text editor-and more
- joe : Wordstar like text editor
- jupp : user friendly full screen text editor
- Micro : Micro is a terminal-based text editor that aims to be easy to use and intuitive (notepad like keybindings crtl+c crtl+v etc.)
- nano : nano is a small and friendly editor.
- ne : Easy-to-use and powerful text editor
- sed : GNU stream text editor (More useful in bash scripting)
- Vim : Vi IMproved - enhanced vi editor
- Neovim : Neovim is an extension of Vim: feature-parity and backwards compatibility are high priorities.
- zile : Lightweight clone of the Emacs text editor
IDEs
- Codiad
- emacs
- vim
Package Management
Termux uses apt and dpkg for package management, similar to Ubuntu or Debian. Many quirks from Ubuntu are carried over here. Development files and headers are provided in a separate package with "-dev" suffix, for example, development files for "apache2" package are in "apache2-dev".
Install package(s):
pkg i <package name>
Update and upgrade packages:
pkg up <package name>
Remove/Uninstall Package(s):
pkg un <package name>
List files 'owned' by package:
pkg f <package name>
Reinstall a Package(s):
pkg re <package name>
Show some info about package(s):
pkg sh <package name>
Search package(s):
pkg se <package name> or <regex>
List all packages:
pkg list-a
List all installed packages:
pkg list-i `
A quick warning for root users: if you prefer to use apt over pkg - never run it as root as you will mess up file permissions and SELinux contexts so you won't be able to use it as normal user. If did this and your environment was broken, do not ask for help - this is your own fault !
Remote access and more
Termux is capable of accessing remote devices by using some common tools. It is also possible to turn a device running Termux into remote controlled server.
- FTP server:
tcpsvd -vE 0.0.0.0 2121 ftpd -w path/to/serve
Warning: -w allows upload and don't use port below 1024 or else you may get permission denied error.
- SSH server: Check this if you are using sshd
IRC
- ERC is an IRC client for Emacs.
- irssi is an IRC client.
- weechat is an IRC chat client.
Proot (Run Linux Distributions inside Termux)
- Arch (Thanks to sdrausty)
- Archstrike (just modifies the pacman.conf file)
- Blackarch (just modifies the pacman.conf file)
- Debian (Thanks to sp4rkie)
- Fedora (Thanks to nmilosev)
- Slackware (Thanks to gwenhael)
- Ubuntu (Thanks to neo-oli)
- Alpine Linux (Thanks to Hax4us)
Termux Related Stuff That might be useful
- Oh-my-termux
- Termux-Launcher
- Termux-WebUI
- Termux-ADB
- Atilo (Automated Linux installer for termux)
- Lazymux (Automated pentesting tools installer for termux)
- Graphical Environment(x-11) for termux
Keyboard Shortcuts
The following shortcuts are available when using Termux with a hardware (e.g. bluetooth) keyboard by combining them with Ctrl+Alt:
- ‘C’ → Create new session
- ‘R’ → Rename current session
- Down arrow (or ‘N’) → Next session
- Up arrow (or ‘P’) → Previous session
- Right arrow → Open drawer
- Left arrow → Close drawer
- ‘F’ → Toggle full screen
- ‘M’ → Show menu
- ‘U’ → Select URL
- ‘V’ → Paste
- +/- → Adjust text size
- 1-9 → Go to numbered session
- Source Termux-Wiki
Some aliases that i use:
alias a='startarch' # For starting termux arch
alias cls='clear'
alias e='logout'
alias gcl='git clone'
alias j='jobs'
alias nano='nano -m' # Enable Touch/Mouse Support in nano
alias p='pwd'
alias q='logout'
alias rf='rm -rf'
alias weather='curl wttr.in/narela-india' # change the place to yours
alias pst=termux-clipboard-get # paste
alias cpy=termux-clipboard-set # copy
alias open=termux-open # open with external app