Top all-time · #4370
flowblok’s blog
Personal blog · blog.flowblok.id.auprogrammingsystems
flowblok’s blog is a personal blog at blog.flowblok.id.au about programming and systems. Since 2013, 18 different Hacker News readers have linked it 22 times, most often “Shell Startup Scripts (2013)”. The last post was in 2024, but the archive is still widely read.
Too few sampled comments (14) to say how often HN recommends it.?
Why HN links it
HN readers link flowblok's 2013 post 'Shell Startup Scripts', whose colour-coded graph shows which files bash, sh and zsh read at startup. Commenters cite it for untangling the confusing initialisation sequence.
Summarised by Claude from a sample of 14 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Shell Startup Scripts (2013)9 people · 9 mentions · first linked 2018-01-06
- Shell startup scripts4 people · 4 mentions · first linked 2013-02-17
What Hacker News says?
re 9) I feel better about always feeling at least slightly confused about what files are being sourced. The graph included seems to originate from https://blog.flowblok.id.au/2013-02/shell-startup-scripts.ht...
Comment linking /2013-02/shell-startup-scripts.html
on “Things I Wish I'd Known About Bash”Submitted Shell startup scripts as a story · 48 points
HN discussionAs given in the article, it's also the most annoying bash diagram ever...it needs an explanation of what the 7 different colors of arrows mean. All that was given is: > It shows which scripts bash decides to run from the top, based on decisions made about the context bash is running in (which decides the colour to follow). > So if you are in a local (non-remote), non-login, interactive shell (eg when you run bash it…
Comment linking /2013-02/shell-startup-scripts.html
on “Things I Wish I'd Known About Bash”Submitted Shell Startup Scripts (2013) as a story · 22 points
HN discussionThey're part of a complicated initialization process that can only be answered with this beautiful diagram.[1][2] [1]: https://blog.flowblok.id.au/static/images/shell-startup-actu... [2]: https://blog.flowblok.id.au/2013-02/shell-startup-scripts.ht...
Comment linking /2013-02/shell-startup-scripts.html
on “Run Commands, the 'rc' in '.bashrc'”Submitted Shell Startup Scripts as a story · 8 points
HN discussionThere's a graph (generated by graphviz from text description) that shows the flow and files involved for bash, sh and zsh. Yes, it's insane. https://blog.flowblok.id.au/2013-02/shell-startup-scripts.ht...
Comment linking /2013-02/shell-startup-scripts.html
on “Stupid Unix Tricks”Submitted Day 6 of Advent of Code in Hurl as a story · 2 points
HN discussionThe former image is from a blog post entitled "Shell Startup Scripts" [0] which I've just submitted [1] separately because it's so much more informative (it's been posted to HN previously but never really provoked much discussion). That blog post was my primary reference after zshall(5) when I decided to blow away the years of cruft I'd built up, start over, and rewrite my (Zsh) shell init files from scratch -- and…
Comment linking /2013-02/shell-startup-scripts.html?hn=20201024
on “/.bashrc VS –/.profile VS –/.bash_profile”Submitted Shell Startup Scripts as a story · 2 points
HN discussionInteresting on the docker angle. Sometimes seeing the flow visually can help people: https://blog.flowblok.id.au/static/images/shell-startup-actu... https://i.stack.imgur.com/6LQgh.png
Comment linking /static/images/shell-startup-actual.png
on “/.bashrc VS –/.profile VS –/.bash_profile”Submitted (2013) Shell startup scripts sequences (sh, zsh, bash) as a story · 1 points
HN discussionIt has to do with the fact that the GP put the URL in < > and HN assumed the trailing > was part of the URL. Just remove the trailing > in the URL and it'll work. Alternatively reproduced here without the '>': http://blog.flowblok.id.au/2013-02/shell-startup-scripts.htm...
Comment linking /2013-02/shell-startup-scripts.html
on “Bash Configurations Demystified”http://blog.flowblok.id.au/2013-02/shell-startup-scripts.htm... Edit: Not that I recommend the resource, just fixed the link for you.
Comment linking /2013-02/shell-startup-scripts.html
on “Bash Configurations Demystified”See < http://blog.flowblok.id.au/2013-02/shell-startup-scripts.htm... , the most comprehensive overview I've encountered to date.
Comment linking /2013-02/shell-startup-scripts.html>
on “Bash Configurations Demystified”"To read it, pick your shell, whether it's a login shell, whether it's interactive, and follow the same colour through the diagram. When the arrows split out to multiple files, it means that the shell will try to read each one in turn (working left to right), and will use the first one it can read." Original article here: http://blog.flowblok.id.au/2013-02/shell-startup-scripts.htm...
Comment linking /2013-02/shell-startup-scripts.html
on “Bash Initialisation Files – which one will get executed? (2012)”Here is another one that is useful, but it's always good when someone does the digging and figuring out for themselves. http://blog.flowblok.id.au/static/images/shell-startup-actua...
Comment linking /static/images/shell-startup-actual.png
on “Bash Initialisation Files – which one will get executed? (2012)”I wonder if there is any mainstream program with a more convoluted configuration scheme than bash? Just when think you understand the various invocations of .profile, .bash_profile, .bashrc in login/non-login/interactive/non-interactive modes in home and/or /etc after digesting an article with flowcharts[1], you realize that any invocation can execute arbitrary code from any location, and different distributions (no…
Comment linking /2013-02/shell-startup-scripts.html
on “Everything that uses configuration files should report where they're located”http://blog.flowblok.id.au/static/images/shell-startup-actua... "To read it, pick your shell, whether it's a login shell, whether it's interactive, and follow the same colour through the diagram. When the arrows split out to multiple files, it means that the shell will try to read each one in turn (working left to right), and will use the first one it can read." Note that what the man pages say happens (as of 2013)…
Comment linking /static/images/shell-startup.png
on “Startup Sequences of Shells”The blog where this image was first published in 2013: https://blog.flowblok.id.au/2013-02/shell-startup-scripts.ht... Note that there is recent edit to the blog post saying "it depends on your OS packaging". The SO question where an answer refers to this image and has some relevant discussion: https://unix.stackexchange.com/questions/493173/changing-his...
Comment linking /2013-02/shell-startup-scripts.html
on “A graph showing shell startup scripts exuction order for zsh/bash/sh”