This is a really recent development and I am very excited about this. I finally found a way to have a somewhat proper Linux installation on my phone. Though it might not be the best place to have a CLI, it is really promising and I can rely on this to do some small stuff on the go. As the tools I use are getting simpler (Photoshop vs Imagemagick) and the hardware of the phones I own are getting better, it is should possible for my phone to do the things my 5 year old laptop could handle provided the right environment.
This is done by installing a full Arch installation on an Android phone under the termux environment using the installer from TermuxArch. The installation here is actually way easier than installing Arch on a normal desktop. We start by installing termux android app. When we open termux we get a bash shell. From here we install wget by running, pkg install wget . When this is complete we download and run the Arch installation script by,
# Download the script wget https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArch.sh # Adding execute permissions chmod a+x setupTermuxArch.sh # Run the script ./setupTermuxArch.sh
Now we can just follow the instructions in the script which will download and unpack a base Arch Linux system and ask you to edit the mirror list. At this point, just un-comment (remove the #) of the closest mirrors and save and exit the file. When the installation is complete you have a vanilla arch system on your mobile! Now we can theoretically install and use any program I have on my work desktop on my phone which including to ssh (client), vim, git, latex, R, node, postgres, mongodb, etc etc. I can even ssh into my work desktop straight from here. Below are some screenshots of the system (the chart is done entirely on phone!).
Great, Will try this. I am not sure how useful this can be. There is a minor typo(name of the script) in the chmod command statement.
Thanks! fixed the typo. Even I am not sure how useful this is, might be useful to do minor stuff on the go where there is no internet.
You can add that instruction below for rooted phones. Otherwise I don’t understand how possible to use ssh. I can not get it on norooted device
A can say that possible to get ssh on only rooted devices. The rest is correct.
You can get ssh client in a non rooted phone but ssh server might be more complicated.
When I try to download the script through wget, I get this error.
wget: not an http or ftp url: https://raw.githubusercontent.com/sdrausty/TermuxArch/master/setupTermuxArc
Please help!
Oh, the wget with termux seems to have no ssl support. You can just use ‘http’ instead of ‘https’ in the url.