An interactive non-login shell is a type of shell session that is started without requiring a user to log in to the system. Here are the key characteristics:
Characteristics of Interactive Non-Login Shells:
- User Interaction: It allows users to interact with the shell directly, entering commands and receiving output.
- Session Type: Typically initiated when you open a new terminal window or tab in a graphical user interface (GUI) or when you start a new shell session from an existing shell.
- Configuration Files: It reads configuration settings from
.bashrc(for Bash) or equivalent files for other shells, which set up the environment for that session. - No Login Process: Unlike login shells, interactive non-login shells do not require user authentication or a login process.
Example:
- Opening a new terminal window in a Linux desktop environment starts an interactive non-login shell.
- Running a command like
bashfrom an existing shell also starts a new interactive non-login shell.
In contrast, a login shell is initiated when you log into the system (e.g., via SSH or at the console) and reads configuration settings from files like .bash_profile or .profile.
