Lesson 7

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


Practical Exercises with login scripts and checking the run sequence.


Complete the exercises below on run01 VM

In a user home directory on Ubuntu 12.04, there should be scripts .profile and .bashrc.
Create a new user account, for example jerry:
useradd -m -s /bin/bash jerry
In file .profile, put entry
echo PROFILE
In file .bashrc, put entry
echo BASHRC

Create files .bash_login and .bash_profile with the only entries echo BASH_LOGIN and echo BASH_PROFILE, accordingly.
Logout and login as user jerry and notice BASH_PROFILE in the login prompt. Start a new shell,
/bin/bash
notice BASHRC in the new shell prompt.
Remove file .bash_profile, logout and login as user jerry again. Notice BASH_LOGIN in the new login prompt.
Remove file .bash_login, logout and login as user jerry again. Notice PROFILE in the login prompt.


Take me to the Course Website