Operating System (OS) A computer program that manages the hardware and software resources of a...

Post on 21-Dec-2015

229 views 0 download

Tags:

transcript

Operating System (OS)Operating System (OS)

A computer program that manages A computer program that manages the hardware and software resources the hardware and software resources of a computer.of a computer.• controlling and allocating memorycontrolling and allocating memory• prioritizing system requestsprioritizing system requests• controlling input and output devicescontrolling input and output devices• facilitating networkingfacilitating networking• managing files. managing files.

Operating System (OS)Operating System (OS)

Operating System (OS)Operating System (OS)

MAC OS X

Operating System (OS)Operating System (OS)

Linux

Graphical user interface (GUI)Graphical user interface (GUI)

GUI, often pronounced "gooey.” GUI, often pronounced "gooey.” A particular case of user interface for A particular case of user interface for

interacting with a computer which interacting with a computer which employs graphical images and employs graphical images and widgets in addition to text to widgets in addition to text to represent the information and represent the information and actions available to the user. actions available to the user.

UnixUnix

Unix (officially trademarked as Unix (officially trademarked as UNIX™) is a computer operating UNIX™) is a computer operating system originally developed in the system originally developed in the 1960s and 1970s by a group of AT&T 1960s and 1970s by a group of AT&T employees at Bell Labs.employees at Bell Labs.

Why Unix ?Why Unix ?

Platform independentPlatform independent• Unix is more flexible and can be Unix is more flexible and can be

installed on many different types of installed on many different types of machines, including main-frame machines, including main-frame computers, supercomputers and micro-computers, supercomputers and micro-computers.computers.

StableStable• Not often goes down like Windows does, Not often goes down like Windows does,

so requires less administration and so requires less administration and maintenance.maintenance.

Why Unix ?Why Unix ?

ReliableReliable• Unix has greater built-in security and Unix has greater built-in security and

permissions features than Windows.permissions features than Windows. FreeFree

• Open-source Operating systemOpen-source Operating system Any computer software whose source code Any computer software whose source code

is available under a license that permits is available under a license that permits users to study, change, and improve the users to study, change, and improve the software, and to redistribute it in modified or software, and to redistribute it in modified or unmodified form. unmodified form.

UNIX system layersUNIX system layers

http://www.bsu.edu/classes/west/cs276/module7.html

Kernel?Kernel?

The central component of most The central component of most computer operating systems (OSs).computer operating systems (OSs).

Its responsibilities include managing Its responsibilities include managing the system's resources and the the system's resources and the communication between hardware communication between hardware and software components.and software components.

Kernel?Kernel?

Shell?Shell?

A Unix shell, also called "the A Unix shell, also called "the command line", provides the command line", provides the traditional user interface for the Unix traditional user interface for the Unix operating system and for Unix-like operating system and for Unix-like systems. systems.

Users direct the operation of the Users direct the operation of the computer by entering command computer by entering command input as text for a shell to execute.input as text for a shell to execute.

Shell?Shell?

Samples of UNIX shellsSamples of UNIX shells• Bourne shell (sh)Bourne shell (sh)• Korn shell (ksh)Korn shell (ksh)• C shell (csh)C shell (csh)

UNIX directory treeUNIX directory tree

UNIX directory treeUNIX directory tree

//• Root directory on some systemsRoot directory on some systems

/bin/bin• binary files (program files)binary files (program files)• EX. ls, mkdir, rm, etc.EX. ls, mkdir, rm, etc.

/boot/boot or or /kernel/kernel• information for booting the system, information for booting the system,

directory for storing (the) kernel(s).directory for storing (the) kernel(s).

UNIX directory treeUNIX directory tree

/dev/dev• entries for all devices.entries for all devices.

/etc/etc• system configuration files, startup and system configuration files, startup and

shutdown procedures.shutdown procedures. /home/home

• (or /export/home or /users on some (or /export/home or /users on some systems): user home directoriessystems): user home directories

UNIX directory treeUNIX directory tree

/lib/lib• library fileslibrary files

/etc/etc• entries for network systemsentries for network systems

/opt/opt• third party software (used to be third party software (used to be

/usr/local), unbundled software/usr/local), unbundled software

UNIX directory treeUNIX directory tree

/var/var• Variable data. Data files that are continually Variable data. Data files that are continually

being re-created or updated.being re-created or updated. /src/src

• These are sources to the kernel or locally These are sources to the kernel or locally built packages.built packages.

/tmp/tmp• Temporary files. A convenient place for a Temporary files. A convenient place for a

running program to create a file for running program to create a file for temporary use.temporary use.

Basic UNIX commandsBasic UNIX commands Directory commandsDirectory commands

cdcd Change the working directoryChange the working directoryfindfind Find a file by name or by other Find a file by name or by other characteristicscharacteristicsmkdirmkdir Make a directoryMake a directoryrmdirrmdir Remove a directoryRemove a directory

File manipulation commandsFile manipulation commands

catcat Display a fileDisplay a filechmodchmod Change the permissions mode of a fileChange the permissions mode of a filechownchown Change the owner and/or group of a fileChange the owner and/or group of a filecpcp Copy a fileCopy a filediffdiff Display differences between pairs of Display differences between pairs of text filestext filesgrepgrep Search a file for a specific text stringSearch a file for a specific text stringmvmv Move or rename a fileMove or rename a filermrm Remove a fileRemove a file

Basic UNIX commandsBasic UNIX commands Display commandsDisplay commands

datedate Print the date and timePrint the date and timefingerfinger Display information about a userDisplay information about a userheadhead Display the first few lines of a fileDisplay the first few lines of a filelessless Browse a text fileBrowse a text filelsls List the contents of a directoryList the contents of a directorymanman Display a reference manual pageDisplay a reference manual pagemoremore Display a text fileDisplay a text filepwdpwd Display the working directory pathnameDisplay the working directory pathnametailtail Display the end of a fileDisplay the end of a filewhowho Display who is on the systemDisplay who is on the system

Process commandsProcess commands

exitexit Terminate a processTerminate a processkillkill Terminate or send a signal to a processTerminate or send a signal to a processpasswdpasswd Create or change a passwordCreate or change a passwordpsps Display the status of a processDisplay the status of a processtelnettelnet Connect to a remote system using the Telnet protocolConnect to a remote system using the Telnet protocol

Basic UNIX commandsBasic UNIX commands

Commands in UNIX are case-Commands in UNIX are case-sensitive.sensitive.

File name cannot have space in-File name cannot have space in-between, otherwise UNIX will between, otherwise UNIX will separate into different files.separate into different files.

VI: UNIX text editorVI: UNIX text editor

Vi is a screen-oriented text editor Vi is a screen-oriented text editor computer program written by Bill computer program written by Bill Joy in 1976 for an early BSD Joy in 1976 for an early BSD release.release.

VI: UNIX text editorVI: UNIX text editor

VI: UNIX text editorVI: UNIX text editor

Insert mode Insert mode [i][i] Command mode Command mode [:][:]

• Ex.Ex. :q:q exit exit from vifrom vi

:w:w save filesave file

:set number:set number show show line line number number