Chap1 3
Chap1 3
Memory
CPU Network Printers
Programs
Consumers
Resources
Unix Services
An operating system provides the following services for users:
1. Program Execution loads the user program in memory and runs it.
2. I/O Operations responsible for reading and/or writing data from I/O devices such as disks, tapes, printers, keyboards, etc. 3. File System Handling handles the way files are organized within the disk or tape. It takes care of the creation and deletion of files for users. 4. Error Detection detect errors within the computer system (CPU, memory, I/O, or user program) and take the appropriate action.
History of UNIX
1969 UNIX developed by AT&T Bell Labs 1980 UC Berkeley BSD UNIX 4.2 becomes widely used Early 1980s Hewlett-Packard introduces HP-UX Early 1990s POSIX, Portable Operating System Interface
UNIX Variants
AIX from IBM HP-UX from Hewlett-Packard Ultrix from DEC Xenix from Microsoft OSF/1 from Open Software Foundation Solaris from Sun Microsystems Linux Linus Torvalds Ubuntu
Benefits of UNIX based on an open standard supported on a wide variety of computers TCP/IP tightly integrated true 64bit architecture Hierarchical File System Multi-tasking; Multi-user
Common Subdirectories
/usr directory - executables, system admin utilities, and library routines /opt (optional) directory applications and third party applications /dev (devices) directory - files which are pointers to device names /etc (etcetera) directory - system admin files (passwd file) /export/home directory - user home directories /kernel directory - basic operating system files (main UNIX kernel genunix) /var (variable) directory - print spooling and mail system error messages
Shells
Bourne shell ($) developed by Stephen Bourne for AT&T original shell program Provides a UNIX system command interpreter Supports a programmable interface to develop shell programs Korn shell ($) developed by David Korn at Bell Labs An enhanced Bourne shell added features such as aliasing and history most widely used shell and is industry standard for users this course is based primarily on the Korn shell
Shell cont..
C shell (%) developed at the University of California Berkley by Bill Joy Short California Shell based on the C programming language Allows recalling and editing of previously entered commands and aliasing POSIX shell Similar to Korn shell Command programming language and command interpreter It supporst command history, line editing, file name completion, aliasing, and job control
User Accounts
Root or "super user" system admin set up by default during the installation process owns all system files and has access to all files used to create new users, manage file systems, install software and perform other high-level system admin tasks Most sysadmins have a regular user account and only login as root when necessary to perform administrative tasks Regular User created and maintained by the sysadmin when logged on as root can run applications programs and customize working environment can also create and modify files in their home directory
Changing Password
Command-line Format
Syntax: $ command [-options] [arguments] return Examples: $ date $ls case sensitive
$(
Logging out
Ctrl+D exit
man pages
installed by default
character-based screen displays and are not graphical
man command
$man -k keyword - Searches the man pages table of contents for the specified keyword and displays one-line summary for each entry
$ man -s section name - Displays a particular section of the man pages which can include multiple commands
whatis Command
display the header line from the manual section brief definition of the command helpful if you can remember the command name but forgot what it does
Troubleshooting
Unresponsive Terminal: Enable screen scroll using Control Q (Ctrl + q keys) Interrupt the process using Control C (Ctrl + c keys) Enter EOF (end of file) using Control D (Ctrl + d keys) Quit the window and restart a new one. Unresponsive Application: Determine the process ID number associated with the application and kill that process (chap 13) Logout and log back in again then restart the application.