login shell

· 1 min read · 98 Words · -Views -Comments

A WebShell user recently reported that logging into a Debian terminal wasn’t loading ~/.profile. After digging around, I found they were dropped into an interactive non-login shell, so the login-only configs never ran.

Login Shell

A login shell loads ~/.bash_profile, .profile, and /etc/profile. A non-login shell skips those but does source ~/.bashrc.

Profile Load Order

  1. /etc/profile: the shell reads the global configuration first.
  2. ~/.bash_profile, ~/.bash_login, and ~/.profile (in that order): it stops at the first file that exists and is readable. If ~/.bash_profile is present, the shell doesn’t process the others; otherwise it falls back to the next.
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover