nyuuzyou/wikis huggingface dataset:
Termux-infrared-transmit

Transmit an infrared pattern.
== Usage ==
termux-infrared-transmit -f frequency pattern
The pattern is specified in comma-separated on/off intervals, such as '20,50,20,30'. Only patterns shorter than 2 seconds will be transmitted.
=== Options ===
 -f frequency IR carrier frequency in Hertz. Mandatory.
== Note ==
This API can be used only on devices that have infrared transmitter.
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-keyring

The various official package repositories are maintained and signed by the members of the termux-team. 
Each member has there own GPG key that is used for signing and the public component of these keys are available in the package termux-keyring.
Installing termux-keyring makes apt recognize and trust these keys, which is necessary for updating, and downloading from, the repositories.
== Current keys in termux-keyring ==
=== Grimler's key ===
Grimler's key is available as the file grimler.gpg and has fingerprint
 2C7F 29AE 9789 1F64 19A9 E2CD B007 6E49 0B71 616B
=== Automatic build's key ===
When packages are built and uploaded automatically using CI/CD, the repository is signed with the key termux-autobuilds.gpg and has fingerprint 
 CC72 CF8B A7DB FA01 8287 7D04 5A89 7D96 E57C F20C
Termux-location

Get the device location.
== Usage ==
termux-location [-p provider] [-r request]
Output displayed in json format.
=== Options ===
 -p provider location provider [gps/network/passive] (default: gps)
 -r request kind of request to make [once/last/updates] (default: once)
== Note ==
* GPS likely will not work in buildings as device must be exposed to satellite signal.
* GPS also requires that your device clock is set correctly. For the answer to question why, learn how GPS works.
* Do not expect immediate location result. Even network location request may take some time.
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-media-player

Play specified file using Media Player API.
== Usage ==
termux-media-player [command] [args]
=== Commands ===
 info Displays current playback information
 play Resumes playback if paused
 play <file> Plays specified media file
 pause Pauses playback
 stop Quits playback
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-media-scan

Scan the specified file(s) and add to the media content provider.
== Usage ==
termux-media-scan [-v] [-r] file [file...]
Output displayed in plain text (informational message).
=== Options ===
 -r scan directories recursively
 -v verbose mode
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-microphone-record

Record using microphone on your device.
== Usage ==
termux-microphone-record [args]
=== Options ===
 -d Start recording w/ defaults
 -f <file> Start recording to specific file
 -l <limit> Start recording w/ specified limit (in seconds, unlimited for 0)
 -e <encoder> Start recording w/ specified encoder (aac, amr_wb, amr_nb)
 -b <bitrate> Start recording w/ specified bitrate (in kbps)
 -r <rate> Start recording w/ specified sampling rate (in Hz)
 -c <count> Start recording w/ specified channel count (1, 2, ...)
 -i Get info about current recording
 -q Quits recording
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-sensor

Get information about types of sensors as well as live data.
== Usage ==
termux-sensor [options]
Output displayed in json format.
=== Options ===
 -h, help Show this help
 -a, all Listen to all sensors (WARNING! may have battery impact)
 -c, cleanup Perform cleanup (release sensor resources)
 -l, list Show list of available sensors
 -s, sensors [,,,] Sensors to listen to (can contain just partial name)
 -d, delay [ms] Delay time in milliseconds before receiving new sensor update
 -n, limit [num] Number of times to read sensor(s) (default: continuous) (min: 1)
== Note ==
Different devices have different sensors. Check the available sensors for your device with command termux-sensor -l.
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-services

termux-services contains a set of scripts for controlling services.
Instead of putting commands in ~/.bashrc or ~/.bash_profile, they can be started and stopped with termux-services.
 Supported services
