Bash Startup Scripts: .bashrc and .bash_profile

FAIL (the browser should render some flash content, not this).

Download in .ogv format

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Good tech tip

octopusgrabbus's picture

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

Anonymous's picture

"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

Gen2ly's picture

unnecessary to make executable

Question

Adrian Ponoran's picture

Why did you have to make .bash_profile executable. It is always sourced in and not executed directly ?

Nice explanation

mattcen's picture

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!

--
Regards,
Matthew Cengia

Thanks

Niosus's picture

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 ;)

Geek Guide
The DevOps Toolbox

Tools and Technologies for Scale and Reliability
by Linux Journal Editor Bill Childers

Get your free copy today

Sponsored by IBM

Upcoming Webinar
8 Signs You're Beyond Cron

Scheduling Crontabs With an Enterprise Scheduler
11am CDT, April 29th
Moderated by Linux Journal Contributor Mike Diehl

Sign up now

Sponsored by Skybot