It is said that settings for non login shell to go into
.bashrc file and login shell settings to go into
What is really meant by login and non-login shells?
Please explain without using technical jargon as far as possible.
If you are a normal user of Ubuntu Desktop, the only login shell is...your desktop (you type a password to get in, right ;)? Well, technically it's a login shell that starts a GUI, but that's getting in to jargon. And yes, it will read the settings in
The only time you (a normal user) will probably see a login shell that looks like a login shell is if you are having some problem with your desktop and you switch to a virtual terminal with the Ctrl+Alt+F1 shortcut.
The other general cases for having a login shell include:
I do not think that correct answer can be given without “technical jargon”. Since this question is the first one popping up in Google for the query “what is a login shell” I am providing a more correct answer below:
Login shell is simply a shell that was told to be a login shell. It does not mean shell that pops up after you login, though usually application that logs you in is telling shell it launches to be a login shell. There exists the following ways to tell shell it should be a login one:
Loginess of the shell has absolutely nothing to do with anybody asking you a password or performing some other authenication procedure. Some programs like ssh or login (or some terminal emulators like urxvt) run shells as a login ones using
Generally it is better to first consult the documentation of the program used to invoke the shell to determine whether shell will be the login one and second perform some tests to determine whether app will launch a login shell (e.g. by adding