Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/termux/termux-app/llms.txt

Use this file to discover all available pages before exploring further.

The termux.properties file is the primary way to customize Termux behavior. It controls everything from keyboard shortcuts and extra keys to session handling, URL opening, and display preferences. Termux reads the file once at startup, so any changes require reloading via Settings → Reload settings or by restarting the app.

File location

Termux searches for the file at these paths in order, using the first one found:
PriorityPath
Primary~/.termux/termux.properties
Secondary~/.config/termux/termux.properties
Create the primary file if it does not already exist:
mkdir -p ~/.termux
nano ~/.termux/termux.properties
After saving changes, reload settings from the Termux notification or restart the app.

Boolean properties

All boolean properties accept true or false.
PropertyDefaultDescription
allow-external-appsfalseAllow third-party apps to execute commands in Termux via RUN_COMMAND intent. Enable with caution — this grants external apps shell access.
ctrl-space-workaroundfalseFix Ctrl+Space not working on some custom ROMs.
disable-file-share-receiverfalseDisable the activity that receives files shared into Termux from other apps.
disable-file-view-receiverfalseDisable the activity that handles files opened with Termux as a viewer.
disable-hardware-keyboard-shortcutsfalseDisable all hardware keyboard shortcuts (e.g., Ctrl+T for new session).
disable-terminal-session-change-toastfalseSuppress the toast notification that appears when switching between sessions.
enforce-char-based-inputfalseForce character-by-character input. Fixes missing characters on some Samsung devices where letters only appear after pressing Enter.
extra-keys-text-all-capstrueAutomatically uppercase the labels on extra key buttons.
fullscreenfalseRun Termux in fullscreen mode, hiding the Android status bar.
hide-soft-keyboard-on-startupfalseDo not show the soft keyboard when Termux first opens.
run-termux-am-socket-servertrueStart the termux-am socket server on app launch, enabling am commands from within Termux sessions.
terminal-onclick-url-openfalseOpen URLs in a browser on a single tap instead of requiring a long-press.
use-fullscreen-workaroundfalseApply a workaround for fullscreen issues on some Android versions.
Setting allow-external-apps=true lets any app with the com.termux.permission.RUN_COMMAND permission execute arbitrary commands in your Termux environment. Only enable this if you understand the security implications.

String properties

back-key

Controls what the hardware Back key does inside a terminal session.
ValueBehavior
backStandard Android back navigation (default)
escapeSend an Escape key event to the terminal
back-key=escape

bell-character

Defines how Termux responds to the terminal bell character (\a / ^G).
ValueBehavior
vibrateVibrate the device (default)
beepPlay a short beep sound
ignoreDo nothing
bell-character=ignore

night-mode

Controls the app color theme. See the terminal appearance page for more detail.
ValueBehavior
systemFollow the Android system dark/light mode setting (default)
trueForce dark (night) mode
falseForce light mode
night-mode=true

soft-keyboard-toggle-behaviour

Defines what happens when the keyboard toggle button is tapped.
ValueBehavior
show/hideShow or hide the keyboard (default)
enable/disableEnable or disable the keyboard entirely
soft-keyboard-toggle-behaviour=enable/disable

volume-keys

Controls whether the hardware volume keys act as volume controls or as virtual modifier keys within the terminal.
ValueBehavior
virtualVolume-up acts as a special key for shortcuts; volume-down opens special input (default)
volumeVolume keys control media volume as normal
volume-keys=volume

default-working-directory

The directory that new terminal sessions start in. Defaults to $HOME (/data/data/com.termux/files/home).
default-working-directory=/data/data/com.termux/files/home/projects

Numeric properties

Blink interval for the terminal cursor in milliseconds. Set to 0 to disable blinking.
  • Default: 0 (no blink)
  • Range: 0, or 1002000
terminal-cursor-blink-rate=600

terminal-margin-horizontal

Left and right padding inside the terminal view, in dp units.
  • Default: 3
  • Range: 0100
terminal-margin-horizontal=8

terminal-margin-vertical

Top and bottom padding inside the terminal view, in dp units.
  • Default: 0
  • Range: 0100
terminal-margin-vertical=4

terminal-transcript-rows

Number of rows kept in the scrollback buffer.
  • Default: 2000
  • Range: 10050000
