Possible Duplicate:
How to check if a shell is login/interactive/batch
And what's the benefits of non-login shell over login shell?
And what's the benefits of non-login shell over login shell? |
|||||
|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
You can tell whether you're in a login shell using
As for the benefits: login shells generally do a bit more initialization (such as setting environment variables and cd'ing into $HOME) which aren't necessary for other shells. On the other hand, by default any shell launched from the gui is not a login shell, so most people configure their shell initscripts ( |
|||||
|