$linuxjunkies
>

non-login shell

also: interactive shell, subshell

A shell session that does not read login configuration files like .bash_profile or .bashrc during startup. It's typically created when you open a new terminal tab or run a subshell.

A non-login shell is any shell process that skips the login initialization sequence. Instead of reading ~/.bash_profile, ~/.bash_login, or /etc/profile, it only reads ~/.bashrc (or equivalent for other shells).

Common scenarios for non-login shells include opening a new terminal tab in a GUI terminal emulator, executing bash or sh from within an existing shell, or running commands via SSH with a command argument like ssh user@host 'command'.

This distinction matters because login shells set up environment variables, PATH, and other system-wide settings once per session, while non-login shells inherit these from their parent process. For example, if you add a function only to ~/.bash_profile, it won't be available in a new tab (non-login shell), but it will be available if you restart your terminal (login shell).

Related terms