Linux Snippet: Run ~/.bash_profile on Startup (GNOME)

If you’ve edited your ~/.bash_profile to include scripts you’d like executed on start up, you might be surprised when you open up your terminal and those scripts don’t execute. By default, ~/.bashrc executes on session start, but ~/.bash_profile doesn’t.

To execute your ~/.bash_profile on startup, simply append this to your ~/.bashrc

source ~/.bash_profile

Ta-da!

Now you can print out some cool ascii art on start up, define custom functions (such as mkdir and cd at the same time), and other fun Linux-ey type things.


Related Posts:

About the Author:

Joseph is the lead developer of Vert Studios, a web design company located in Tyler, Tx. Follow him on Twitter! @Joe_Query.

Add to the conversation: