Skip to content

Comment on Show HN: A fix for the .bash_profile .bashrc .profile madnessparent

Comments

Which man-page exactly?

The fun part about .bashrc, .bash_profile, .profile, /etc/bash*, /etc/profile etc. is that their semantics vary wildly between linux-distros. Not even Ubuntu and Debian agree here.

You never quite know where, when and if .bashrc is sourced by the distro-templates. A .bash_profile that unconditionally sources .bashrc will work fine on one distro, on the next you will see it run multiple times, on yet another you run into an infinite recursion.

His approach is the correct one and you'll find a similar script in just about any sizable, heterogenous deployment.

man bash

The INVOCATION part. You find this part by searching for the word "profile".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.