A lightweight command-line interpreter written in C, inspired by the UNIX Bash shell.
This project was developed during my computer science studies in a project-based learning environment. I acted as the technical lead, mentoring my teammates and taking charge of the project's architecture and implementation. This experience allowed me to reproduce essential shell features while strengthening my skills in system programming, process management, and memory handling.
- Command parsing and execution
- Built-in commands (e.g.
cd,echo,exit,pwd, ...) - Environment variable handling (
$PATH,$HOME, ...) - Input/output redirections (
>,<,>>) - Pipes (
|) between commands - Signal handling (e.g.
Ctrl+C,Ctrl+D) - Error messages for invalid commands
- Language: C (C99 standard)
- System calls:
fork,execve,waitpid,pipe,dup2,signal - Build system: Makefile (with
make/make cleantargets) - Tested on: Linux (Ubuntu / Debian)
git clone https://github.com/ElloWorld01/Mini-Bash.git
cd Mini-BashMake sure you have a C compiler (e.g. gcc) and make installed on your system. On most Linux distributions, these are available via the package manager (e.g. build-essential on Debian/Ubuntu).
sudo apt install build-essentialWe used the GNU Readline library for proper command-line editing. If it's not already installed, you can fetch it via the provided Makefile target:
make readlineBuild the executable using the Makefile:
makeYou can launch the program directly or via the Makefile:
make launchOr run the executable manually
./minibashMiniBash$ echo "Hello, world!"
Hello, world!Mini-Bash/
│── includes/ # header files
│── libft/ # library files
│── srcs/ # source files
│── LICENSE # license file
│── Makefile # build rules
│── README.md # documentation
This project is licensed under the MIT License.