Linux

iSH – An iOS Linux Shell for Your iPhone or iPad

Mobile-Technology
Image credit: source

Have you ever wanted to run a Linux shell on your iOS device to transfer files, write shell scripts, or simply to use Vi to develop code or edit files?  Now you can, with a project called iSH that is currently available as a TestFlight beta for iOS devices.

iSH is a project that aims to bring a Linux shell to iOS devices using a usermode x86 emulator. iSH is built on the Alpine Linux distro, which is designed to have a small footprint, be secure, and easy to use with little or no distracting bells and whistles.

To install iSH on an iOS device, you first need to install the TestFlight app, which allows you to install beta programs. Once TestFlight is installed go to the https://testflight.apple.com/join/97i7KM8O page and click on the “Start Testing” button as shown in the image below. This will open the TestFlight app where you can Accept the invitation to join the beta of iSH.

Install iSH through TestFlight
Install iSH through TestFlight

 

Once iSH is installed, you can open it like any other iOS app and will be greeted with a ash shell where you can begin executing commands and installing other packages using the APK package manager.

iSH Installed
iSH Installed

As iSH is still fairly new and is being run under an emulator, not all Linux programs are currently available and some are still being worked on such as SSH.  iSH, though, already comes with some of the standard programs you would expect in a Linux environment such as Vi, wget, zip/unzip, and tar. A full list of built-in commands can be found at the end of the article. 

Using wget & Vi
Using wget & Vi

You can learn more about how to install other packages in iSH using the next section.

Installing packages in iSH using APK

Alpine Linux uses the APK package manager to install programs and their associated dependencies.  

Using APK is very easy and can be used to search for available packages, install a package, list currently installed packages, r remove an existing one, and more. Below are some sample commands that can help you get started installing new programs into iSH.

To list installed packages, type apk info, which will output a list of installed packages in iSH.

To search for a new package to add, type apk search [package_name]. For example, to search for PHP you would type apk search php.

To install a package, type apk add [package_name]. For example, to install PHP you would type apk add php and to install Python you would type apk add python.

Installing Python and PHP in iSH
Installing Python and PHP in iSH

Finally to remove an installed package, type apk del [package_name]. For example, to delete PHP you would enter apk delete php.

Transferring files between iSH and iCloud

Now that you can you actually develop and potentially pen test in the future from your iOS device, it would be useful to be able to easily transfer files to and from an iSH install.

When iSH is installed, it will create a new Location in the Files app so that you can access the iSH file system and send files to other storage locations that are configured such as iCloud Drive, the phone’s storage, or DropBox if it’s installed.

Files app with iSH Location
Files app with iSH Location

To transfer a file from iSH, select the files you wish to copy and tap the send button Send Button and then tap “Save to Files“. From there you will be prompted for the location to save the files to.

Unfortunately, transferring files from other locations to iSH using Files does not appear to be working as of yet. For now, you can use wget to transfer files to iSH.

Available /bin/ command:    

arch  ash  base64  bbconfig  busybox  cat  chgrp  chmod  chown  conspy  cp  date  dd  df  dmesg  dnsdomainname  dumpkmap  echo  ed  egrep  false  fatattr  fdflush  fgrep  fsync  getopt  grep  gunzip  gzip  hostname  ionice  iostat  ipcalc  kbd_mode  kill  link  linux32  linux64  ln  login  ls  lzop  makemime  mkdir  mknod  mktemp  more  mount  mountpoint  mpstat  mv  netstat  nice  pidof  ping  ping6  pipe_progress  printenv  ps  pwd  reformime  rev  rm  rmdir  run-parts  sed  setpriv  setserial  sh  sleep  stty  su  sync  tar  touch  true  umount  uname  usleep  watch  zcat  

Available /usr/bin/ commands:    

awk  basename  beep  blkdiscard  bunzip2  bzcat  bzip2  cal  chvt  cksum  clear  cmp  comm  cpio  crontab  cryptpw  cut  dc  deallocvt  diff  dirname  dos2unix  du  dumpleases  eject  env  expand  expr  factor  fallocate  find  flock  fold  free  fuser  getconf  getent  groups  hd  head  hexdump  hostid  iconv  id  install  ipcrm  ipcs  killall  ldd  less  logger  lsof  lsusb  lzcat  lzma  lzopcat  md5sum  mesg  microcom  mkfifo  mkpasswd  nc  nl  nmeter  nohup  nproc  nsenter  nslookup  od  passwd  paste  patch  pgrep  pkill  pmap  printf  pscan  pstree  pwdx  readlink  realpath  renice  reset  resize  scanelf  seq  setkeycodes  setsid  sha1sum  sha256sum  sha3sum  sha512sum  showkey  shred  shuf  smemcap  sort  split  ssl_client  strings  sum  tac  tail  tee  test  time  timeout  top  tr  traceroute  traceroute6  truncate  tty  ttysize  udhcpc6  unexpand  uniq  unix2dos  unlink  unlzma  unlzop  unshare  unxz  unzip  uptime  uudecode  uuencode  vi  vlock  volname  wc  wget  which  whoami  whois  xargs  xxd  xzcat  yes  

(Excerpt) Read more Here | 2018-11-13 01:24:16

Leave a Reply

Your email address will not be published. Required fields are marked *