Quick Answer: What Is Login Shell in Linux?
Contents

A login shell is a shell given to a user upon login into their user account. This is initiated by using the -l or –login option, or placing a dash as the initial character of the command name, for example invoking bash as -bash. Sub shell.

What is login shell and interactive shell?

An interactive shell is one which reads commands from it’s standard-input, usually a terminal. … If you then type bash then you enter an interactive shell, but it is not a login shell. If a shell script (a file containing shell commands) is run, then it is neither a login shell nor an interactive one.

How do I know my login shell Linux?

cat /etc/shells – List pathnames of valid login shells currently installed. grep “^$USER” /etc/passwd – Print the default shell name. The default shell runs when you open a terminal window. chsh -s /bin/ksh – Change the shell used from /bin/bash (default) to /bin/ksh for your account.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest