Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Termux. https://termux.com

I've got an actual userland Linux shell and package ecosystem, with 1,231 available packages (compare against ~6k for Red Hat / CentOS, 70k for Debian), including standard shell tools, editors, and scripting languages, plus several Android-specific tools and APIs. The scripting tools open up broader archives via pip (python), npm (node.js), and cpan (perl). Many of the "Linux" shell and scripting examples I've posted to HN over recent years have actually been run on and via Termux.

This replaces other Android tools, including console, SSH, audioplayer (mpv/mps), backgroundable and playlistable YouTube audio (mpv, mps-youtube), remote sync (rsync, scp, mc), editors (vim, emacs, nano, etc), and other tools. An sshd daemon allows remote (ssh-key-only) access to the tablet itself, useful for admin and substantial tasks at a bigger screen and better keyboard.

The develooment is active, response to bugs (I've found several) prompt and satisfactory, and growth in packages available (~500 when I first installed Termux) impressive and assuring.

This is by no means a full Linux system replacement, for numerous reasons, but it very much, and more than any single other feature, makes Android Not Completely and Utterly Suck (which it otherwise largely does).

Coupled with a Bluetooth keyboard (another long tale of frustration), a tablet becomes a surprisingly capable (albeit still frustrating) laptop adjunct. The biggest frustrations remain Android-imposed: Lack of full filesystem access and unpredictable process termination, by Android.

The lack of an equivalent IOS feature utterly kills that platform for me. I'm very much looking forward to Purism's tablet offerings.



I just love the way they describe the app features:

"Have you ever sat on a bus and wondered exactly which arguments tar accepts?"

"Can you imagine a more powerful yet elegant pocket calculator than a readline-powered Python console?"


Here's a silly photo from a Nairobi hotel room. The tv is hooked into a raspberry pi b, $75 2014 phone running android terminal, and a laptop... The phone iirc was providing internet and local network for the other two. (And I was trying to compile Sage on the pi, which ended up, at the time, taking close to a week, due to one memory hungry dependency...)

https://inventingsituationsdotnet.files.wordpress.com/2014/0...



There's iSH for iOS, that tries to be similar to Termux. I don't know if it has feature parity or not since I've only heard about it, not used it myself, but I don't want to say this area is an Android-only feature.


Thanks. Apple makes such tools far too hard to find.

Does seem quite preliminary though, yet.


That’s just because it’s not released/stable yet. Its developers have made the decision to make it only available as a TestFlight beta, not Apple.


Sure, and I get that.

Point remains that availability of similar capabilities to Termux does not really yet exist on iOS.

I do appreciate knowing about the tool thogh, thanks.


So... when I jail-broke my iPhone 3G S years and years ago, I remember using an SSH prompt natively with all the fixings, including native BitTorrent over comparatively slow 3G speeds.

These days, though, there are apps and websites to do everything under the sun. If you need the power, why do the heavy lifting locally? Just use these cloud-friendly devices to connect to an SSH server via Panic’s Prompt app, or use the Shortcuts app to run Pythonista or an SSH-executed command via Siri or at a certain time (prompted). If you need something more advanced than Pythonista can support, perhaps for push notifications, you’ll probably have to use a third party app, or write your own with a Mac to set it up, but iOS is really more extensible with each new release.


Flexibility, power, maturity, lack of distractions, data control, offline continuity, tool continuity, and 30+ years' experience and proficiency with the toolset.

For starters.

The apps often aren't all that, and search costs alone in trying to find one exceed time to complete of a typical task. With no additional overhead for bugs, incompleteness, ToU, privacy policy, or EoL / business continuity concerns.


Sooo... offline continuity is the only example I can think of that wouldn’t work with a remote SSH session. Everything else is a simple configuration setting away, whether it’s disabling apps and distractions or continuing where you left off (which is enhanced by SSH sessions, I would think...) And while iSH is one attempt at a local shell, and jail-breaking another, I’d say it’s only a matter of time before Apple suggests running the occasional Mac app using a pen on an iPad Pro, via some virtualization APIs. Those same APIs could make it trivial to simply pick and instal your own Linux OS of choice, or maybe even Windows on an iPad, natively. Sure, it’s not there yet, but OS-as-app (or WSL) doesn’t seem that crazy in hindsight.


End-user audio and video experience for mpv on AWS is generally poor.

As is direct interaction with your own device via CLI environment.

Sometimes being there is the best way to be there.


Assuming you wouldn’t use a local SSH server hooked up to a TV instead... If you want mpv on a Mac, use https://iina.io/ and for iOS, libmpv is available and someone’s compiled it and wrapped it in a UI at https://apps.apple.com/ca/app/outplayer/id1449923287 or use Plex which is less integrated with the iOS Files app but is multi-platform: https://www.reddit.com/r/appletv/comments/9zd9p5/plex_beta_i...

You can interact with your device with multiple accessibility mechanisms including voice control, software buttons, voiceover, Siri shortcuts, Pythonista, and wirelessly or remotely, including Safari automation. If the only problem you have is you have to use the Files app with your fingers and a GUI instead of typing “ls” and using a non-touch-optimized UI, well... maybe a phone with a touchscreen isn’t the right device for you. Perhaps the original android concept with a keyboard (like BlackBerry) would be preferable?


Or, you know, a shell environment rather than app one-offs for everything.

The tablet has a display and speakers. Or I can plug in -- yes, it has a jack, iOS fans -- headphones. Why not just use those?

Because that's what I want.

Rather more practicable than lugging around a a TV and generator.

And yes, the tablet's got Bluetooth and can stream to other devices. Or from an DLNA server. It's not as if Termux suddenly breaks that.

You and a few others keep suggesting apps and variations on remote hardware or servers. What such responses fail to acknowledge is that those are specifically the requirements that Termux allows me to avoid. Those are massive disutilities.

Becuse that's what I don't want.

Standard, simple, text-interfaced, local, consistent, and diverse tools, with a single (or small set of) install and update mechanism, and high levels of interoperability. That's the winm that's the goal, and any set of app, hardware, and/or remote-cloud-system solution rapidly destroys the very benefits and characteristics which make Termux so goddamned insanely great.

And that's what I want.

Louis Armstrong's comment fits very well here, I suspect.


My point has not been to dissuade you from what you prefer to use, merely to highlight the alternatives. And with how you're describing Termux it sounds like it doesn't need a package manager (app store), anything more advanced to describe files than ascii/binary pipes (share sheets), doesn't need to natively interact with the cloud (fopen vs Files app APIs), definitely doesn't need a GUI outside of ascii art or whatever random xwindowing GUI is supported...

I will say there's innovation in a platform that's completely untethered and allows processes to run as root. Jailbreaking on iOS early on provided much innovation. Similarly diverse hardware gives you lots of options too.

But let me know how other apps -- native Android ones -- interact with that app. Can Google interact with it? See, that's the difference an OS standard makes. The app you're describing, Termux, builds on top of existing Linux standards, including GNU utilities and distributions building and packaging apps. If you jailbreak on iOS, you can install deb packages too. It's not like the kernel doesn't support these features. All we need, obviously, is a virtual machine or emulator powerful enough, and you've got your Termux on iOS.

I'm absolutely not arguing against it, I'm just saying, "it's an app!" And the platform features on iOS are more widely distributed, adopted and often more innovative, than the equivalent on Android, and that's where the power comes from. Sure, one app, like iSH or Termux, will give you superpowers, and rooting or jailbreaking can give you even more control over your phone. But if the platform's not innovating, 90-95% of users won't benefit. And if you haven't found advantages to touch screens, cellphone form factors, music subscription services, and other forms of interaction beyond terminal, well ... I'm sorry we haven't made much progress technologically since Unix time sharing that you find useful...


Termux can use Android intents (termux-open), and interact with the system in multiple ways, see pastebin of commands:

https://pastebin.com/raw/4e7UwM57

Primary app-to-termux interaction is via the filesystem and saved content -- downloads and the like. For obvious reasons, arbitrary command access to Termux from apps would be hazardous, much as it is on any desktop OS. Android filesystem access restricts this somewhat, though the system Downloads and "My Documents" directories are globally accessible.

There is also clipboard integration (termux-clipboard-get and -set), which I've aliased to xc and xp, respectively, much as I do similar OSX and Linux commands. So "xp | vim -" is a thing.

Very handy use is a titlecase script which converts strings, especially all-caps, for HN submission:

    xp | titlecase > tmpfile && xc < tmpfile && rm tmpfile
(The script handles numerous edge cases.)

As for Google accessing Termux: Why would I want that? Google already has its (badly crippled) Android userland, as well as OS APIs and features. Termux is principally a userland -- a shell and utilities for user-initiated and directed interactions.

See by comparison Debian's Social Contract, Policy, and other guiding documents. Key among their principles is that the project's focus is its users, and that its policies serve to constrain the developers as to what they must provide, and must not do. Though Termux lacks such specific language its spirit (and Debian heritage) strongly suggest a similar orientation and philosophy.

As for "it's an app", that's both solipsistic and utterly fails to recognise that this app is singularly powerful and expansive in the spirit of the original Unix,[1] in ways that effectively no other single Android app (save other user command shells) can even hope to be.

________________________________

Notes:

1. See K&P's The UNIX Programming Environment (https://en.wikipedia.org/wiki/The_Unix_Programming_Environme...). My 'Tyranny of the Minimum Viable User" addresses the distiction as well: https://old.reddit.com/r/dredmorbius/comments/69wk8y/the_tyr...


This exactly. I have complete access to any resource I could imagine for my job by spinning up what I need in our dev AWS account or at home with my personal hobby AWS account (which admittedly I hardly ever use). I have unlimited data and tethering (albeit slow 512Kbps.

I’ve even used AWS Workspace app in a pinch with my iPad.


> unpredictable process termination

Settings - Battery - Battery Optimization (dropdown menu upper right, three dots)

Change it for the apps you don't want Android to terminate.


Thanks, though no such option.


I use YouTube-DL with it, works like a charm.

It allows me to have mostly the same toolkit on my phone and on my home server, which is nice.


You might also appreciate mpv with its '--ytdl' option (enables the youtube-dl library). This enables you to directly stream YouTube (or any other YTDL-supported source) audio or video, rather than downloading.

mps-youtube (mpsyt) is another streaming tool, which gives the option to interactivley request, search (by title, description, genre, or channel) YouTube (only, this time) content, and create, save, and recall local playlists. A great way to explore topics or speakers, or music. No ads :-)

youtube-dl,mpv, and mps-youtube have been transformative.


mps-youtube is really nice! Thanks for sharing! Never thought this was actually possible to do from an android terminal app.


Man this is really cool thanks




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: