Vous êtes sur la page 1sur 13

UNIX and Shell Scripting

Module 3: UNIX Process



2
Module 3 Objectives
Upon completing this module, the learner will be able to:

Describe the various processes invoked before and after login

3
Module 3 Agenda
Topic Name Duration
Environment of UNIX Process
25 min

4
Discussion: Logging into a UNIX System
Discussion topic:
How to Log into a UNIX System?

Discussion time:
5 minutes

Instructions:
Ask students about their
experience/opinions.
Write them on a flip-chart.




5
Demonstration: Logging into a UNIX
System
For slides 6 to 8

This topic includes demonstration on login into the UNIX system.
It will be conducted in the following manner:
Instruction:
Demonstrate login into the UNIX system.
Map it with respect to the login flow (slides 6 to 8)
Ask participants to execute the same.



Environment of UNIX Process (1 of 3)

6
Start UNIX System
init Process
getty Process
For each terminal port
Init calls getty process.
When a UNIX system is Bootstrapped,
Kernel creates Init Process.
Getty outputs login: and waits for user to
enter user name. When user enters his user
name, gettys job is complete.
Environment of UNIX Process (2 of 3)

7
Login Program
getty Process
Getty creates environment for
login and invokes login program.
The Login program:
Displays password: prompt
Validates users password
Puts the user in his home directory
(If logged in correctly)
Initializes users environment
Environment of UNIX Process (3 of 3)

8
Login Shell
Login Program
Login program invokes users
login shell (sh,ksh,bash).
Login shell reads users start-up files
.profile for bourne and korn shell
.cshrc and .login for C shell
User at Terminal
Once start-up files are done, login
shell provides shell prompt to user.
Enters commands.

9
Knowledge Check (1 of 3)
Which is the first process initiated by Kernel, when a UNIX
system is Bootstrapped?

1. getty
2. sh
3. init
4. login


10
Knowledge Check (2 of 3)
Which one of the following is not a valid login shell?

1. sh
2. bash
3. ssh
4. ksh


11
Knowledge Check (3 of 3)
State whether the following statements are True or False:

1. .profile is the users start-up file for bourne and korn shells.
2. getty creates environment for login and invokes login program.


12
Module 3 Summary
Upon completing this module, you should now be able to:

Describe the various processes invoked before and after login

13
Questions and Comments
What questions or comments
do you have?

Vous aimerez peut-être aussi