UNIX and Shell Scripting
Module 3: UNIX Process
Copyright © 2009 Accenture All Rights Reserved. Accenture, its logo, and Accenture High Performance Delivered are trademarks of Accenture.
Module 3 Objectives
• Upon completing this module, the learner will be able to:
– Describe the various processes invoked before and after login
Copyright © 2009 Accenture All Rights Reserved. 2
Module 3 Agenda
Topic Name Duration
Environment of UNIX Process 25 min
Copyright © 2009 Accenture All Rights Reserved. 3
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.
Copyright © 2009 Accenture All Rights Reserved. 4
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.
Copyright © 2009 Accenture All Rights Reserved. 5
Environment of UNIX Process (1 of 3)
Start UNIX System
When a UNIX system is Bootstrapped,
Kernel creates Init Process.
init Process
For each terminal port
Init calls getty process.
getty Process Getty outputs “login:” and waits for user to
enter user name. When user enters his user
name, getty’s job is complete.
Copyright © 2009 Accenture All Rights Reserved. 6
Environment of UNIX Process (2 of 3)
getty Process
Getty creates environment for
login and invokes login program.
Login Program The Login program:
• Displays “password:” prompt
• Validates user’s password
• Puts the user in his home directory
(If logged in correctly)
• Initializes user’s environment
Copyright © 2009 Accenture All Rights Reserved. 7
Environment of UNIX Process (3 of 3)
Login Program Login program invokes user’s
login shell (sh,ksh,bash).
Login Shell Login shell reads user’s start-up files
• .profile for bourne and korn shell
• .cshrc and .login for C shell
Once start-up files are done, login
shell provides shell prompt to user.
User at Terminal Enters commands.
Copyright © 2009 Accenture All Rights Reserved. 8
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
Copyright © 2009 Accenture All Rights Reserved. 9
Knowledge Check (2 of 3)
• Which one of the following is not a valid login shell?
1. sh
2. bash
3. ssh
4. ksh
Copyright © 2009 Accenture All Rights Reserved. 10
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.
Copyright © 2009 Accenture All Rights Reserved. 11
Module 3 Summary
• Upon completing this module, you should now be able to:
– Describe the various processes invoked before and after login
Copyright © 2009 Accenture All Rights Reserved. 12
Questions and Comments
• What questions or comments
do you have?
Copyright © 2009 Accenture All Rights Reserved. 13