Hacker News new | ask | show | jobs
by deathanatos 4720 days ago
What's the reason for all the files, and why do I care whether my shell is a login or non-login? To me, no matter where I get my shell from (whether VT, SSH, gnome-terminal), I want all my aliases, settings and nice terminal colors to be there.
2 comments

Because when you run a script in a shell you don't want the script printing out the message of the day and messing with things. Say for example you want to create a new shell with LD_LIBRARY_PATH and PATH that are different than you set them when you login. If you always start a login shell your .profile is always run and you always reset your paths.
The point of a separate login shell script is so you can have login banners telling you useful information about the system when you're initially logging in, but not when you just do something like run bash or su.

In ubuntu that's stuff like the load average of the machine or whether or not there are packages that need to be upgraded.