A custom Unix shell built from scratch in C
A fully functional Unix shell implementation written in C as part of DCU's Operating Systems module (CA216). Supports internal commands, external program execution, I/O redirection, piping, and background processes.
- Built-in commands:
cd,clr,dir,environ,echo,pause,help,quit - I/O redirection: Input (
<) and output (>,>>) redirection - Background execution: Run processes in the background with
& - Environment variables: Full environment variable support
- Manual pages: Built-in help documentation
βββ src/
β βββ myshell.c # Main shell loop & command parsing
β βββ myshell.h # Header file & function declarations
β βββ utility.c # Utility functions & built-in commands
β βββ utility.h # Utility header
β βββ makefile # Build automation
β βββ help.txt # Built-in manual page
βββ manual/ # Documentation
cd src
make # Compile
./myshell # Run the shellmyshell> echo Hello World
Hello World
myshell> dir /home
...
myshell> ls -la > output.txt # Output redirection
myshell> sleep 10 & # Background execution
myshell> help # View manual- Language: C
- Build: Make
- Platform: Unix/Linux
Kevin β Dublin City University
DCU CA216 β Operating Systems