1. Introduction

Hello, I’m Anguo!

Recently, a reader gave me a message on the background, saying that the price of cloud server has risen recently, and I run some simple scripts everyday, so I don’t want to get into the cloud server, and asked me if I could provide him with a different idea

This article will introduce a piece of software called iSH

This App is very powerful, can run a variety of scripts, suitable for small partners who do not need much

2. Introduction

ISH is an iOS App that can run Linux Shell. The underlying operating system is based on Alpine.

PS: Alpine is an ultra-lightweight Linux distribution, a community-developed Linux operating system designed with security in mind for x86 routers, firewalls, virtual private networks, IP phone boxes, and servers

Project Address:

Github.com/ish-app/ish…

There are two installation methods:

  • App Store search keyword “iSH” download

  • Github download the source code, use Xcode to compile and install

The App interface is as follows. From left to right, the function keys include Tab, Ctrl, ESC, Scroll (Arrow), Software Settings, Quick Paste, and Hide input method

Among them,

The Tab, Ctrl, and ESC keys are used in the same way on the PC

The scroll key is used for cursor movement and switching between history commands (swipe up and down to switch between history commands)

In the Settings, you can view and set the appearance theme, text style, application ICONS, and file management

3. Replace the source and install dependencies

Since the default source is abroad, the download dependency is slow, so we need to change the source

Edit the file “/etc/apk/Repositories” using vim command, delete the default source, and replace it with ali or Tsinghua source

# edit the file vim /etc/apk/repositories # replace it with a domestic source # Ali source https://mirrors.aliyun.com/alpine/v3.11/mainhttps://mirrors.aliyun.com/alpine/v3.11/communityCopy the code

After editing, save and exit

Now you are ready to install Python and the common dependency libraries

3-1 installation Python3

ISH Installs the application using the apk add app_name command

Python3 apk add python3Copy the code

3-2 PIP installation

First, we use the “wget” command to download the PIP file and then install the PIP

# # download the get - PIP file wget https://bootstrap.pypa.io/get-pip.py installation python3 get - PIP. P yCopy the code

3-3 Installing dependency packages

In the case of the most common requests, simply install using PIP3

Install dependent pip3 install RequestsCopy the code

Note that iSH is slow to install and requires patience

4. Execute the script

Due to the low efficiency of editing scripts on mobile phones, most of the time we wrote them on PC and then imported them into iSH to run

The common solution is iSH + SSH + Git. For the convenience of demonstration, I use “Web Server for Chrome” to set up a file sharing Server on the PC, and then place the script files in the shared directory

Then on the iSH terminal, use the wget command to download the script file directly

Finally, go to the script folder directory and run the script file

# download script file compression wget http://192.168.2.121:8887/rsc.zip # unpack files unzip RSC. Zip # # into the folder catalog CD RSC/run script file python3 main_proj. PyCopy the code

5. Expand

The iSH command is as follows:

5-1 installation

apk add <name>
apk add vim
apk add python3
Copy the code

5-2 unloading

Apk del <name>Copy the code

5-3 Search for applications

Apk search <name>Copy the code

5 to 4 Update the package manager

ISH uses the Alpine package manager to update the Alpine repository list with the following command

# update repository list apK updateCopy the code

6. Summary

ISH is an iOS app that makes it easy to deploy Python scripts, and Shell scripts are also supported

In addition, iSH can open SSH Server for remote connection, this part of the content and iSH detailed use document I have written PDF and uploaded to the background, follow the public account “AirPython” reply keyword “iSH” to obtain the complete content

If you think the article is good, please like, share, leave a message, because this will be my continuous output of more high-quality articles the strongest power!