Sunteți pe pagina 1din 4

Unix Operating System

The UNIX operating system is made up of three parts; the kernel, the shell and the programs.

The Kernel The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls. Shell and Kernel work together Example :%rm myfile Shell searches for file which containing program rm . Requests Kernel , through system call to execute rm on myfile. When finished control returns to shell prompt. Waiting for commands The Shell Shell is a interface between user and kernel. It is a CLI

Unix directory structure

/ (root) -- The / notes the "root" of the filesystem, where the entire system is contained. Unix holds the entire system in this single top-level directory, including each device and document. In Unix, "everything is a file. /bin -- Stands for "binaries"; Contains fundamental utilities needed by a system administrator. As a failsafe, these were placed in a separate directory so that they could be placed on a separate disk or disk partition in case the main drive failed. /etc -- Contains configuration files and some system databases.

/dev -- short for devices. Contains file representations of every peripheral device attached to the system. /dev/null -- Also known as the "bit bucket" or "black hole", this virtual file discards all contents written to it. This is typically used to throw away unwanted data streams, such as log files. /dev/random -- This is a virtual file which contains random numbers /home -- contains the home directories for the users. On some Unices, this is under /usr/home /mnt -- This is the default location to mount external devices like hard disk drives, pen drives etc. /lib -- This is the depository of all integral UNIX system libraries. /root -- the home directory for the superuser root. /tmp -- a place for temporary files. Many Unices clear this directory upon start up. /usr -- originally the directory holding user home directories, its use has changed, and it now holds executables, libraries, and shared resources that are not system critical/usr/bin -- This directory stores the executables that live in /usr. /usr/include -- /usr/include stores the development headers used throughout the system. /usr/lib -- The required libraries for executables within /usr or elsewhere for that matter, live here. /var -- short for "variable." A place for files that may change often, such as the storage to a database, the contents of a database, log files (usually stored in /var/log), email stored on a server, etc. /var/log/ -- Storage for the system log files. /var/mail/ -- the place where all the incoming mails are stored. The user can access his/her own mail only unless he/she has admin rights. /var/spool/ -- contains print jobs, mail spools and various other tasks that have been queued , waiting for some related task to finish.

File Types

1.Ordinary Files 2.Directory Files 3.Special Files

Unix Shell Variables and Environments


$env
Variable Description HISTFILE The name of the file in which command history is saved HISTFILESIZE The maximum number of lines contained in the history file HOSTNAME The system's host name LD_LIBRARY_PATH It is a colon-separated set of directories where libraries should be searched for PS1 Your default (first) shell prompt USER Current logged in user's name. PATH Colon separated list of directories to search for binaries. DISPLAY Network name of the X11 display to connect to, if available. SHELL The current shell. TERM The name of the user's terminal. Used to determine the capabilities of the terminal. TERMCAP Database entry of the terminal escape codes to perform various terminal functions. OSTYPE Type of operating system. MACHTYPE The CPU architecture that the system is running on. EDITOR The user's preferred text editor. PAGER The user's preferred text pager. MANPATH Colon separated list of directories to search for manual pages.

Run Levels

# init 0 #init 6

-- Shutdown --Reboot

Commands

1.General Purpose Commands

# man command #whatis command #apropos Search Pattern #passwd #who #w #script #uname #date #cal #bc #echo #clear #which #history

S-ar putea să vă placă și