Tag: ish shell

  • Setup C/C++ on the iPad using iSH Shell

    Setup C/C++ on the iPad using iSH Shell

    Do you want to use a terminal on your iPad?

    I recommend iSH Shell.

    You can install packages on your iPad and it works on the offline.

    Step 1. Download iSH shell

    https://apps.apple.com/kr/app/ish-shell/id1436902243?l=en-GB

    Step 2. Install APK packages

    apk update
    
    apk add gcc g++ make musl-dev
    
    apk add git
    
    apk add vim

    Step 3. Install zsh

    apk add zsh curl git
    
    sh -c “$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”

    And set zsh as default

    ask add shadow
    
    passwd
    
    chsh -s /bin/zsh

    To run chsh, you have to set your password. But on the iSH shell, you haven’t set any password. So please set a new password by running passwd.

    And then run chsh -s /bin/zsh

    Step 4. Write C++ Code

    vim hello.cpp
    #include <iostream>;
    using namespace std;
    
    int main() {
        cout &lt;&lt; “Hellow from iPad” &lt;&lt; endl;
        return 0;
    }
    g++ hello.cpp -o hello
    
    ./hello

    Isn’t it cool? 😎 Happy c++ coding on your iPad on the offline!