Terminal.app has a setting to select which shell it uses, and the default setting is "Default login shell (/usr/bin/login)".
What are the differences between /usr/bin/login and /usr/bin/bash?
Mac – What are the differences between /usr/bin/login and /usr/bin/bash
macterminal
Related Question
- MacOS – What are the differences between the various Mac video “compressor types”
- MacOS – El Capitan Mac: /usr/bin/login tries to run /bin/false
- MacOS – the usr/local default chmod
- Mac – What’s the difference between diskutil unmount and diskutil eject
- What are the practical differences between Bash and Zsh
- Terminal.app: changing shell behavior problem
Best Answer
Griffo is correct. Now in your scenario, the difference boils down to the following:
/bin/login
, then this program will check in the user database what your default shell is and run that shell as a login shell, thereby invoking the rc files that are run only when the shell is run as a login shell (in case of bash those are/etc/profile
,~/.bash_profile
,~/.bash_login and
, and~/.profile
./bin/bash
, that shell will be executed as a login shell, independently of what shell is set in the user database. This can come in useful when the shell in the user database does not work properly, or you want to be able to use different shells.As per the comment by Chris Page, the shell is run as a login shell in both cases.
If you have not changed your login shell from the default, which is
/bin/bash
, and you have not changed the rc files of this shell, then the difference will not be noticeable.