Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok, I feel like an idiot. When it says "source this into your .bashrc" what does it mean?

I know where .bashrc is, but simply pasting it into the file seems like .. the wrong way to do it. Couldn't really find an answer on Google



Add a line to the end of your ~/.bashrc file with:

    . $HOME/.bash/j.sh
(Change that path to point to wherever j.sh is, though ~/.bash is probably a good place for it.)


Thanks so much! Makes sense


I think what is referred to is bash's source command: when you've modified your .bashrc and you want the changes to be reflected in your current shell process, you do

  source .bashrc
or, equivalently

  . .bashrc
which runs .bashrc in the current shell, as opposed to in a forked subshell as happens if you did ./.bashrc ; and hence the new functions/aliases/variable settings you've put in .bashrc are now available in the current shell (as opposed to only being visible in a forked subshell and disappearing when it exits).


Now it's clearer, thank you! :)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: