0% found this document useful (0 votes)
78 views29 pages

Chap1 3

This document provides an overview of the UNIX operating system and introduces some basic UNIX commands. It discusses what an operating system is and its main functions. It then describes the UNIX operating system and some of its key components like shells, file system directory structure, and man pages. Finally, it covers basic commands for logging in and out, checking the date/time, viewing who is logged in, and getting help via man pages.

Uploaded by

raymart_omampo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views29 pages

Chap1 3

This document provides an overview of the UNIX operating system and introduces some basic UNIX commands. It discusses what an operating system is and its main functions. It then describes the UNIX operating system and some of its key components like shells, file system directory structure, and man pages. Finally, it covers basic commands for logging in and out, checking the date/time, viewing who is logged in, and getting help via man pages.

Uploaded by

raymart_omampo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 29

Chapter 1 Introduction to UNIX

What is an Operating System?


An Operating System is a special computer program (software) that controls the computer (hardware). The Operating system serves as a liaison between the consumers and the resources, often coordinating the allocation of limited resources among numerous consumers. Disks

Users Operating System

Memory
CPU Network Printers

Programs

Consumers

Resources

UNIX Operating System


An operating System can be thought of as 1. Resource Allocator the operating system manages the different computer resources such as CPU time, memory space, file storage space, I/O devices, etc. and allocates them to different application programs and users. 2. Control Program it controls the execution of programs and the various I/O devices.

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

Suse (Novell Netware)


Red Hat Debian

UNIX Varieties and Benefits

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

File System Directory Hierarchy


File System - group of directories that can be thought of as a separate tree structure

similar to logical partitions in the Windows/DOS world (like C: or D: drive)


made available (mounted) or unavailable (unmounted) at the administrators discretion can either be local (on your computer) or remote (on another computer) Directory - location for other files and subdirectories like a file drawer in a file cabinet Subdirectory - Any directory below another directory Files - contained in directories and subdirectories

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

Operating System Components

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

Chapter 2 Logging In and General Orientation

Login ID and Password


Login ID users public name must be unique and limited to eight lower case letters and numbers stored in the password (/etc/passwd) file which can be viewed by all users encrypted passwords are stored in the /etc/shadow file Passwords no less than six and no more than eight characters different from the Login ID at least two alphabetic characters and one numeric or special character case sensitive new password must differ by at least three characters may contain spaces and special characters these password rules do not apply to the root account!

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

must be done at command line can be done by regular user


$ passwd passwd: Changing password for user02 Enter login password: ABC 123 New password: abc 456 Re-enter new passwd: abc 456

Command-line Format
Syntax: $ command [-options] [arguments] return Examples: $ date $ls case sensitive

Can type 2 commands on a single command line, separated by a semicolon $ ls;pwd

The Secondary Prompt


$ banner hi there

$(

$ if *press ctrl c if you want to terminate currently running program

Some Beginning Commands


$who is used to determine the users currently logged in the system. $finger same as who $whoami is used to determine who is currently logged-in at a particular terminal. $date - reports the date and time $passwd - assign a login password

Some Beginning Commands cont.


$echo - writes arguments to the terminal $clear - clears the terminal screen $write - sends message to username if logged in $talk $mesg [y|n] - allows or denies writes to your terminal

Some Useful Keys to Remember


Ctrl+C Use this to abort a running UNIX program Ctrl+S Use this freeze a screen output Ctrl+Q Use this to unfreeze a screen output Ctrl+R Use this to refresh or redraw your screen Ctrl+L Use this if Ctrl+R does not work Backspace Use this to erase mistakes before pressing the Enter key

Logging out
Ctrl+D exit

man pages

UNIX Programmers Manual


describes the systems on-line commands, system calls, file formats, and system maintenance

installed by default
character-based screen displays and are not graphical

command prompt to access

man command

$ man name - help on particular 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

Chapter 3 Getting Help

man Page Output


NAME - name of command and other commands that do the same thing SYNOPSIS - syntax of command with options and arguments DESCRIPTION - overview of what command does OPERANDS - target of the command OPTIONS - switches that change the function or effect of the command; normally preceded by a dash (-) SEE ALSO - Refers you to other related commands and subjects

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

man Pages Scrolling

man pages can be many screens of output

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.

You might also like