Skip to main content

Overview

Ion is the default shell for Redox OS, designed to be modern, fast, and safe. Written in Rust, Ion provides a familiar command-line interface with advanced scripting capabilities.

Ion Repository

View the Ion shell source code on GitLab

Key Features

Modern Syntax

Clean, intuitive syntax inspired by modern shells

Rust Performance

Fast execution with low memory overhead

Type Safety

Built-in type checking for variables and functions

Interactive Features

Advanced tab completion and history management

Getting Started

Ion is the default shell for both root and regular users in Redox OS:
[users.root]
password = "password"
uid = 0
gid = 0
shell = "/usr/bin/ion"

[users.user]
password = ""
shell = "/usr/bin/ion"

Basic Usage

# Run commands like any shell
ls -la
cd /home/user
echo "Hello, Redox!"

# Pipe commands
cat file.txt | grep "pattern" | sort

# Background processes
long_running_command &

Configuration

Ion can be configured through configuration files in the user’s home directory.
Ion is installed as part of the base system:
[packages]
base = {}  # Includes Ion shell

Built-in Commands

Ion provides several built-in commands:
CommandDescription
cdChange directory
echoPrint text to stdout
testEvaluate conditional expressions
letDefine variables
fnDefine functions
aliasCreate command aliases
exportExport environment variables
sourceExecute commands from a file

Scripting

Ion supports advanced scripting with modern features:
#!/usr/bin/ion

# Ion script example
let name = "Redox"
let version = "0.9.0"

fn show_info
    echo "Operating System: $name"
    echo "Version: $version"
end

fn check_system
    if test -d "/usr/bin"
        echo "System directories OK"
    else
        echo "Warning: System directories missing"
    end
end

show_info
check_system

Environment Variables

Ion works with standard environment variables:
# Set environment variables
export PATH="/usr/bin:/bin"
export HOME="/home/user"

# Access environment variables
echo $PATH
echo $HOME

# Use in commands
cd $HOME
ls $HOME/documents

Integration with Redox

Ion integrates seamlessly with Redox OS features:
  • Scheme access: Direct access to Redox schemes
  • Process management: Native support for Redox processes
  • System integration: Works with init system and services
# Access schemes directly
cat scheme:debug
echo "test" > scheme:log

# Manage system services
notify ipcd
notify ptyd

Performance

Ion is optimized for performance:
  • Fast startup: Minimal initialization time
  • Low memory: Efficient memory usage
  • Quick execution: Optimized command parsing and execution
Ion is written in Rust, providing memory safety without garbage collection overhead.

Resources

Ion Repository

Source code and development

Termion Library

Terminal library used by Ion

Redox Book

System documentation

Trying Out Redox

Get started with Redox and Ion

Maintainer

Jeremy Soller (@jackpot51)

Primary maintainer of Ion shell

Build docs developers (and LLMs) love