Unix little theary

Unix Operating System


In UNIX, the operating system is broken into three pieces: the kernel, the shell, and the built-in utilities. The kernel is responsible for low level hardware communication, the shell provides human users with a user-friendly interface, and the built-in utilities provide basic tools for doing work.
Kernel


Heart of The Unix OS.
Collection of C programs directly communicating with hardware
Part of Unix system loaded into memory when Unix is booted

Manages:-

1.System resources
2.Allocates time between user and processes
3.Decides process priorities

Shell

Human interface point for Unix

Program layer – provides an environment for the user to enter commands to get desired results.

Korn Shell, Bourne Shell, C Shell are various shells used by Unix users




User login process

1.User attempts to log in.

2. Kernel calls program ‘init’.

3.‘init’ scans file /etc/inittab , which lists the ports with terminals and their characteristics and returns an active open terminal to ‘init’.

4.init calls program ‘getty’, which issues a login prompt in the monitor.

5.User enters login and password.

6.‘getty’ calls program ‘loginwhich scans file /etc/passwd to match username and password.

7.After validation, control passes to session startup program /bin/sh , session startup program.

8.Program /bin/shreads file /etc/profile and .profile and sets up system wide and user specific environment.

9.User gets a shell prompt

1 comment: