How to Get a Linux Shell on iPad or iPhone with iSH
Have you ever wished you had a Linux command line on an iPad or iPhone? With iSH you can get pretty close to accomplishing that goal. iSH Shell is a Linux shell for iOS that uses an x86 emulator to run a simplified version of Alpine Linux on an iPad or iPhone. You can even install packages and additional software directly into iSH with the Alpine package manager, offering access to the world of command line tools like wget, curl, python, git, and much more.
Installing the iSH Shell into iOS is fairly easy but requires TestFlight, which is a developer tool. Thus this is mostly for fun and for tinkering by advanced users. In case it’s not obvious, iSH is not a full version of Linux with a window manager and GUI like Ubuntu for iPad or iPhone, it’s just a shell, but it is by far the most functional local command line environment in iOS that is currently available. And it’s definitely pretty fun to play around with!
How to Install iSH Linux Shell on iPad or iPhone
The simplest way to install iSH is through TestFlight, but you can also side load the app* if you prefer that route:
- From the iPad or iPhone, install TestFlight from the App Store by clicking here
- From the iPad or iPhone, click the following link: https://testflight.apple.com/join/97i7KM8O
- Choose to start testing, and accept the TestFlight Terms
- Click “Install” in TestFlight, this will install the iSH Shell application into iOS
- Launch iSH when finished
iSH will install onto your iPhone or iPad just like any other app, and you can open it and close it like any other iOS app.
Once you open iSH, you’re in a fairly typical linux command line, and the typical range of commands from ls, mkdir, cd, cat, touch, vi, wget, zip, unzip, tar, chmod, grep, chown, rm, and much more are available to you.
Given that iSH offers a command line environment, you’ll be doing a lot of typing. Typing on the on-screen touch screen keyboard is exactly what you’d expect; the typical cumbersome experience of typing on a touch screen, so if you’re trying to use this in any serious fashion you might want to use an external keyboard with the iOS device.
* If you want to install iSH without TestFlight you can do so. Instead, download the iSH source from github and then follow instructions for how to side load apps into iOS, using the iSH source. The side load process requires a Mac and Xcode.
How to Install Packages into iSH on iOS with apk
You can install new software into iSH with ‘apk’, the Alpine linux package manager.
For example if you want to add lynx to iSH the following command:
apk add lynx
Then you can just run lynx to visit your favorite website as usual with:
lynx osxdaily.com
Or if you want to add python:
apk add python
You can add nearly anything with apk, though not everything works (zsh does not currently work for example, nor does telnet)
You can update packages with:
apk update packagename
You can also search for package by name:
apk search name
And of course you can remove packages as well:
apk del packagename
Updating iSH
Note that you must update iSH Shell from the TestFlight application, rather than the App Store.
This is because some of the functionality offered by iSH is apparently not allowed in the App Store, but perhaps that will change down the road.
The developer is updating iSH fairly often so just open the TestFlight app and install any available updates when they are shown for iSH Shell.
We’re showing mostly iSH on iPad screenshots here, but it works the exact same on iPhone, just with a much smaller amount of screen space.
If all of this seems overly complicated, or you don’t want to use TestFlight or side load anything, you can try an app that is allowed on the App Store called OpenTerm, OpenTerm gives you a command line of sorts in iOS but it’s much more limited.
Perhaps one day we’ll even get an official Terminal application in iOS like there is on the Mac? Until then, try out iSH, or you could just get an ssh client and connect to your own shell elsewhere.
Given that the article was written several years ago, I am wondering whether the statement, ββ¦ some of the functionality offered by iSH is apparently not allowed in the App Store, but perhaps that will change down the road.β, still applies? That is, does iSH from the App Store now have the full functionality?
wooooooow
this is the best tutorial that i see on the internet
thanks a lot
You are missing Ctrl on the keyboard, so this app is pointless.
Actually this app is very useful.
All iPad hardware keyboards have CTRL, and the onscreen keyboard in iSH has a CTRL option.
You should check out the app and the various use cases before making assumptions.
hay i downloaded testflight but say beta is full can’t download ish app please help me
It says itβs fu
Thanks for this. Itβs hidden from regular users β searched for an hour then gave up to come here.
Thanks for discovering and sharing this TestFlight beta app! Iβve been searching for a solution like this for a long time. I appreciate it.
Can NodeJS be installed in a similar manner? I need it to spin up a server on the iPad itself, to then read Bluetooth data and transmit it to a basic html page and display data in real time.
This is awaesome! Worked for me very nicely and really transformed my iPad to much better tool! Thank you for your work!
Small tip for some users – you might find some packages not being available that otherwise you would expect to be available elsewhere. For example I was not able to install AWSCLI. BUt the reason is just that the awscli was not in the main repository, but actually is in edge/testing repo. The instructions how to do that properly are available in the docs:
https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Add_a_Package
For lazy folks here is an example:
$ apk add cherokee –update-cache –repository http://dl-3.alpinelinux.org/alpine/edge/testing/ –allow-untrusted
Hey Paul ,
Sorry I wanted to try it but still have some problems with Terminal- itβs a very special tip and I love it.
Iβll do it soon, promise!
Thanks for sharing your tip!
Have a great Day!
Friendly greetings from π·πΊ
I just use Termius for iOS to ssh into actual machines.
THANK YOU I’D NEVER HEARD OF THIS!!
Try Prompt too, Prompt for iOS is another great ssh app for iPhone and iPad.
I personally wish Terminal was a native iOS app, but I also wish iOS had a cursor and trackpad support… so anyway I use a Mac for most of these pro tasks.
You can now connect a Magic Mouse to your iPad. I have an iPad Air 3 and it works great when I want to let my MacBook at home
This is great, for sure. But why the hellz Linux? iOS, macOS et al. are Darwin/Unix, and that’s already built in. Why introduce something alien to the Apple ecosystem, and not work with what’s already there? Hmmmβ¦
This has been done before, with OpenTerm, but has the disadvantage of not being able to install or compile new stuff.
This is interesting. It would be cool if these workarounds weren’t necessary and iOS just had a native Terminal app. It’s just a matter of Apple allowing people to use it, the command line is there, iOS is running on unix just like macOS is.