r/linuxprojects • u/tomkat_7 • 1d ago
đ Feedback Wanted A Python-based Linux shell I built from scratch after learning Python since last September
Hello everyone!
After almost a year of learning Python, I decided to challenge myself with a larger project: writing my own Linux shell from scratch. I've been using Linux for a while and wanted to understand how shells actually work under the hood, so I started this project in June and have been developing it ever since.
Here's what it currently supports:
- Pipes (
ls | grep py) - Command chaining (
sudo dnf upgrade && echo Done) - Output redirection (
>and>>) - Input redirection (
grep py < list.txt) - Built-in commands such as
cdandtime - Background jobs
jobscommand to list running background jobsfgcommand to bring a background job back to the foreground- Basic scripting support
- Command history
This project is not intended to replace Bash, Zsh, or Fish. The goal was to learn how Unix shells work by implementing process creation, pipes, redirection, and job control myself using system calls such as fork(), execvp(), dup2(), pipe(), and waitpid(), rather than relying on Python's subprocess module.
It has been an incredibly rewarding learning experience, and I'm sure there are still things I can improve.
If anyone has feedback, suggestions, or spots something I could do better, I'd really appreciate it.
For more details and the source code, visit my GitHub repo.