Create, execute and use security tools all on your phone.
May 22, 2022
Author: Benji Gifford
Introduction
Have you ever thought about the possibility of running a Linux terminal on your phone? Maybe using it to turn it into a mobile hacking device, Watch_Dogs-style? Or perhaps you’re just a teenage script kiddie trying to be rebellious to society’s technological norms?
I was once in the same position as you until my naïve 17-year-old self looked online. I saw that I could run Bash commands in a Linux environment on my phone using an app called Termux, available on the Google Play Store.
This app kept me entertained for ages (and it still does.) From anywhere, you can experiment with scripts and write programs right there on your phone.
In this article, I will show you how to set this up for yourself, whether you’re on iPhone or Android. Just don’t do anything stupid with it, of course. (I’m definitely not saying that because I accidentally DoSed my entire home wifi network or anything.) Termux is for Android, so for those iOS users out there, iSH is a close equivalent.
Termux
Termux is an Android-exclusive Linux terminal emulator and Linux environment app that works right off download. No throwing your phone through a window in a fit of tech-induced rage required. Just like any typical Linux shell, you can install other packages with apt.
- Start by heading over to the Google Play Store and download Termux
- Once you’re in the app, enable file access for the Termux terminal with the command below. This is needed for importing packages of tools you’ll be using.
$ termux-setup-storage
- Update & upgrade the official Termux repositories:
$ pkg upgrade
You’re good to go! Install any desired package using: $ pkg install <package_name>
Don’t know where to start? Check out this list of Termux tools you can play around with.
iSH
The iSH terminal emulator app is essentially Termux for iOS. It’s a simplified version of Alpine Linux, similar to Termux, just iOS-exclusive. Apple users get a piece of the action too! Head over to the App Store to get started.
- In the App Store, install iSH Shell
- Launch iSH when installation is complete.
- Now that you’re in, it’s similar to any other Linux CLI, with familiar commands and a clean look that can be customizedjust like Termux. Packages available for Termux also work on iSH, and can be installed with apk.
Conclusion
In this post, I showed you how to install and configure a Linux CLI environment on your mobile phone. Doing so allows you to run almost any bash script and navigate your phone’s filesystem as it were any other Linux OS. Termux and iSH are excellent tools that break the boundaries of what a lot of people assume to be feasible on a phone.
Resources:
- Dubois, Theodore. “iSH.” ISH, Tbodt@Ish.app, 22 Oct. 2022, https://ish.app/.
- Fornwall, Fredrik. Termux, Github, 30 June 2015, https://termux.org/.
- Anonymous. “How to Get a Linux Shell on IPad or IPhone with iSH.” OS X Daily, OS X Daily, 11 Dec. 2018, https://osxdaily.com/2018/12/11/ish-linux-shell-ios/#:~:text=The%20simplest%20way%20to%20install%20iSH%20is%20through,to%20start%20testing%2C%20and%20accept%20the%20TestFlight%20Terms.
- Anonymous. “How to Get a Linux Shell on IPad or IPhone with Ish.” OS X Daily, OS X Daily, 11 Dec. 2018, https://osxdaily.com/2018/12/11/ish-linux-shell-ios/#:~:text=The%20simplest%20way%20to%20install%20iSH%20is%20through,to%20start%20testing%2C%20and%20accept%20the%20TestFlight%20Terms.