A simple Unix/Linux command-line shell written in C. It demonstrates core concepts of shell programming, including process creation, execution, built-in commands, and token parsing.
- Execute external programs using
fork()andexecvp(). - Supports built-in commands:
cd– change directoryhelp– display built-in commandsexit– exit the shell
- Tokenizes user input into commands and arguments.
- Handles basic error cases (invalid commands,
chdirerrors, memory allocation errors).
- GCC or any C compiler
- Unix/Linux operating system
- Clone or download the repository.
- Compile using GCC:
gcc main.c utils.c -o main
- Run the shell:
./main
$ help
$ cd /path/to/directory
$ ls -l
$ exit
- Type commands like in a normal terminal.
- Built-in commands (
cd,help,exit) are handled internally.
Shaurya Tamang – Built this shell as a learning project to understand processes, memory management, and function pointers in C.