RustOS is a small, custom operating system built in Rust. It is designed as an educational project and includes core components commonly found in operating systems.
- Interrupt handling
- File system
- Terminal interface
- Task scheduling
- Input/Output (I/O) operations
- Memory management
- Heap allocation
The system runs in a single terminal screen with no graphical interface.
Upon boot, the system displays the OS logo and opens a command-line terminal where users can interact using a keyboard.
shutdown
: Shut down the machinereboot
: Restart the machineecho
: Print the entered textclear
: Clear the terminal screenhelp
: Display a list of available commandslogo
: Clear the screen and show the system logocat
: Display file contentswrite
: Overwrite content of an existing fileappend
: Add content to the end of a filels
: List contents of the current directorytouch
: Create a new filemkdir
: Create a new directoryrm
: Delete a file or directorycd
: Change the current directory
After each command, background operations like disk access or output are performed.
If there is no red error message, the operation succeeded.
Note: File and directory operations will fail with an error message if the target does not exist—no automatic creation is performed.
- Linux system (Ubuntu recommended)
- Rust (nightly toolchain)
- QEMU
# Install Rust
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
# Add Rust to the environment
source $HOME/.cargo/env
# Install Rust nightly
rustup install nightly
# Set nightly as the default
rustup default nightly
# Install QEMU and related tools
sudo apt update
sudo apt install qemu
sudo apt install libvirt-bin qemu-utils