Launch Termux via its application icon. A black terminal screen will appear with a bash shell prompt.
Check for new packages and update them all
If you wish to first check the packages that will be updated, use
termux-change-repo to select a specific region to minimise the number of mirrors checked during package upgrades, especially useful if on a limited data plan.
At time of writing, the Termux package on F-Droid was around 6 months old so there will be a number of packages that should be updated before any further installation steps are undertaken.
Configure Freedesktop.org XDG locationsλ︎
nano ~/.profile to edit the
~/.profile file, adding export directives to set the XDG locations:
export XDG_CONFIG_HOME=$HOME/.config export XDG_DATA_HOME=$HOME/.local/share export XDG_STATE_HOME=$HOME/.local/state export XDG_CACHE_HOME=$HOME/.cache # Set XDG location of Emacs Spacemacs configuration export SPACEMACSDIR="$XDG_CONFIG_HOME/spacemacs"
source ~/.profile to load the environment variables into the shell, or exit Termux and restart.
nano editor installed by default
nano editor is used to edit the commands as the package is installed by default in termux.
emacs or any other Linux command line editor can be used if the package is first installed. Termux will list packages to install when trying to run a command that is from a package not yet installed.
Tools to download binaries and configurationλ︎
Many tools can be installed via the
pkg tool, although specific Clojure tools and configuration require additional tools:
curl- download tools not packaged, i.e. clojure-lsp binary
git- clone configuration files and projects (see Git version control section)
openssh- SSH service and tools to generate SSH keys
Configure a Git Identify and SSH key to before committing and pushing changes, or cloning repositories using the SSH protocol. practicalli/dotfiles contains example configuration, ignore patterns and commit template for using Git.
[Optional] Configure Termux Settingsλ︎
nano ~/.termu/termux.properties to configure the default settings for termux.
termux-reload-settings if any of the values are set (restarting Termux is not enough to load setting changes)
The defaults are suitable for the majority of uses, although you may wish to consider:
trueto us the whole screen, hiding Android menu bars, etc.
trueif always using a physical keyboard
default-working-directoryto save files user files and directories in an alternative location,
If swiping from left edge of the screen is already taken, set key bindings for creating a new termux session, naming a session and switching between sessions. Alternatively, use byobu to create and switch between its tabs for multiple terminal sessions.
Set Color Scheme and Fontλ︎
The Termux:Styling plug provides menus for selecting terminal color scheme and font to use
Press and hold on the Termux screen to show the context menu and select the Style menu. On smaller screens select More > Style
If Termux:Styling plugin was not installed, a prompt will display asking if the plugin should be installed
A menu appears with Choose Color and Choose Font
Select Choose Color to select from the available list of colour schemes, e.g. Gruvbox Dark or Gruvbox Light
~/.termux/colors.properties file is added when selecting a colour scheme, defining Hex colors from the theme selected.
Select Choose Font to select from the available fonts, e.g. FiraCode or Ubuntu
~/.termux/font.ttf font file is added when selecting a font.
Termux:Styling uses NerdFonts for icons
All fonts installed via
Termux:Styling have been patched with NerdFonts, providing several thousand icons to use within the terminal prompt and Neovim itself (e.g. VimDevIcons).