Lesson 7

Dates: 3/5/2014
Start-up and Run Levels. Scheduled jobs (at, cron)
Linux for Engineering and IT Applications


User settings at login


When a user logins, getty gives him SHELL.

In case of /bin/bash, the following initialization/configuration scripts are executed:

/etc/profile System wide initialization file. Runs at log in.
~/.bash_profile Executed automatically after /etc/profile
~/.bash_login If ~/.bash_profile is absent, the script is executed after /etc/profile, otherwise, ignored.
~/.profile If both ~/.bash_profile and ~/.bash_login are absent, the script is executed after /etc/profile, otherwise, ignored.
~/.bashrc It is called from ~/.bash_profile at startup. An interactive shell that is not a login shell also reads ~/.bashrc .
~/.bash_logout Executed automatically during log out
~/inputrc Contains optional key bindings


When you need to specify environment variables, for example PATH, you can place them in /etc/profile for all users on the system, or in ~/.bashrc for the specific user.

When the user logs out, control returns to init, which wakes up and spawns a new getty on the terminal port.


Take me to the Course Website