Package 	Daemon 	Port	Description
apache2 	httpd 	8080	Apache Web Server HTTP Web Server
at 	atd 	 	AT and batch delayed command scheduling utility and daemon at
bitcoin 	bitcoind 	 	Bitcoin Core
busybox 	telnetd 	8023	Remote terminal service Telnet
busybox 	ftpd 	8021	FTP (File Transfer Protocol) FTP
cronie 	crond 	 	Daemon that runs specified programs at scheduled times cron
emacs 	emacsd 	 	Extensible, customizable text editor-and more EMACS
ipfs 	ipfs 	 	A peer-to-peer hypermedia distribution protocol IPFS
libmosquitto	mosquitto 	1883	MQTT is a lightweight, publish-subscribe network protocol MQTT
lighttpd 	lighttpd 	8080	Lighttpd Small webserver HTTP Web Server
lnd 	lnd 	 	Lightning Network Daemon
mariadb 	mysqld 	3306	MariaDB Community-developed fork of the MySQL from its original authors
mpd 	mpd 	 	Music Player Daemon (MPD)
mpdscribble 	mpdscribble 	 	MPD client which submits tracks being played
nginx 	nginx 	8080	NGINX Web server HTTP Web Server
openssh 	sshd 	8022	OpenSSH SSH
postgresql 	postgres 	5432	PostgreSQL database PostgreSQL
privoxy 	privoxy 	 	Privoxy is non-caching web proxy with advanced filtering capabilities HTTP Proxy
tor 	tor 	 	The Onion Router anonymizing overlay network Tor
transmission	transmission	 	BitTorrent client BitTorrent
To install termux-services, run
 pkg install termux-services
and then restart termux so that the service-daemon is started.
To then enable and run a service, run
 sv-enable <service>
If you only want to run it once, run
 sv up <service>
To later stop a service, run:
 sv down <service>
Or to disable it
 sv-disable <service>
A service is disabled if `$PREFIX/var/service/<service>/down` exists, so the `sv-enable` and `sv-disable` scripts touches, or removes, this file.
termux-services uses the programs from runit to control the services. A bunch of example scripts are available from the same site.
If you find a script you want to use, or if you write your own, you can use set it up by running:
 mkdir -p $PREFIX/var/service/<PKG>/log
 ln -sf $PREFIX/share/termux-services/svlogger $PREFIX/var/service/<PKG>/log/run
and then put your run script for the package at $PREFIX/var/service/<PKG>/run and make sure that it is runnable.
You can then run
 sv up <PKG>
to start it.
Log files for services are situated in $PREFIX/var/log/sv/<PKG>/ with the active log file named "current".
=== Starting termux-services on boot ===
If you want your services to start on device boot, see the example in Termux:Boot
Termux-setup-storage

In order to have access to shared storage (/sdcard or /storage/emulated/0), Termux needs a storage access permission. It is not granted by default and is not requested on application startup since it is not necessary for normal application functioning.
Storage access permission will not enable write access to the external sdcard and drives connected over USB.
== How To ==
Open Termux application and do following steps:
# Execute command termux-setup-storage. If you already have executed this command previously or for some reason already have storage directory under $HOME, utility will ask you to confirm wiping of ~/storage. This is safe as will only rebuild symlink set.
# If permission request dialog was shown - grant permission.
# Verify that you can access shared storage ls ~/storage/shared
Termux uses utility termux-setup-storage to configure access to the shared storage and setup these symlinks for quick access to various kinds of storages:
* The root of the shared storage between all apps.
 ~/storage/shared
* The standard directory for downloads from e.g. the system browser.
 ~/storage/downloads
* The traditional location for pictures and videos when mounting the device as a camera.
 ~/storage/dcim
* Standard directory in which to place pictures that are available to the user.
 ~/storage/pictures
* Standard directory in which to place any audio files that should be in the regular list of music for the user.
 ~/storage/music
* Standard directory in which to place movies that are available to the user.
 ~/storage/movies
* Symlink to a Termux-private folder on external storage (only if external storage is available).
 ~/storage/external-1
=== Android 11 ===
You may get "Permission denied" error when trying to access shared storage, even though the permission has been granted.
Workaround:
# Go to Android Settings --> Applications --> Termux --> Permissions
# Revoke Storage permission
# Grant Storage permission again
This is a known issue, though this is not Termux bug.
Termux-share