terminal-transcript-rows=5000

terminal-toolbar-height

Scale factor for the extra-keys toolbar height.
  • Default: 1.0
  • Range: 0.43.0
terminal-toolbar-height=1.5

delete-tmpdir-files-older-than-x-days-on-exit

How many days old a file in $TMPDIR must be before it is deleted when Termux exits.
  • Default: 3
  • Range: -1100000
  • -1 disables deletion entirely; 0 deletes all files in $TMPDIR on exit.
delete-tmpdir-files-older-than-x-days-on-exit=7

Keyboard shortcut properties

These integer properties assign keyboard shortcuts (as key codes) to session actions. Each property takes a hardware key code integer.
PropertyAction
shortcut.create-sessionCreate a new terminal session
shortcut.next-sessionSwitch to the next session
shortcut.previous-sessionSwitch to the previous session
shortcut.rename-sessionRename the current session

Extra keys property

The extra-keys property configures the row of buttons displayed above the soft keyboard. See the extra keys page for complete syntax and examples.
extra-keys=[['ESC','/',{key: '-', popup: '|'},'HOME','UP','END','PGUP'], \
            ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
The extra-keys-style property controls which Unicode symbols are used as button labels:
ValueDescription
defaultClassic arrows + well-known symbols (default)
arrows-onlyOnly arrow symbols use glyphs; other keys show text
arrows-allArrows and navigation keys use glyphs
allAll keys with ISO symbols use them
noneAll keys display as plain text

Complete sample file

# ~/.termux/termux.properties

###############################################################################
# Keyboard
###############################################################################

# Treat hardware back key as escape
back-key=back

# What volume keys do inside the terminal
volume-keys=virtual

# Disable hardware keyboard shortcuts (Ctrl+T, Ctrl+N, etc.)
disable-hardware-keyboard-shortcuts=false

# Show/hide or enable/disable soft keyboard toggle button behavior
soft-keyboard-toggle-behaviour=show/hide

# Hide soft keyboard when app starts
hide-soft-keyboard-on-startup=false

# Fix Ctrl+Space on some ROMs
ctrl-space-workaround=false

# Force character-based input (fixes Samsung key input issues)
enforce-char-based-input=false

###############################################################################
# Extra keys toolbar
###############################################################################

extra-keys=[['ESC','/',{key: '-', popup: '|'},'HOME','UP','END','PGUP'], \
            ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]

extra-keys-style=default

extra-keys-text-all-caps=true

###############################################################################
# Terminal appearance
###############################################################################

# Dark mode: system | true | false
night-mode=system

# Cursor style: block | underline | bar
terminal-cursor-style=block

# Cursor blink rate in ms (0 = disabled, valid range: 100-2000)
terminal-cursor-blink-rate=0

# Horizontal padding in dp (0-100)
terminal-margin-horizontal=3

# Vertical padding in dp (0-100)
terminal-margin-vertical=0

# Toolbar height scale factor (0.4-3.0)
terminal-toolbar-height=1.0

# Scrollback rows (100-50000)
terminal-transcript-rows=2000

###############################################################################
# Session behavior
###############################################################################

# Default directory for new sessions
default-working-directory=/data/data/com.termux/files/home

# Bell response: vibrate | beep | ignore
bell-character=vibrate

# Open URLs on tap (instead of long-press)
terminal-onclick-url-open=false

# Show toast when switching sessions
disable-terminal-session-change-toast=false

###############################################################################
# Files and storage
###############################################################################

# Delete $TMPDIR files older than N days on exit (-1=never, 0=all)
delete-tmpdir-files-older-than-x-days-on-exit=3

# Disable file share/view receivers
disable-file-share-receiver=false
disable-file-view-receiver=false

###############################################################################
# Display
###############################################################################

# Run in fullscreen (hides status bar)
fullscreen=false

# Fullscreen workaround for some Android versions
use-fullscreen-workaround=false

###############################################################################
# Security
###############################################################################

# Allow third-party apps to run commands via RUN_COMMAND intent
allow-external-apps=false

###############################################################################
# Termux-AM socket server
###############################################################################

# Start the termux-am socket server on launch
run-termux-am-socket-server=true

Build docs developers (and LLMs) love