Skip to main content

A rootless, (nearly) full-featured shell for iOS

iOS is a BSD-like system (according to Wikipedia, the kernel is actually based on BSD). In this way, we sometimes expect it to have similar functionalities or behavior to BSD or Unix-like systems,  However, iOS doesn’t expose a shell to us. Unlike macOS computers, which provide a that users can launch directly into a shell of their choice, like Bash or Zsh, there isn’t a for iOS. And even if there was, user-land permissions would prevent the installation and use of many packages and services.

This carries into other Unix-like systems, like Android, where even though most distributions of Android don’t include a terminal (unless you are using its’ open-source variant like Lineage OS), you can still download one from the Google Play Store. In fact, you have many options.

However, on the iOS side, the situation looks far bleaker. If you have root access and the ability to install self-signed or unsigned code, you can install one of few popular terminal emulators, like NewTerm 2 or MTerminal. However, obtaining root access on an iOS device usually requires a jailbreak, and unless you’re knowledgeable in finding an exploit and writing a jailbreak, it’s something you’re unlikely to have. (As a side note, if you have an iPhone between the iPhone 5S and iPhone X, you can use something called checkra1n to jailbreak your iPhone. At the time of writing, this means you’re pretty likely to have a jailbreak available for your device unless you use the iPhone Xs, iPhone 11, or iPhone SE 2020.)

Enter iSH.

iSH isn’t exactly a terminal emulator for iOS, rather, it’s a custom Bash-based shell that aims to get sh features into a fakeroot environment on iOS. There are a lot of potential productive uses for this since iOS devices are really powerful pocket computers with ARM processors, so I decided to give it a try.

It’s not bad, but I’ve been following active development and there’s a GitHub page with a table listing the compatibility with common packages like ffmpeg, which makes me think that this could be used as a server host because you could run full ARM-compatible Linux packages on iOS. However, at its’ current stage, the performance is not amazing given how powerful Apple’s ARM processor is supposed to be, so I don’t think I want to use my $1,000 tablet for such a use.

However, this is still a very cool project and I wanted to feature it on my blog, so do go check it out and maybe build it for yourself!