pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

20170614-termux_on_android.md (2134B)


      1 Do you prefer working in the terminal than with horribly flash GUIs? I prefer it so much I even do away with typical icon based launchers on my Android phone and use a [terminal](https://github.com/Andre1299/TUI-ConsoleLauncher).
      2 
      3 Sometime I need more than just a launcher, and this is where [termux](https://termux.com/) comes in. Termux is an "Android terminal emulator and Linux environment app". You can download it from [Play](https://play.google.com/store/apps/details?id=com.termux) or [F-Droid](https://f-droid.org/repository/browse/?fdid=com.termux) and install without rooting your device. It comes with a number of shells to choose from and install packages using `apt`.
      4 
      5 Once installed there is no setup required, however there are a few things that you can do to improve the environment. These steps are personal preference, and as always use the commands at your own risk!
      6 
      7 First make sure everything is up to date
      8 ```
      9 apt update && apt upgrade
     10 ```
     11 
     12 If you look in the current directory you will see there is nothing there
     13 ```
     14 pwd
     15   /data/data/com.termux/files/home
     16 ls -l
     17 ```
     18 
     19 You can set up links to the shared internal storage by running
     20 ```
     21 termux-setup-storage
     22 ```
     23 
     24 This creates symlinks to a number of directories in your phone's storage
     25 ```
     26 pwd
     27   /data/data/com.termux/files/home
     28 ls -1
     29   storage
     30 ls -1 storage/
     31   dcim
     32   downloads
     33   movies
     34   music
     35   pictures
     36   shared
     37 ```
     38 
     39 Use the command `ls -l` to see the links.
     40 
     41 A number of packages are provided
     42 ```
     43 busybox --help
     44 ```
     45 
     46 I tend to install a number of others (in no particular order)
     47 ```
     48 apt install openssh vim zsh less irssi tmux git stow htop
     49 ```
     50 
     51 Then we can pull down our dotfiles!
     52 ```
     53 git clone https://github.com/pyratebeard/dotfiles.git
     54 cd dotfiles
     55 stow {vim,zsh,irssi,tmux}
     56 chsh -s zsh
     57 ```
     58 
     59 Now exit termux using `exit` or Ctrl-D and when you restart you should be in a more comfortable environment.
     60 
     61 There we go. A rather quick and simple run through of termux. All this information can be found on their [help page](https://termux.com/help.html). For more help or information contact me in the usual ways, or join the #termux IRC channel on freenode.
     62