While I was really excited when i encountered it, I didn't find any practical uses.
On my tablet, I used it as an ssh client.
On my VR headset, I used it to create a self-contained development environment: https://www.reddit.com/r/cyberDeck/comments/fc5sfr/oculus_qu...
You can use its PRoot functionality to run various Linux distros: https://wiki.termux.com/wiki/PRoot
And you can run Linux GUI apps if they are compiled properly: https://github.com/adi1090x/termux-desktop
Scenario 1: You're in the middle of your data center. Internal tools/tests say that $service is running correctly, but external customers says it isn't working, and firewall won't let you use an external IP without having to run 3 floors away on the other side of the building.
Solution 1: Open termux, and running telnet aaa.bbb.ccc.ddd $PORT and test
Quicker then waiting for a co-worker to get back to you on Slack.
Scenario 2: You are setting up a new VPN server and want to confirm that your outgoing connections are being routed through the correct IPs/Gateways.
Solution 2: Open termux and run tracert and see where you are being routed.
and many more....... I used to own a Nokia N900. Having a Linux CLI that works in portable device (wifi + cellular) is so damn handy. I use it atleast 2 times a week. It's a perfect diagnosing tool for OOB troubleshooting.
With ssh-copy-id it takes a single command (1-line script) to rsync the phone's DCIM directory to my main machine for further processing. Nothing needs to be done on the phone at all other than to lightly nudge it to wake it up so sshd sees the connection attempt.
Downside: Android security clampdowns mean termux can't see the SD card. So I can only sync down the phone's internal camera directory and that's where I have to store the new pictures and videos. This means space occasionally runs low and I have to move stuff to the SD card. But in the future, they probably won't allow Termux to even work any more in its current form - no "exec" of executables that werent' installed as part of the apk.
Why do all this? Because I'm old school. My phone is an extension of my data ecosystem, which lives on (redundant and backed-up) hard disks in my home computing setup. I don't even let the phone sync the photos to the cloud.
Admittedly I've found no other practical uses for it; all the interesting stuff is blocked by Android security (e.g. back up or otherwise process your call/SMS history).
Resilio Sync: use it in backup mode to sync photos to your desktop pc/mac/nas. Delete photos from phone when you want to free space. Also lets you access and edit normal files, either on demand or by sync. https://play.google.com/store/apps/details?id=com.resilio.sy...
PhotoSync: sync your photos to pretty much anything. https://www.photosync-app.com/home.html
Not sure that's what's causing it; I can definitely scp files from my Android phone's SDCard to my servers. But I've not tried initiating the scp from the other machine to my phone.
People also use it on chromebooks for dev work that doesn't require low level compiling. I have seen NPM and webdev work being done using termux and I have seen people use it for Jupyter Notebooks too.
It also integrates with Tasker (another android automation app).
Termux-api used to offer this [0], but apparently some time ago google decided to make it impossible:
> Usage of this API is no longer allowed by Google and we had to disable it to prevent delisting of Termux:API application from the Google Play.
It's my device, my SMS plan over a (supposedly) open source system. But it's the vendor's platform, and a huge part of it is proprietary (the play services).
This is the windows monopoly all over again, but in our pockets and with deep analytics backed in.
OK sorry, this ended being a rant. Is there an escape hatch? When will we have a credible free software mobile operating system?
- grabbing albums off my PC with sftp
- easy way to unzip files
- play audio via mpv
- run `xdg-open` on a file and get a native popup to select an app to open it with
- ssh into your other machines, works well to pick up your irc chat away from your pc if you use irssi + tmux (or weechat, or screen, etc.)
- use a "real" editor like vim or emacs locally on your phone
- api stuff, you can control the torch, notifications, etc. you can make scripts around that (imagine a simple `sleep 30m && ...` sort of one liner that turns on your light and plays some audio to wake you from a nap (I haven't done much with this part of termux)
General: Using T-UI because I'm not a fan of modern touch UIs, but it is limited to Android functions like messages and launching apps. Anything beyond that (SSH, text editing, web calls, etc) I do through Termux. I wish I could combine the two more seamlessly, but it's effortless to switch between the two.
Learning: Wanted to learn to use vim. Termux provided simple vim access and vimtutor. I've also used Termux to freshen up on languages and write a few scripts. Namely, differences between Python2.7 to Python3 which I didn't look into until this year. Starting on C and/or Rust soon.
There's a widget addon that makes doing those sorts of things one-tap: https://wiki.termux.com/wiki/Termux:Widget
Though naturally once I created a widget to kick apache, it never failed again.
Persistent SSH session to a server running Weechat for IRC
(Remember to run 'pkg update' every so often, a recent update to the app required a reinstall or manual fix for anyone like me who didn't know it could be a problem)
Primary usage is via Samsung DeX so I have multiple windows and a proper mechanical keyboard.
I'm not the only weirdo who does this! Although I manage to get by with Hacker's Keyboard.
- Having a backup of my private repos and dot files that's always with me. Easily keep them up to date with a pull every now and then.
- Occasionally do some lightweight symbolic math or high precision arithmetic with Emacs' calc.
- Test the portability of a library I've been writing by building and running its test suite on a lower-powered ARM environment.
ssh -L 8080:172.383.20.18:8080
Secondary: Study programming - I am a self-taught programmer, and before the pandemic I would study a lot on public transit, in coffee shops, while waiting for people etc. This actually used to be the primary use case before I started working as a professional programmer and was also using breaks to study. Android/Termux is not really suitable for actual dev work (e.g. you'll probably need Docker at some point if you're doing backend, and you'll want a browser with dev tools for frontend), but for limited study projects (especially backend dev) it's absolutely awesome.
It's also my SSH client to access a few servers I keep privately, but this is a feature that certain dedicated apps (e.g. JuiceSSH) could do equally well or better, and I'm just using Termux because I already have it.
- a local bookmark manager and search redirector that i wrote in Go (much easier to just run in termux than turning it into an Android app)
- sshd to allow adhoc file transfer and command execution over ssh, getting various information from the phone using the termux cli APIs
- random shell stuff although i tend to do most of that over the ssh connection.
https://news.ycombinator.com/item?id=20660301
So I can copy photos from phone to laptop and post process with a script.
Things that don't rise to the level of deserving an app, but are nice to have.
ssh is the most used for me because I don't want to use Termius (paid) or some other SSH wrapper app. Termux is free, allows you to easily create ssh keys and use ssh-copy-id.
Emacs, org-mode, git and ssh. That's pretty much it, but allows me to have access to my org-mode files anywhere, just like on desktop.
But I'm also one of those weirdos who runs his own email server and sshes in to read mail in mutt.
A script running rsync over SSH over wi-fi works every time. And as I use rsync for backups generally (have done for many years) this integrates nicely with my general way of doing things.
I've not tried running SSHd to allow things to be pulled off or pushed to devices, but others report that working well too.
Their workaround is fairly clever (although not yet implemented) but means that updates to the Play Store version have been temporarily put on hold.
https://github.com/termux/termux-packages/wiki/Termux-and-An...
Even the people not fighting against people in the War on General Purpose Computing keep seceding our sovereign systems away from us. The need for security is real, but I don't see that we are approaching it with balance. We seem to be growing ever more heavyhanded, permitting users less & less, and I don't see a reciprocal respect & empowerment being considered, furthered or advanced.
This is something Stallman and others have been talking about[1] for more than a decade now.
However the other angle is, this phone is an appliance and I want it to just work. I'm personally competent enough to have that cake (programmability) and eat it too (reliable usability) - after all I've been running Red Hat/Fedora as my primary desktop OS at home for two decades and it works just fine, thank you. But I also remember what a horrible mess the average schmoe's home computer was back in the good old days... remember an outdated version of Internet Explorer with half the screen obscured by a stack of junky toolbars, and the whole thing running at 800x600 on a monitor capable of higher resolutions "because otherwise the letters are too small". Good riddance.
Anyway for the moment, second-hand desktop and laptop machines that can run a full, unencumbered compute environment are still plentiful. Maybe by the time they aren't, I'll be a truly old fart who doesn't care any more.
Hopefully courts will begin to recognise that this sort of "security" is in fact created for the benefit of the company and its customers, not users. Any benefits to users are incidental.
Users are not soliciting these "security" measures. They are always initiated by the company.
As it is, this entails limiting the users' freedom to tinker in such a way that they simply cannot screw things up no matter how hard they try. Because, you know, if users have that option, then someone will take advantage of it and screw things up.
This line of thought has powerful political and philosophical backing, as digitalization is seen as the magic bullet that will solve a wide array of issues throughout society, and the general idea seem to be to protect people for their own good. Incidentally, it's often the most profitable route as well, as it's the only way to get non-technical users on-board.
There should be a "I know what I'm doing" switch that disables a bunch of restrictions and essentially enables full root privileges for your user.
Kiwi browser does.
The NDK was only added in 2.0 to appease game developers and workaround for Dalvik anemic performance.
Any access to Linux APIs was accidental and never part of the official native APIs.
Like pretty much everything that goes against the user and people are way too quick to accept anything that has the word "security" applied to it.
I don't have much experience with DEBs, but have quite a bit with RPMs and their spec files which are used to create them, and this wouldn't be that hard to do with an RPM (and you can convert RPMs to DEBs in many cases with utilities).
Most of the ones I have read about are still fairly alpha-level products, particularly for the phone software and app ecosystem.
I would love to have a fully-functional phone running GNU/Linux that I can use as a phone and carry around in my pocket and then plug in a keyboard, mouse, and monitor and have a "good enough" computer for basic office and programming capabilities.
Having a proper fold-out QWERTY hardware keyboard makes for an eccentric Android experience, but Termux (or, alternatively, their dual-boot Linux solution) makes a huge difference.
Upd: Video showing Librem 5 used as desktop: https://puri.sm/posts/a-librem-5-video-made-on-a-librem-5/
As much as I like the idea of 100% FOSS in my pocket, it's simply not practical because I need to use Android apps to hail rides and contact friends who often use only closed-source messenger apps.
If you're in the same boat, a very realistic alternative would be to just carry around a Raspberry Pi.
I see the benefit, but the phone isn’t anywhere near the quality of a high end android or iOS device in terms of hardware or general app availability.
Termux is clearly provide the opposite to what you’re suggesting - having a terminal available without sacrificing everything else.
https://source.puri.sm/Librem5/community-wiki/-/wikis/Freque...
Librem 5 has a number of features generally only found in high-end phones, such as USB 3, dual-role port, DisplayPort alt-mode, high resolution video out and a discrete audio DAC, but its CPU performance and its video processing capability are those of a low-spec phone from several years ago. For people who want to buy a phone that supports convergence or a specialized security/privacy phone, the price of the Librem 5 is very competitive with the other options on the market.
> general app availability
https://source.puri.sm/Librem5/community-wiki/-/wikis/Freque...
There is are a huge number of existing desktop Linux applications that can be adapted [not rewritten!] to run inside Phosh.
Do you know any on-screen keyboard for mobile Linux that is as good as (or at least approached) Hacker's Keyboard on Android?
I have a Librem 5 on pre-order, and am following PureOS and PinePhone related development somewhat, but so far I have not seen an on-screen keyboard that gives you all the modifier/control keys (+ chording of keys) and arrow keys...without those, the CLI really is not very useful unless you're always going to use an external keyboard (doesn't make sense to me, it's no longer portable then) :-/
Termux is a great piece of software; I'd love if they would keep supporting older OS versions as well, since it's the kind of software one would keep on that old tablet to be used as a terminal or generally as a Swiss army knife.
We have a few areas where non urgent SMS reminders need to be sent to users. We literally just use a couple of cheap ($100) Android phones with termux on an unlimited message plan with a local provider (who approved us for commercial usage).
The actual process is a glorified bash script that pulls API jobs down with curl and then uses termux-sms to actually send the message.
Maybe it's better on the most recent Apple SoCs, but on my iPad mini just opening a small text file in vim takes a second or two (instant on Termux/any other CLI I've used in the last decade.
Rsync is so slow as to be useless - I think because it takes forever to calculate the diff.
Then you copy the ssh public key from the phone to your "home-server", and setup a job scheduler to run rsync - now you have better than nextcloud syncing of your phones pictures/what-have-you with your home-server.
Setup of a ssh connection is similar to https, rsync exchange of rsync is usually "all good" and thats it. Rsync otherwise is a very efficient but not very documented protocol network-bandwidth-usage-wise.
Mesh? Syncthing, tried it, sucked for reasons I cant remember now. Nextcloud - had it for years, mind you I was contributed to nextcloud the android app, fixing many bugs, but still it caused me data loss / picture loss. Which I only found out after implementing the rsync solution and seeing OMG rsync found so many pictures Nextcloud was supposed to keep in sync for the past year but it just bugged over.
If you want to root the device for fun, I wrote a little tutorial post a few months ago https://miguelmota.com/blog/rooting-a-fire-tv-stick-4k/
As all my computers run Linux these days, it also has replaced all my "from-x-to-android" transfer apps.
But due to the restrictions that were placed on Android a few years back I lost the capability to make system apps in python.
I had a cleanup, backup, and could make custom interfaces enhance other applications using their sqlite data.
I guess now I am protected, from me.
[1] https://www.reddit.com/r/Piracy/comments/baufql/youtubedl_th...
$ cat ~/bin/termux-url-opener #!/data/data/com.termux/files/usr/bin/env bash
read -ep "[c]ast or [d]ownload: " -i "c" choice case "${choice}" in c|C) catt cast "${1}" ;; d|D) pip install --upgrade youtube-dl cd ~/storage/movies youtube-dl "${1}" ;; *) echo "Sorry, that's invalid." exit 65 ;; esac
The one i really miss though is SL4A.
https://en.m.wikipedia.org/wiki/Scripting_Layer_for_Android
It's a shame it ended up being killed off. I wrote a bunch of lua scripts with it. Including a small app to fetch bus schedules from a current stop. I could add scripts to my launcher and run them the same as a native app.