Share a specified file or text from standard input.
== Usage ==
termux-share [options] [file]
If file to share is not specified, program will read standard input.
=== Options ===
 -a action which action to performed on the shared content:
 edit/send/view (default:view)
 -c content-type content-type to use (default: guessed from file extension,
 text/plain for stdin)
 -d share to the default receiver if one is selected
 instead of showing a chooser
 -t title title to use for shared content (default: shared file name)
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-sms-list

List SMS messages.
== Usage ==
termux-sms-list [options]
Output displayed in json format.
=== Options ===
 -d show dates when messages were created
 -l limit offset in sms list (default: 10)
 -n show phone numbers
 -o offset offset in sms list (default: 0)
 -t type the type of messages to list (default: inbox):
 all|inbox|sent|draft|outbox
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-sms-send

Send a SMS message to the specified recipient number(s).
== Usage ==
 termux-sms-send -n number[,number2,number3,...] [-s slot] [text]
The text to send is either supplied as arguments or read from stdin if no arguments are given.
=== Options ===
 -n number(s) recipient number(s) - separate multiple numbers by commas
 -s slot sim slot to use - silently fails if slot number is invalid or if missing READ_PHONE_STATE permission
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-toast

Show text in a Toast (a transient popup).
== Usage ==
termux-toast [options] [text]
The text to show is either supplied as arguments or read from stdin if no arguments are given.
=== Options ===
 -h show this help
 -b set background color (default: gray)
 -c set text color (default: white)
 -g set position of toast: [top, middle, or bottom] (default: middle)
 -s only show the toast for a short while
== Note ==
Color can be a standard name (i.e. red) or 6 / 8 digit hex value (i.e. "#FF0000" or "#FFFF0000") where order is (AA)RRGGBB. Invalid color will revert to default value.
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-tts-speak

Speak text with a system text-to-speech (TTS) engine. The text to speak is either supplied as arguments or read from stdin if no arguments are given.
== Usage ==
termux-tts-speak [-e engine] [-l language] [-n region] [-v variant] [-p pitch] [-r rate] [-s stream] [text-to-speak]
=== Options ===
 -e engine TTS engine to use (see termux-tts-engines)
 -l language language to speak in (may be unsupported by the engine)
 -n region region of language to speak in
 -v variant variant of the language to speak in
 -p pitch pitch to use in speech. 1.0 is the normal pitch,
 lower values lower the tone of the synthesized voice,
 greater values increase it.
 -r rate speech rate to use. 1.0 is the normal speech rate,
 lower values slow down the speech
 (0.5 is half the normal speech rate)
 while greater values accelerates it
 (2.0 is twice the normal speech rate).
 -s stream audio stream to use (default:NOTIFICATION), one of:
 ALARM, MUSIC, NOTIFICATION, RING, SYSTEM, VOICE_CALL
== Tips & Tricks ==
=== Termux-tts-speak is slow to start ===
It takes quite some time for it to actually play anything, but most of that lost time comes due to startup time of the engine. You can keep the engine running by using a fifo queue instead.
 mkfifo ~/.tts
 while true; do cat ~/.tts; done | termux-tts-speak
Then you can use it like this:
 echo Today is > ~/.tts
 date > ~/.tts
This will keep termux-tts-speak running and just play anything that's send to ~/.tts
Termux-usb

List or access USB devices.
== Usage ==
termux-usb [-l | [-r] [-e command] device]
=== Options ===
 -l list available devices
 -r show permission request dialog if not already granted
 -e command execute the specified command with a file descriptor
 referring to the device as its argument
=== Details ===
Android doesn't allow direct access to usb devices, you need to request a file
descriptor for the device from the Java API instead. This means that Linux usb
software will need to be modified to work within Termux.
Here is a sample project to get started:
Make sure you have the Termux:API application installed.
Set up the necessary packages within Termux.
 pkg install termux-api libusb clang
Enable OTG (host) mode and insert a usb device. Wait for it to be
recognised and verify it using the API:
 termux-usb -l
