Login Shell
noun
say it: “LOG-in SHEL” /ˈlɔɡɪn ˈʃɛl/
The shell that starts when you sign in to a computer, such as over ssh; it reads its own startup file before anything else.
What is a login shell?
A login shell is the shell that starts when you sign in to a computer, such as over ssh or at a text-only screen. It reads a different startup file first: ~/.bash_profile if there is one, else ~/.profile. Ubuntu's ~/.profile loads ~/.bashrc too, so settings kept in ~/.bashrc reach both kinds of shell. A new terminal tab is usually not a login shell, except in the Mac's Terminal app.
shopt -q login_shell && echo "login shell" || echo "not a login shell"
In a sentence
- “Signing in over ssh gave Sam a login shell, so bash read ~/.profile first.”
- “On Ubuntu, a login shell still gets the aliases from ~/.bashrc, because ~/.profile loads it.”
Level: Journeyman · More Unix terms at this level
Updated