HN Hall of Fame Weekly email

Write a Shell in C (2015)

Screenshot of brennan.io captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 7 calendar years, with breakout response in 3 of them.

submissions
8
submitters
8
observed span
2016–2024
peak thread · 80 comments
379 pts
latest 20+ return · 2024-12-26
205 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

If you want to see a pretty complete shell in a higher level language (Python, 11K lines of code), check out: https://github.com/oilshell/oil/ And a blog here: http://www.oilshell.org/ (index: http://www.oilshell.org/blog/2016/11/20.html) This article is good in that it shows that starting processes boils down to the system calls fork(), exec(), wait(), etc. My shell has function calls, loops, conditionals, pipelines, subshells, command substitution, redirects, here docs, etc. (The code has some messiness, but the…

chubot·379-point thread·

For anybody who's wondering why I chose to post this: I found this while Googling around trying to answer the question "how hard is it to write a custom shell, and how would you get started?" The reason I wanted to know that is this: I've always been intrigued by the idea of making "things" ( hand-waving around the details of what that means) available via ssh. Imagine something like a MUD, except not a MUD exactly. Just the idea…

Honestly this was one of the most influential pieces of writing I've ever read. Back in the day this opened up a lot of the implementation details on interpreters and C for me. It quite literally helped "get" how programs are designed and written. I found this piece around eighth grade and I'm very glad I did! :-)

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
3

100+ points or 50+ comments

Total points
876

reference only — not used in Hall rules or ranking

Total comments
164

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2016-12-06Write a Shell in C (2015)First breakout · Best threadpvsukale337968
2018-03-07Write a Shell in Cjxub30
2020-09-17Write a Shell in C (2015)xanthine30
2021-02-13Write a Shell in Cmindcrime27680
2022-08-06Tutorial – Write a Shell in CHall inductionmemorable30
2022-09-28Tutorial – Write a Shell in C (2015)nivethan30
2023-11-12Write a Shell in C (2015)mdwalters40
2024-12-26Write a Shell in C (2015)Latest 20+ point returnsebg20516