POSIX Shell — Custom Unix Shell Implementation I built a POSIX-compliant shell from scratch in C+...POSIX Shell — Custom Unix Shell Implementation I built a POSIX-compliant shell from scratch in C+...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
POSIX Shell — Custom Unix Shell Implementation
I built a POSIX-compliant shell from scratch in C++ to understand how command-line shells actually work under the hood — process management, signal handling, and I/O at the systems level, without relying on any existing shell libraries.
The shell parses and tokenizes user input across semicolons, pipes, spaces, and I/O redirection operators, then dispatches to a set of built-in command implementations I wrote myself — including cd (with ~, -, and relative path handling), ls (with flag support and multi-directory input), pwd, and echo. I implemented background/foreground process control so the shell can manage job execution the way a real terminal does, plus a pinfo utility that reports PID, virtual memory usage, process status, and executable path by reading directly from the OS. It also handles POSIX signals (Ctrl+C, Ctrl+D, Ctrl+Z) correctly, supports recursive file/directory search, and includes a command history system with up/down arrow navigation and tab-based autosuggestion, built with raw character-level input handling.
Skills demonstrated: C++, POSIX system calls, process management, signal handling, systems-level I/O, shell/OS internals.
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started