Ad

test banner

Best Posts

About Termux Full Tutorial


The Termux Wiki
Termux is a terminal emulator and Linux environment for Android, Chromebook, and Fire OS.
Introduction
IRC We chats with Touch Keyboard in Termux on an Android Smartphone
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.

User Interface

At launch Termux shows a terminal interface, whose text size can be adjusted by pinch zooming or double tapping and pulling the content towards or from you.
Besides the terminal (with keyboard shortcuts explained below) there are three additional interface elements available: A context menu, navigation drawer and notification.
The context menu can be shown by long pressing anywhere on the terminal. It provides menu entries for:
  • Selecting and pasting text.
  • Sharing text from the terminal to other apps (e.g. email or SMS)
  • Resetting the terminal if it gets stuck.
  • Hangup (exiting the current terminal session).
  • Styling the terminal by selecting a font and a color scheme.
  • Showing this help page.
The navigation drawer is revealed by swiping inwards from the left part of the screen. It has three elements:
  • A list of sessions. Clicking on a session shows it in the terminal while long pressing allows you to specify a session title.
  • A button to toggle visibility of the touch keyboard.
  • A button to create new terminal sessions (long press for creating a named session or a fail-safe one).
The notification, available when a terminal session is running, is available by pulling down the notification menu. Pressing the notification leads to the most current terminal session. The notification may also be expanded (by pinch-zooming or performing a single-finger glide) to expose three actions:
  • Exiting all running terminal sessions.
  • Use a wake lock to avoid entering sleep mode.
  • Use a high performance wifi lock to maximize wifi performance.
With a wake lock held the notification and Termux background processes will be available even if no terminal session is running, which allows server and other background processes to run more reliably.


Touch Keyboard

Use of keys like Alt, Ctrl, Esc is necessary for working with a CLI terminal. Termux touch keyboards do not include one. For that purpose Termux uses the Volume down button to emulate the Ctrl key. For example, pressing}Volume down+L on a touch keyboard sends the same input as pressing Ctrl+L on a hardware keyboard.
The result of using Ctrl in combination with a key depends on which program is used, but for many command line tools the following shortcuts works:
  • Ctrl+A → Move cursor to the beginning of line
  • Ctrl+C → Abort (send SIGINT to) current process
  • Ctrl+D → Logout of a terminal session
  • Ctrl+E → Move cursor to the end of line
  • Ctrl+K → Delete from cursor to the end of line
  • Ctrl+L → Clear the terminal
  • Ctrl+Z → Suspend (send SIGTSTP to) current process
  • Ctrl+alt+C → Open new session (only work in Hacker's Keyboard)
The Volume up key also serves as a special key to produce certain input:
  • Volume Up+E → Escape key
  • Volume Up+T → Tab key
  • Volume Up+1 → F1 (and Volume Up+2 → F2, etc)
  • Volume Up+0 → F10
  • Volume Up+B → Alt+B, back a word when using readline
  • Volume Up+F → Alt+F, forward a word when using readline
  • Volume Up+X → Alt+X
  • Volume Up+W → Up arrow key
  • Volume Up+A → Left arrow key
  • Volume Up+S → Down arrow key
  • Volume Up+D → Right arrow key
  • Volume Up+L → | (the pipe character)
  • Volume Up+H → ~ (the tilde character)
  • Volume Up+U → _ (underscore)
  • Volume Up+P → Page Up
  • Volume Up+N → Page Down
  • Volume Up+. → Ctrl+\ (SIGQUIT)
  • Volume Up+V → Show the volume control
  • Volume Up+Q → Show extra keys view

Extra Keys Row

Termux also has an extra keys view. It allows you to extend your current keyboard with the keys ESC, CTRL , ALT , TAB , - , / and |. To enable the extra keys view you have to long tap on the keyboard button in the left drawer menu. You can also press Volume Up+Q.

Text Input View

Terminal emulators usually do not support the advanced features of touch keyboards like autocorrect, prediction and swipe typing. To solve this, Termux has a text input view. Text entered in it will get pasted to the terminal. Because it's a native Android text input view, all touch keyboard features will work. To access the text input view you have to swipe the extra keys view to the left.

No comments