I built my own Unix shell from scratch in C: no AI, no copying from existing shells. Along the way: why cd can’t be a normal program, how fork and exec actually run your commands, how pipes connect programs, and why Ctrl+C killed my whole shell.
Github:
Chapters
0:00 Intro
0:27 What is a shell?
0:46 The 5 challenges & 1. Parsing
0:59 2. fork, exec, wait
2:15 3. Builtins
2:49 4. Pipes
3:57 5. Signals
4:36 Outro
Resources
Credits
Music by Kevin MacLeod (incompetech.com)
“Chill Wave” and “Airport Lounge”
Tux by Larry Ewing (lewing@isc.tamu.edu) and The GIMP
#c #linux #programming
source

`cd`, `dir`, `pwd` and the like rely on the shell's internal state.
Also, please don't use fork(). Use the modern posix_spawn() API.
Google search is AI though
Great content! Let’s build a compiler next – it will be super interesting to see
Great first video! Definitely sticking around.
Ah yes, multithreading. The only field where killing orphans is acceptable.
Writing something in C without using AI? that's an instant subscribe.
Would love to see more videos like this but longer and more in depth on the details
here at 23 subscribers
I wanna make a shell now
this channel is going places
Underrated video 🔥
Actually very good video, keep it up
Wow! Super cool programming content! Yes computers and code very cool
What should I build from scratch next?