-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathtermux.1.md.in
More file actions
906 lines (625 loc) · 26.5 KB
/
termux.1.md.in
File metadata and controls
906 lines (625 loc) · 26.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
% TERMUX(1) As of application version 0.117 | Termux User Documentation
% The Termux project contributors
% September 25, 2021
NAME
====
**Termux** - a terminal emulator application for Android OS.
DESCRIPTION
===========
Termux is an Android terminal emulator and Linux environment application that
works directly with no rooting or setup required. A minimal base system is
installed automatically, additional packages are available using the package
manager.
Here is a just a brief list of things you can do with Termux:
- Data processing with Python.
- Programming in a development environment.
- Downloading and managing files and pages using time-established tools.
- Learning the basics of the Linux command line environment.
- Running an SSH client.
- Synchronizing and backing up your files.
Of course, usage is not limited to the topics listed above.
Note that it is expected that you have at least basic knowledge about
command line and shell scripting.
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 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.
- Opening URL selector.
- Sharing text from the terminal to other apps (e.g. email or SMS).
- Launching password autofill service.
- Resetting the terminal if it gets stuck.
- Force terminating the current session.
- Styling the terminal by selecting a font and a color scheme.
- Check box for toggling screen always on feature.
- Showing this help page.
- Opening settings menu.
- Reporting issue.
The navigation drawer is revealed by swiping inwards from the left part of the
screen. It has four elements:
- Button for opening Termux settings.
- 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 it 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. It may also be expanded by pinch-zooming or performing
a single-finger glide to expose these 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.
Using wake-lock
---------------
If you are executing a long operation in Termux and want to turn off device
screen, you need to enable Wake Lock. You can do that through the notification,
by clicking on button "Acquire wakelock" or by executing this command:
termux-wake-lock
Wake locks are needed to prevent device from going into sleep mode. If you will
not do that, your tasks will run very slowly or even be paused. Acquired Wake
Lock implies a higher battery usage during standby.
Please note that Wake Lock does not affect network performance when screen is
off and you may observe a packet loss.
To release Wake Lock, you need to either run command
termux-wake-unlock
or click button "Release wakelock" in notification.
TOUCH KEYBOARD
==============
Use of keys like ALT, CTRL, ESC is necessary for working with a command line
programs. As Android touch keyboards usually do not include such keys, Termux
uses the Volume-Down button to emulate the CTRL key. For example, holding the
Volume-Down and "L" on touch keyboard will send the same input as pressing
key combination CTRL+L on a hardware keyboard.
The result of using CTRL (Volume-Down) in combination with a key depends on
which program is being used. See below for the list of common shortcuts usable
in most shells.
`CTRL+A`
: Move cursor to the beginning of line
`CTRL+C`
: Abort current process by sending SIGINT
`CTRL+D`
: Logout of a terminal session by sending EOF
`CTRL+E`
: Move cursor to the end of line
`CTRL+K`
: Delete from cursor to the end of line
`CTRL+U`
: Delete from cursor to the beginning of line
`CTRL+L`
: Clear the terminal
`CTRL+Z`
: Suspend current process by sending SIGTSTP
`CTRL+W`
: Clear prompt before word
The Volume-Up key also serves as a special key to produce certain input.
But please note that Volume-Up is not equivalent of the ALT key.
`Volume-Up+E`
: Escape key
`Volume-Up+T`
: Tab key
`Volume-Up+1`
: F1, Volume-Up+2 will produce F2, etc
`Volume-Up+0`
: F10 key
`Volume-Up+B`
: ALT+B, back a word when using Readline
`Volume-Up+F`
: ALT+F, forward a word when using Realine
`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`
: **\_**, the underscore character
`Volume-Up+P`
: Page Up key
`Volume-Up+N`
: Page Down key
`Volume-Up+.`
: CTRL+\\, send SIGQUIT
`Volume-Up+V`
: Show the volume control
`Volume-Up+Q`
: Toggle extra keys row
`Volume-Up+K`
: Another variant to toggle extra keys row
Termux supports the special key row which allows you to specify desired
keys like CTRL or ESC or their combinations. See section **EXTRA KEYS ROW**.
HARDWARE KEYBOARD
==============
The following shortcuts are available when using Termux with a hardware
(e.g. Bluetooth) keyboard:
`CTRL+ALT+C`
: Create new session
`CTRL+ALT+R`
: Rename current session
`CTRL+ALT+<DOWN>`
: Switch to next session
`CTRL+ALT+<UP>`
: Switch to previous session
`CTRL+ALT+<RIGHT>`
: Open drawer
`CTRL+ALT+<LEFT>`
: Close drawer
`CTRL+ALT+K`
: Toggle soft keyboard.
`CTRL+ALT+M`
: Show menu
`CTRL+ALT+U`
: Select URL
`CTRL+ALT+V`
: Paste clipboard content
`CTRL+ALT+ (+/-)`
: Adjust font size
`CTRL+ALT+ (1-9)`
: Go to numbered session
These shortcuts do not work with touch keyboard or extra keys row.
CONFIGURATION
=============
All Termux configuration is done through text file located at
~/.termux/termux.properties
It uses a simple key=value property syntax. See below for all supported
properties.
Note that updated configuration takes effect only when you have executed
termux-reload-settings
or have restarted the application.
`allow-external-apps`
: If set to "true", external applications are allowed to execute
arbitrary commands within the Termux environment through the
RUN_COMMAND intent, if permission com.termux.permission.RUN_COMMAND
has been granted.
This option is also required for functionality of **termux-open**
and other things using Content Provider as of Termux v0.118+.
`back-key`
: Controls the behaviour of key "back".
Accepts a one of these values:
- **back** - The default. A standard behaviour of Android OS, will
hide touch keyboard if shown, if not - move to home screen without
closing application.
- **escape** - When set, touching the key will send escape character.
`bell-character`
: Controls the behaviour of bell characters.
Accepts a one of these values:
- **vibrate** - vibrate the device.
- **beep** - short sound beep.
- **ignore** - ignore bell characters.
If property is not being set, the default behaviour is equivalent
to "bell-character=vibrate".
`ctrl-space-workaround`
: Set this to "true" if ctrl+space key combination does not work on hardware
keyboard.
`default-working-directory`
: An absolute path to default working directory. Default is Termux home.
`disable-hardware-keyboard-shortcuts`
: Set this to "true" to disable hardware keyboard shortcuts.
`disable-terminal-session-change-toast`
: Set this to "true" to disable toast notifications on terminal session
changes.
`enforce-char-based-input`
: Set this to "true" if you have issues with touch keyboard. For example text
is not being sent to terminal until you tap space. Or keyboard shows the
wrong layout, for example numeric.
Recommended for people using Samsung devices with stock touch keyboard.
This option is disabled by default as cause some issues with correctly
working keyboards.
`extra-keys-style`
: Controls the style of extra keys row view.
Accepts a one of these values:
- **arrows-only** - use symbols only for arrow buttons.
- **arrows-all** - replace some labels with well-known symbols.
- **all** - use symbols instead labels where possible.
- **none** - don't replace labels with symbols at all.
If extra keys row symbols are not displayed properly, use "none".
`extra-keys-text-all-caps`
: Set this to "true" to force capitalize the text on extra keys row buttons.
`fullscreen`
: Set this to "true" to have Termux running in a full screen mode.
The full screen mode may not work correctly on some devices. This issue
can be fixed by enabling "use-fullscreen-workaround".
`hide-soft-keyboard-on-startup`
: Set this to "true" to make software keyboard hidden on application
startup.
`shortcut.create-session`
: Sets a key combination for creating new session.
For example, use of
shortcut.create-session = ctrl + t
will allow to open a new terminal session by pressing CTRL + t.
`shortcut.next-session`
: Sets a key combination for switching to the next session.
Value format is same as for "shortcut.create-session" property.
`shortcut.previous-session`
: Sets a key combination for switching to the previous session.
Value format is same as for "shortcut.create-session" property.
`shortcut.rename-session`
: Sets a key combination for opening a dialog for renaming the
current session.
Value format is same as for "shortcut.create-session" property.
`soft-keyboard-toggle-behaviour`
: Controls the behaviour of "keyboard" button located in the drawer.
Accepts a one of these values:
- **enable/disable** - whether to enable or disable soft keyboard
at all.
- **show/hide** - whether to show or hide soft keyboard.
Default is show/hide.
`terminal-cursor-blink-rate`
: Controls the cursor blink rate. Valid value range is from 100
to 2000. If set to 0, the cursor blinking will be disabled.
`terminal-cursor-style`
: Controls the style of terminal cursor.
Accepts a one of these values:
- **block**
- **bar**
- **underline**
Default is block.
`terminal-margin-horizontal`
: Controls the terminal margin on left and right. Value is defined
in dp units in range from 0 to 100. Default is 3.
`terminal-margin-vertical`
: Controls the terminal margin on top and bottom. Value is defined
in dp units in range from 0 to 100. Default is 0.
`terminal-onclick-url-open`
: If set to "true", clicking on URL link in terminal transcript
will open it.
`terminal-toolbar-height`
: Controls the terminal toolbar height. Valid value range is from
0.4 to 3.0. Default is 1.
`terminal-transcript-rows`
: Controls how much lines are stored in scrollback buffer. Valid
value range is from 100 to 50000. Default is 2000.
Note that setting high values may affect console rendering
performance.
`use-black-ui`
: If set to "true", application will use primarily black color for
the most of user interface elements.
Setting this to "false" will have opposite effect.
If the property is not set, then application will choose colors
accordingly to the current system theme.
`use-fullscreen-workaround`
: Set this to "true" if experience issues with full screen mode.
`volume-keys`
: Controls the behaviour of volume buttons.
Accepts a one of these values:
- **virtual** - volume buttons will act as special keys.
- **volume** - control sound volume as usual.
Default is "virtual".
EXTRA KEYS ROW
==============
Termux also has an extra keys row(s) which allows you to extend your
current keyboard. To enable the extra keys row you have to long tap
on the keyboard button in the left drawer menu or Volume-Down+K key
combination.
Layout of the extra keys rows is configurable through the standard
Termux configuration file located in
~/.termux/termux.properties
See section **CONFIGURATION** to learn more about Termux properties.
Sample configuration of 2 extra keys rows:
extra-keys = [ \
['ESC','/','-','HOME','UP','END','PGUP'], \
['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN'] \
]
Configuration may be done as one line or be spread between multiple lines
by using backslashes like in example above.
Value format is 2-dimensional JSON array.
It is possible to configure a popups buttons which can be triggered by swiping
up on the respective keys.
Here is a syntax for the popup key object:
{key: KEY, popup: POPUP_KEY}
Alternate, more advanced syntax for defining the popup:
{key: KEY, popup: {macro: 'KEY COMBINATION', display: 'Key combo'}}
An example of complex Termux extra keys configuration with using popups:
extra-keys = [[ \
{key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}}, \
{key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \
{key: ALT, popup: {macro: "CTRL f TAB", display: "tmux →"}}, \
{key: TAB, popup: {macro: "ALT a", display: A-a}}, \
{key: LEFT, popup: HOME}, \
{key: DOWN, popup: PGDN}, \
{key: UP, popup: PGUP}, \
{key: RIGHT, popup: END}, \
{macro: "ALT j", display: A-j, popup: {macro: "ALT g", display: A-g}}, \
{key: KEYBOARD, popup: {macro: "CTRL d", display: exit}} \
]]
SUPPORTED KEYS
--------------
Each key "entry" can be either a string such as '|', '/', '=' or one of the
values listed below.
- CTRL ("special key")
- ALT ("special key")
- FN ("special key")
- SPACE
- ESC
- TAB
- HOME
- END
- PGUP
- PGDN
- INS
- DEL
- BKSP
- UP
- LEFT
- RIGHT
- DOWN
- ENTER
- BACKSLASH
- QUOTE
- APOSTROPHE
- F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12
- KEYBOARD (hide the keyboard)
- DRAWER (open app drawer)
Each of the three "special keys" listed above should only be listed at most
ONCE in the extra-keys definition i.e. do NOT have more than one CTRL key.
Having more than one instance of any "special key" will result in a bug
whereby those keys do not function correctly.
A note about backslash: this character has special meaning and you should
not use it directly to define a key. Use 'BACKSLASH' instead, otherwise
properly escape it - `'\\\\'`.
TEXT INPUT VIEW
---------------
Termux does not support the advanced features of touch keyboards like
autocorrection, prediction and swipe typing. To solve this, it provides a
text input view. Text entered in it will get pasted to the terminal. Because
it is 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 row to the left.
DIFFERENCES FROM LINUX DISTRIBUTIONS
====================================
Termux does not guarantee full compatibility with GNU/Linux environment and
you may observe inconvenient behaviour of some utilities, especially from
those which were not officially ported to Android OS (Termux). See below to
learn about the major differences.
`No compliance with Filesystem Hierarchy Standard`
: Termux does not follow Filesystem Hierarchy Standard because Android does
not make root file system world-writable and Termux is not a virtual
machine.
All files are stored within the application private directory on internal
storage to ensure that application has full control over its files and
also special features like symlinks or file access modes (**chmod(1)**).
The data is being stored in 2 main locations:
`@TERMUX_HOME@`
: A home directory where user can place his files.
`@TERMUX_PREFIX@`
: The prefix - a place where all packages are being extracted during
installation. Has a directory structure similar to the root file
system of traditional Linux distributions.
You may have problems with running some utilities accessing standard
directories like /var or /tmp.
Termux has some workarounds for that. For example, it preloads a shared
library "libtermux-exec.so" which intercepts "execve()" and maps /bin to
directory located in the prefix.
With utility **termux-chroot** that comes as part of package **proot(1)**
you should be able to emulate a FHS-compliant root file system.
`No GNU libc`
: Termux does not use GNU libc. Instead it uses a Bionic libc and dynamic
linker provided by Android OS.
Programs linked with GNU libc will not work in Termux. Bionic libc has
different ABI and dynamic linker path. You likely will observe weird
messages "No such file or directory" when attempting to run executable
file but know that file is present. That happens because dynamic linker
cannot be started because does not exist on expected location.
Programs which were statically-linked with GNU libc may misbehave too.
You may get a "Bad system call" errors. Also networking software will
likely show DNS resolution errors because Android does not provide
`/etc/resolv.conf` and by default even in statically-linked programs
GNU libc still uses libresolv as shared library which is not present.
Consider to rebuild your software in Termux environment by using clang.
`Only one user`
: Termux environment is single-user only. It operates under user id
assigned by Android OS which you cannot change.
There no privilege separation, all Termux files such as package data
or user data in home directory is owned by same user id. Be extremely
careful when executing third-party scripts as they can easily do
unauthorized modifications which may lead to broken Termux installation
or lost user data.
PACKAGE MANAGEMENT
==================
Termux uses **apt(8)** as package manager, just like Debian. However we
highly recommend to use our wrapper **pkg** which simplifies certain
tasks and also automatically picks the mirror to help reduce traffic usage
on the origin repositories. See its usage below.
Installing package:
pkg install <package name>
Uninstall package:
pkg uninstall <package name>
Reinstall package:
pkg reinstall <package name>
List the all available packages:
pkg list-all
List the installed packages:
pkg list-installed
Search packages:
pkg search <query>
Upgrade packages:
pkg upgrade
Termux implements a rolling-release updates scheme to reduce amount of work
needed to maintain packages since developer team is small. You need to check
for updates on a regular basis, especially before installing a new package.
Otherwise at some day your environment may become broken.
If you prefer to use **apt(8)** over **pkg**, please ensure that for
installing updates you use these commands:
apt update
apt full-upgrade
Also always run "apt update" before installing package. The wrapper **pkg**
does that for you automatically.
ACCESSING THE STORAGE
=====================
By default Termux does not provide access to storage volumes where you
typically store your files like pictures or documents. In order to get
access to shared storage, execute the next command:
termux-setup-storage
This will prompt you for Storage Access Permission. Once it granted, Termux
will setup symlinks to various standard directories under "~/storage".
`~/storage/shared`
: The root directory of shared storage.
`~/storage/downloads`
: Standard directory where downloaded files are stored.
`~/storage/dcim`
: Standard directory where captured photos and video are stored.
`~/storage/pictures`
: Standard directory for photo gallery.
`~/storage/music`
: Standard directory where music albums are stored.
`~/storage/movies`
: Standard directory where videos are stored.
`~/storage/external-1`
: The private directory of Termux on external SD-card.
Note that if you decide to wipe Termux data or uninstall application,
all files stored in private application directories will be deleted.
Note about external storage
---------------------------
Android does not allow to have a direct write access to external storage
like SD-cards and USB drives unless you are not doing so in private
directories like
/storage/0123-ABCD/Android/data/com.termux/files
If you want to write files to storage root or directory other than private
one of Termux, you need superuser permissions.
Android applications like file managers can do that because they use a
special API called Storage Access Framework. But command line utilities
cannot use this one.
Transferring files to Termux
----------------------------
To put files into Termux, you have 2 variants.
The first one would be copying or moving files from shared storage into
Termux directory by using **cp(1)** or **mv(1)**. You may also setup
a some file server and access it through localhost.
The second variant would be usage of file manager application which supports
Storage Access Framework and is able to attach volumes. Just select "Termux"
volume from menu and you should be able to access home directory.
Sharing data to other applications
-----------------------------------
You may give a temporary read access to certain files stored within
Termux. Use command
termux-open
to do this. You may specify a MIME type by using option "\-\-content-type" when
sharing the file to ensure that it will be opened by correct application.
Similarly to sharing files, you may share URL. You will need to use
command "**termux-open-url**".
Android 11+
-----------
Since Android 11 Termux may not be able to provide the access to shared and
external storage. This is not a bug. Just new restrictions which enforce
storage access over Android API which cannot be used by shell.
From that point you are locked to Termux private directories like $HOME or
such on storage volume:
/storage/self/primary/Android/data/com.termux/files
You still should be able to exchange files with Termux home directory by
accessing Termux virtual volume through File managers supporting Storage
Access Framework.
BACKUP AND RESTORE
==================
Termux installation can be backed up by archiving directory $PREFIX and
storing the file in safe location. A rudimentary backup tools are already
bundled with package 'termux-tools', though you are free to use your own.
How to back up Termux installation ($PREFIX):
termux-backup /sdcard/termux.tar.gz
How to restore Termux installation from backup:
termux-restore /sdcard/termux.tar.gz
Note that backup performed this way does not include the content of your
home directory. Restoring procedure will overwrite the content of $PREFIX
deleting all extra files which were not present in backup archive. So be
careful!
RECOVERY IF SESSION FAILS TO START
==================================
If Termux session cannot be launched due to misconfiguration in dotfiles,
you still should be able to start a failsafe session. How-to:
1. Long click on Termux launcher icon.
2. Select shortcut "failsafe".
Once you are in a failsafe session, navigate to Termux home directory and
rename or delete the dotfiles causing the issue. Finally, restart the
application.
If problem is not with the dotfiles, for example you have messed up Termux
prefix and do not know what to do, our recommendation is *complete reinstallation*
by executing
rm -rf @TERMUX_PREFIX@
This will erase all packages but will not touch your home directory.
ENVIRONMENT
===========
Termux exposes some variables set by Android OS as well as its own. Here
is a brief list of default environment variables, their description and
values.
`HOME`
: Path to Termux home.
Termux home directory is a place for user files. It is located at
@TERMUX_HOME@
Do not modify the value of this environment variable since Termux
doesn't support customizing location of the home directory.
`PREFIX`
: Termux installation prefix.
A base directory for Termux installation. It is located at
@TERMUX_PREFIX@
Do not modify the value of this environment variable. Termux packages
are not relocatable. Some of them may also look this variable to find
their files.
`PATH`
: Utility lookup paths for shells.
Used by shells to find command line utilities. By default, it contains
this value:
@TERMUX_PREFIX@/bin
You may append or prepend your own paths if needed, for example:
export PATH=$PATH:$HOME/bin
But make sure that Termux-specific bin directory location is not missing.
`LANG`
: Locale.
Mimic support of UTF-8 en_US locale, so programs will properly handle
Unicode characters.
Default value is "en_US.UTF-8".
As Termux does not support locales, changing this variable is not
recommended and may have unexpected effects.
TOOLS
=====
Tools bundled with termux-tools
`termux-logout`
: Run cleanup commands when executed from last remaining Termux session. Intended to be run from
~/.bash_logout
termux-logout
`termux-title`
: Update Termux tab titles similar to tmux. Run with termux-services package from
$SVDIR/title/run
exec termux-title
FILES
=====
A list of files which have special meaning for the Termux application.
`~/bin/termux-url-opener`
: A script for processing an intent when a third-party application shares
an URL with Termux.
`~/bin/termux-file-editor`
: A script for processing an intent when a third-party application shares
a file with Termux.
`~/storage`
: A directory containing symlinks to shared or external storages and to
certain standard directories.
Do not store files directly under this directory. Put them to locations
accessible through symlinks instead.
`~/.termux/termux.properties`
: Application configuration file.
`~/.termux/colors.properties`
: A configuration file containing a color scheme for styling the terminal.
Usually is generated by Termux:Styling add-on.
`~/.termux/font.ttf`
: A file containing TTF font data for styling the terminal.
Usually is generated by Termux:Styling add-on.
BUGS
====
Report application issues to \<https://github.com/termux/termux-app/issues\>.
Package-related issues should be reported to \<https://github.com/termux/termux-packages/issues\>.
SEE ALSO
========
Complete and up-to-date infomation about Termux usage is available on Termux
Wiki here: \<https://wiki.termux.com/wiki/Main_Page\>.