Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
847
124
Hi,

What is the default shell being used in the Yosemite's terminal app? Is it possible to setup bash as the default shell and use my linux's .bashrc for my mac as well?

Edit: Sorry for the silly question as I just noticed that bash is mentioned in the title bar of the terminal app. However if I type bash in the terminal app, it changes the prompt "bash-3.2$" and I'm still confused why the bash prompt changes if it was already running bash?
 
Last edited:

maflynn

macrumors Haswell
May 3, 2009
73,682
43,717
Bash is Apple's default shell.

I believe the title you see is the app that is running, so your terminal app is running so it shows it. you then run another instance of bash and it shows up as a title change. To be honest, I'm not really sure why it does that, but then I don't start bash shells by typing bash after starting a terminal session.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,830
8,591
A sea of green
Edit: Sorry for the silly question as I just noticed that bash is mentioned in the title bar of the terminal app. However if I type bash in the terminal app, it changes the prompt "bash-3.2$" and I'm still confused why the bash prompt changes if it was already running bash?

The difference in prompts is because when you type the command "bash", it doesn't run as a login shell. When a Terminal window opens, that window runs bash as a login shell. This changes several things about what bash does when it starts.

Read the bash man page and look for the words "login" and "profile". Also look at the '-l' option.

Is it possible to setup bash as the default shell and use my linux's .bashrc for my mac as well?
If it contains commands that exist on OS X, and work the same way, then yes. If it contains Linux-only commands, or uses options that aren't on OS X, then no.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.