1. 交互式登录Shell

当用户成功登录系统后调用该Shell,使用/bin/login登录，随后读取/etc/passwd文件。

当启动交互式shell后，将读取/etc/profile文件以及特定的用户文件~/.bash_profile

login as: pi
pi@pi.raspi.in's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Apr 25 10:43:53 2017 from 211.137.135.200
pi@raspi:~ $

注意：当你使用RHEL/CentOS7系统时，会看到如下提示”It’s not recommended to change this file unless you know what you are doing. It’s much better to create a custom .sh shell script in /etc/profile.d/ to make custom changes to your environment, as this will prevent the need for merging in future updates”。