How to Get a Linux Shell on iPad or iPhone with iSH

Dec 11, 2018 - 7 Comments

iSH Linux shell on iPhone and iPad

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:

  1. From the iPad or iPhone, install TestFlight from the App Store by clicking here
  2. From the iPad or iPhone, click the following link: https://testflight.apple.com/join/97i7KM8O
  3. Choose to start testing, and accept the TestFlight Terms
  4. Click “Install” in TestFlight, this will install the iSH Shell application into iOS
  5. Install iSH Shell into iOS

  6. Launch iSH when finished
  7. Open iSH linux shell on iOS

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.

Nano on iPad

* 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

iSH linux shell running lynx on iPad

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)

Using apk to add packages to iSH Linux shell on iOS

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.

iSH Linux shell on iPhone

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.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Command Line, iPad, iPhone, Tips & Tricks

7 Comments

» Comments RSS Feed

  1. Beebody says:

    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.

  2. Joss says:

    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…

  3. Red says:

    I just use Termius for iOS to ssh into actual machines.

    • John says:

      THANK YOU I’D NEVER HEARD OF THIS!!

      • NT says:

        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.

  4. RA XA says:

    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 🇷🇺

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac