Get started with iSH by learning essential commands, installing packages, and exploring your Linux environment
Now that you have iSH installed, this guide will help you get productive quickly by introducing essential commands, package management, and common workflows.
# Display the current working directorypwd# Output: /root# List files in the current directoryls# List files with details (permissions, size, date)ls -la# Display information about the systemuname -a# Check which shell you're usingecho $SHELL# Output: /bin/ash# View the Alpine Linux versioncat /etc/alpine-release
iSH runs Alpine Linux, which uses busybox to provide common Unix utilities. The default shell is ash (Almquist shell), a lightweight POSIX-compliant shell.
# Test network connectivityping -c 3 google.com# Check available memoryfree -m# View running processesps aux# Display disk usagedf -h# Show current date and timedate
If ping doesn’t work, ensure iSH has network access permission in iOS Settings → iSH → Local Network.
Here’s a quick reference for common apk operations:
# Update repository indicesapk update# Upgrade all installed packagesapk upgrade# Install a packageapk add <package-name># Remove a packageapk del <package-name># Search for packagesapk search <query># Get information about a packageapk info <package-name># List installed packagesapk list --installed# Clean the package cacheapk cache clean
The --no-cache flag when installing packages prevents apk from caching package files, saving storage space on your iOS device.
# Install Python 3 and pipapk add python3 py3-pip# Verify installationpython3 --versionpip3 --version# Install a Python packagepip3 install requests# Run a Python scriptpython3 -c "print('Hello from iSH!')"
Some Python packages with C extensions may not install correctly due to emulation limitations. Pure Python packages generally work well.
Install Node.js and npm for JavaScript development:
# Install Node.js and npmapk add nodejs npm# Verify installationnode --versionnpm --version# Install a global packagenpm install -g http-server# Run a Node.js commandnode -e "console.log('Hello from iSH!')"
Enhance your shell experience with these utilities:
# Install bash (a more feature-rich shell than ash)apk add bash# Switch to bashbash# Install curl and wget for downloading filesapk add curl wget# Install openssh for SSH clientapk add openssh-client# Install tmux for terminal multiplexingapk add tmux# Install htop for better process monitoringapk add htop
# Create a new directorymkdir myproject# Change to that directorycd myproject# Create a new filetouch README.md# Write content to a file using echoecho "# My Project" > README.md# Append to a fileecho "This is a test project" >> README.md# View file contentscat README.md# Copy a filecp README.md README.backup# Move/rename a filemv README.backup BACKUP.md# Remove a filerm BACKUP.md# Remove a directory and its contentsrm -rf myproject
# Go to home directorycd ~# or simply:cd# Go to root directorycd /# Go back to previous directorycd -# Show directory structurels -R# Find files by namefind /root -name "*.txt"# Search file contentsgrep "search term" filename.txt# Search recursively in directorygrep -r "search term" /path/to/directory
Temporary storage that may be cleared when iSH restarts.
cd /tmpecho "temporary data" > test.txt
/usr - User programs and data
Contains user-installed applications, libraries, and documentation.
ls /usr/bin # User commandsls /usr/lib # Libraries
/var - Variable data files
Logs, caches, and other files that change during system operation.
ls /var/log # System logsls /var/cache # Package cache
In iSH, you’re always running as the root user. The entire Linux environment runs within iOS’s sandbox, so you have full permissions within the iSH filesystem.
# Make sure Python is installedapk add python3# Create a scriptcat > hello.py << 'EOF'#!/usr/bin/env python3import sysimport platformprint(f"Hello from iSH!")print(f"Python version: {sys.version}")print(f"Platform: {platform.system()} {platform.machine()}")EOF# Make it executablechmod +x hello.py# Run itpython3 hello.py
# Install wget if not already installedapk add wget# Download a filewget https://example.com/archive.tar.gz# Extract ittar -xzf archive.tar.gz# List contentsls -la
# Install Python's HTTP server (Python 3 is usually installed)apk add python3# Create some HTML contentmkdir -p ~/public_htmlcd ~/public_htmlcat > index.html << 'EOF'<!DOCTYPE html><html><head> <title>iSH Web Server</title></head><body> <h1>Hello from iSH!</h1> <p>This page is served from a Linux environment running on iOS.</p></body></html>EOF# Start the web server on port 8080python3 -m http.server 8080# Access it at http://localhost:8080 in a browser# Press Ctrl+C to stop the server
To access web servers running in iSH from Safari or other browsers on your iOS device, use localhost or 127.0.0.1 followed by the port number.
# Install cronie (cron implementation)apk add cronie# Start the cron daemoncrond# Edit your crontabcrontab -e# Example: Run a script every hour# Add this line:# 0 * * * * /root/myscript.sh# List your cron jobscrontab -l
# Install SSH clientapk add openssh-client# Connect to a remote serverssh user@hostname# Generate SSH keysssh-keygen -t rsa -b 4096# Copy your public key to a serverssh-copy-id user@hostname# Use SCP to copy filesscp localfile.txt user@hostname:/remote/path/
# Command historyhistory # Show command history!123 # Run command number 123 from history!! # Run the last command again!$ # Use the last argument from previous command# Navigate fasterCtrl+A # Move to beginning of lineCtrl+E # Move to end of lineCtrl+U # Delete from cursor to beginningCtrl+K # Delete from cursor to endCtrl+W # Delete word before cursor# Job controlCtrl+C # Kill current processCtrl+Z # Suspend current processfg # Bring suspended process to foregroundbg # Continue suspended process in backgroundjobs # List background jobs
iSH uses x86 emulation, which has performance implications:
Compute-intensive tasks (compilation, video processing, heavy computation) will be significantly slower than on native Linux due to emulation overhead.
Best practices for performance:
Prefer interpreted languages (Python, JavaScript) over compiled workflows when possible
Use Alpine packages instead of building from source
# Update package indices firstapk update# Try again with verbose outputapk add --verbose package-name# Check repository configurationcat /etc/apk/repositories# Ensure network connectivityping -c 3 dl-cdn.alpinelinux.org
Command not found
# Search for the package providing the commandapk search cmd:command-name# Or search online: https://pkgs.alpinelinux.org# Install the packageapk add package-name
Permission denied errors
In iSH, you’re already root, so permission issues usually relate to file modes:
# Make a file executablechmod +x filename.sh# Check file permissionsls -la filename# Change ownership (though usually not needed)chown root:root filename
Out of storage space
# Check disk usagedf -h# Find large directoriesdu -sh /* | sort -h# Clean package cacheapk cache clean# Remove unused packagesapk del package-name# Clean temporary filesrm -rf /tmp/*
iSH Discord: Active community for questions and support
Linux Command Reference: Learn Unix/Linux fundamentals
The best way to learn is by doing. Experiment with commands, install different packages, and don’t be afraid to break things—you can always reinstall iSH to start fresh!