Let's assume the device is /dev/bus/usb/001/002.
Ask for permission to access it:
 termux-usb -r /dev/bus/usb/001/002
Try using it from libusb. Save this sample code as usbtest.c: (download)
 #include <stdio.h>
 #include <assert.h>
 #include <libusb-1.0/libusb.h>
 
 int main(int argc, char **argv) {
 libusb_context *context;
 libusb_device_handle *handle;
 libusb_device *device;
 struct libusb_device_descriptor desc;
 unsigned char buffer[256];
 int fd;
 assert((argc > 1) && (sscanf(argv[1], "%d", &fd) == 1));
 libusb_set_option(NULL, LIBUSB_OPTION_NO_DEVICE_DISCOVERY);
 assert(!libusb_init(&context));
 assert(!libusb_wrap_sys_device(context, (intptr_t) fd, &handle));
 device = libusb_get_device(handle);
 assert(!libusb_get_device_descriptor(device, &desc));
 printf("Vendor ID: %04x\n", desc.idVendor);
 printf("Product ID: %04x\n", desc.idProduct);
 assert(libusb_get_string_descriptor_ascii(handle, desc.iManufacturer, buffer, 256) >= 0);
 printf("Manufacturer: %s\n", buffer);
 assert(libusb_get_string_descriptor_ascii(handle, desc.iProduct, buffer, 256) >= 0);
 printf("Product: %s\n", buffer);
 if (libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber, buffer, 256) >= 0)
 printf("Serial No: %s\n", buffer);
 libusb_exit(context);
 }
This utility shows some basic information about a usb device. It takes the device file
descriptor as its only command-line argument. Let's compile it:
 gcc usbtest.c -lusb-1.0 -o usbtest
Use the -e option of termux-usb to run ./usbtest with the correct file descriptor:
 
 termux-usb -e ./usbtest /dev/bus/usb/001/002
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux-wake-lock

termux-wake-lock and termux-wake-unlock can be used to trigger a wakelock which causes Android not to go into deep sleep.
Since the default login shell is bash;
it could be useful to call termux-wake-lock in your ~/.profile (or ~/.bash_profile where appropriate) 
and termux-wake-unlock in your ~/.bash_logout;
for single session usage. For multiple sessions, you'll have to manage the unlock call yourself. But it is an option to call bash once and use byobu to get a multiple bash session running within a single termux session.
Termux-wallpaper

Change wallpaper on your device.
== Usage ==
termux-wallpaper cmd [options]
=== Options ===
 -f <file> set wallpaper from file
 -u <url> set wallpaper from url resource
 -l set wallpaper for lockscreen (Nougat and later)
== See Also ==
Termux:API - Termux addon that exposes device functionality as API to command line programs.
Termux:Boot

This addon will run scripts immediately after device was booted.
== Installation ==
Download add-on from F-Droid
Important: Do not mix installations of Termux and Addons between Google Play and F-Droid. They are presented at these portals for your convenience. There are compatibility issues when mixing installations from these Internet portals. This is because each download website uses a specific key for keysigning Termux and Addons.
== Usage ==
1. Install the Termux:Boot app.
2. Go to Android settings and turn off battery optimizations for Termux and Termux:Boot applications.
3. Start the Termux:Boot app once by clicking on its launcher icon. This allows the app to be run at boot.
4. Create the ~/.termux/boot/ directory: Put scripts you want to execute inside the ~/.termux/boot/ directory. If there are multiple files, they will be executed in a sorted order.
5. It is helpful to run termux-wake-lock as first thing to prevent the device from sleeping.
Example: to start an sshd server and prevent the device from sleeping at boot, create the following file at ~/.termux/boot/start-sshd:
 #!/data/data/com.termux/files/usr/bin/sh
 termux-wake-lock
 sshd
If you want Termux-services to start services on boot, you can use:
 #!/data/data/com.termux/files/usr/bin/sh
 termux-wake-lock
 . $PREFIX/etc/profile
Termux:Styling

