Bash Startup Scripts: .bashrc and .bash_profile
June 22nd, 2009 by Shawn Powers in
Download in .ogv format
__________________________
Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter
Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Subscribe now!
The Latest
Newsletter
Tech Tip Videos
- Nov-04-09
- Oct-29-09
- Oct-26-09
Recently Popular
From the Magazine
December 2009, #188
If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.
Delicious
Digg
StumbleUpon
Reddit
Facebook








Good tech tip
On June 30th, 2009 octopusgrabbus (not verified) says:
Thanks for the helpful video. .bash_profile and .bashrc also get confusing when moving between distros, like Red Hat and Ubuntu, so it was nice to have a straightforward explanation.
oh
On June 24th, 2009 Anonymous (not verified) says:
"sorry if this is confusing, but this is how we do it"
probably should be a little more informative than that for noobs. But for the rest of us, good to know when each .bash... is called. thx
yep #1
On June 23rd, 2009 Gen2ly (not verified) says:
unnecessary to make executable
Question
On June 23rd, 2009 Adrian Ponoran (not verified) says:
Why did you have to make .bash_profile executable. It is always sourced in and not executed directly ?
Nice explanation
On June 23rd, 2009 mattcen says:
That's interesting. I was under the misapprehension that one was for interactive, and one for non-interactive logins (so one is run by scripts for example, while the other is run by an interactive shell).
It raised a new question. What determines whether a shell is a "login" shell or not? Is the login shell just the first one you open when you log into a freshly booted system?
It's good to clear that up though :D.
Thanks!
Thanks
On June 23rd, 2009 Niosus (not verified) says:
Very handy! i have been looking for something like this.
Just one note: can you make the sound in your videos a little bit loader, i have to crank up my speakers to hear you ;)
Post new comment