public

0-Shell

Overview

In this project, you’ll build 0-shell, a minimalist Unix-like shell implemented in Rust, designed to run core Unix commands using system calls—without relying on external binaries or built-in shells like bash or sh.

Inspired by tools like BusyBox, this project introduces you to key concepts in Unix system programming, including process creation, command execution, and file system interaction, all while leveraging Rust’s safety and abstraction features to avoid manual memory management.

Role Play

You are a system-level developer assigned to build a lightweight, standalone Unix shell for an embedded Linux environment. Your task is to create a shell that handles basic navigation, file manipulation, and process control—faithfully mimicking essential shell behaviors without relying on existing shell utilities.

Learning Objectives

Core Requirements

Your minimalist shell must:

You must implement the following commands from scratch, using system-level Rust abstractions:

Additional constraints:

Constraints

Bonus Features

Implementing any of the following will be considered bonus:

Example Usage

student$ ./0-shell
$ cd dev
$ pwd
/dev
$ ls -l
total 0
crw-------  1 root   root     10,    58 Feb  5 09:21 acpi_thermal_rel
crw-r--r--  1 root   root     10,   235 Feb  5 09:21 autofs
drwxr-xr-x  2 root   root           540 Feb  5 09:21 block
...
$ something
Command 'something' not found
$ echo "Hello There"
Hello There
$ exit
student$

Evaluation Criteria

This project will be reviewed and graded based on the following:

Resources