This addon provides color schemes and fonts to customize the appearance of your Termux terminal.
== Installation ==
Download add-on from F-Droid
Important: Do not mix installations of Termux and Addons between Google Play and F-Droid. They are presented at these portals for your convenience. There are compatibility issues when mixing installations from these Internet portals. This is because each download website uses a specific key for keysigning Termux and Addons.
== How it works ==
Styling add-on is just a package with pre-defined color schemes and font files. When you use it to change terminal style, some files are being extracted and placed at specific locations in home directory.
Color schemes are written to
 /data/data/com.termux/files/home/.termux/colors.properties
Fonts are placed at
 /data/data/com.termux/files/home/.termux/font.ttf
User can place own files to these paths, which can be useful if a certain font or color scheme is not available through the add-on. If you wish to do styling configuration manually, Termux:Styling application is not necessary.
Termux:Tasker

This add-on provides a Tasker plug-in to execute Termux programs.
== Installation ==
Download add-on from F-Droid
Important: Do not mix installations of Termux and Addons between Google Play and F-Droid. They are presented at these portals for your convenience. There are compatibility issues when mixing installations from these Internet portals. This is because each download website uses a specific key for keysigning Termux and Addons.
== Usage ==
Create a new Tasker Action.
In the resulting Select Action Category dialog, select Plugin.
In the resulting dialog, select Termux:Tasker.
Edit the configuration to specify the executable in ~/.termux/tasker/ to execute, and if it should be executed in the background (the default) or in a new terminal session.
Termux Google Play

After not being updated on Google Play for many years due to Google Play policy requirements, Termux is since June 2024 back on Google Play for devices having Android 11 or later: https://play.google.com/store/apps/details?id=com.termux
See https://github.com/termux-play-store for more information.
As noted there, it's under development and contains stability issues and limitations, which is why most users should install Termux from F-Droid if possible while things are stabilising and issues are being sorted out.
Termux Wiki (на русском)

== The Termux Wiki ==
Информация по использованию Termux и его пакетов.
== Введение ==
Termux - приложение реализующее Linux-подобную среду взаимодействие с которой происходит посредством консоли без необходимости иметь root-права на устройстве.
Минимальный набор программ устанавливается автоматически, дополнительные пакеты можно установить при помощи пакетного менеджера.
; С чего начать: Информация для новичков.
; Пользовательский интерфейс: Как пользоваться приложением.
; Настройки: Как настроить приложение.
; Программы: Работа с программной средой (пакетами).
; Оборудование: Использование аппаратной мыши, клавиатуры и USB-OTG.
== Установка ==
Системные требования:
* Android 7.0 - 12.0 (известные проблемы)
* CPU: AArch64, ARM, i686, x86_64.
* Минимум 200 MB свободного места на внутренней памяти.
Обратите внимание что Termux не поддерживает устройства на ARM без NEON SIMD, например
устройства на процессорах Nvidia Tegra 2.
Официально доступен для установки с данных источников:
* F-Droid
* Nethunter Store
== Дополнения ==
== FAQ ==
; Часто задаваемые вопросы об использовании Termux
* Что такое Termux?
* Я новичок. Для чего я могу использовать Termux?
* Могу ли я осуществить хакерство с помощью Termux?
* Как получить справку о конкретном пакете?
* Могу ли я внести свой вклад?
Читать далее...
== Сообщество ==
Не нашли решение в FAQ ?
Просто хотите познакомиться с нами ?
Хотите помочь разработчикам и пользователям Termux, внося свой вклад в проект ?
Посмотрите страницы сообщества. Будь то для удовольствия или серьезной работы, пожалуйста, присоединяйтесь к нам.
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 (if you have gesture navigation enabled in Android, you will need to hold briefly on the edge of the screen before swiping to bring up the navigation drawer instead of going back in Android). 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.
=== Graphical interface (via external vncviewer) ===
Termux also has fairly basic graphical user interface support based on X11.
To enable Graphical Environment support see Graphical Environment
= See Also =
* Touch Keyboard