essence of unix

31
The Essence of UNIX The Essence of UNIX

Upload: sammy17

Post on 14-Dec-2014

719 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Essence of Unix

The Essence of UNIXThe Essence of UNIX

Page 2: Essence of Unix

22

ObjectivesObjectives

Define operating systems in general and the Define operating systems in general and the UNIX operating system in particularUNIX operating system in particular

Describe Linux as it relates to UNIXDescribe Linux as it relates to UNIX

Explain the function of UNIX shellsExplain the function of UNIX shells

Describe the options for connecting to a UNIX Describe the options for connecting to a UNIX systemsystem

Define the syntax used for entering UNIX Define the syntax used for entering UNIX commandscommands

Page 3: Essence of Unix

33

Objectives (cont.)Objectives (cont.)

Use the date, cal, who, man, whatis, and clear Use the date, cal, who, man, whatis, and clear commandscommands

Perform basic command-line editing operationsPerform basic command-line editing operations

Enter multiple commands on a single command Enter multiple commands on a single command lineline

Recall a command from the command historyRecall a command from the command history

Log in to and log out of UNIXLog in to and log out of UNIX

Page 4: Essence of Unix

44

Understanding Operating Understanding Operating SystemsSystems

Operating System (OS)Operating System (OS)– The most fundamental computer programThe most fundamental computer program– Enables you to store information, process raw Enables you to store information, process raw

data, use application software, compile your data, use application software, compile your own programs, and access attached own programs, and access attached hardware, such as a printer or keyboardhardware, such as a printer or keyboard

UNIX Operating SystemUNIX Operating System– Leading OS for workstations, which are Leading OS for workstations, which are

computers on a local area network (LAN)computers on a local area network (LAN)

Page 5: Essence of Unix

55

Understanding Operating SystemsUnderstanding Operating Systems

Page 6: Essence of Unix

66

PC Operating SystemsPC Operating SystemsA personal computer (PC) OS conducts all the input, output, A personal computer (PC) OS conducts all the input, output, processing, and storage operations on a stand-alone computerprocessing, and storage operations on a stand-alone computer

Page 7: Essence of Unix

77

Mainframe Operating SystemsMainframe Operating SystemsA mainframe OS controls a large computer system with multiple A mainframe OS controls a large computer system with multiple processors that conduct input, output, processing, and storage processors that conduct input, output, processing, and storage operations for many usersoperations for many users

Page 8: Essence of Unix

88

Network Operating SystemsNetwork Operating SystemsA network OS controls the operations of a server computer, A network OS controls the operations of a server computer, sometimes called a host, which accepts requests from user sometimes called a host, which accepts requests from user programs running on other computers, called clientsprograms running on other computers, called clients

Page 9: Essence of Unix

99

Server-based vs. peer-to-peer Server-based vs. peer-to-peer networks networks

Server-based networkServer-based network– Centralized processing approachCentralized processing approach– Data and applications server residentData and applications server resident– If server fails, entire network failsIf server fails, entire network fails

Peer-to-peerPeer-to-peer– Distributed processing approachDistributed processing approach– Data and applications workstation residentData and applications workstation resident– Each system is both a server and a clientEach system is both a server and a client

Page 10: Essence of Unix

1010

Introducing the UNIXIntroducing the UNIXOperating SystemOperating System

UNIX can be used on systems functioning UNIX can be used on systems functioning as:as:– Dedicated servers or client workstations in a Dedicated servers or client workstations in a

server-based networkserver-based network– Client/server workstations connected to a Client/server workstations connected to a

peer-to-peer networkpeer-to-peer network– Stand-alone workstations not connected to a Stand-alone workstations not connected to a

networknetwork

Page 11: Essence of Unix

1111

Introducing the UNIXIntroducing the UNIXOperating SystemOperating System

UNIX is a multi-user systemUNIX is a multi-user system– Allows many users access and share the Allows many users access and share the

resources of a server computerresources of a server computer

UNIX is a multitasking systemUNIX is a multitasking system– Allows user to execute more than one Allows user to execute more than one

program at a timeprogram at a time

UNIX is a portable operating systemUNIX is a portable operating system– Used in many computing environmentsUsed in many computing environments

Page 12: Essence of Unix

1212

UNIX ConceptsUNIX Concepts

ShellShell– The interface between user and OSThe interface between user and OS

Hierarchical StructureHierarchical Structure– Directory and subdirectory organizationDirectory and subdirectory organization

Layered componentsLayered components– Layers of software surround the computer’s Layers of software surround the computer’s

inner coreinner core

Page 13: Essence of Unix

1313

Page 14: Essence of Unix

1414

Linux and UNIXLinux and UNIX

Linux is UNIX-likeLinux is UNIX-like– Not written from traditional UNIX codeNot written from traditional UNIX code

Linux is original codeLinux is original code– Includes POSIX standardsIncludes POSIX standards

Other Linux informationOther Linux information– Created by Linus TorvaldsCreated by Linus Torvalds– Offers all the complexity of UNIXOffers all the complexity of UNIX– Linux can coexist with other OSsLinux can coexist with other OSs

Page 15: Essence of Unix

1515

Introducing UNIX ShellsIntroducing UNIX Shells

A shell is a UNIX A shell is a UNIX program that program that interprets the interprets the commands you commands you enter from the enter from the keyboardkeyboard

Page 16: Essence of Unix

1616

Choosing Your ShellChoosing Your Shell

Shells interpret commands and act as first-class Shells interpret commands and act as first-class programming languagesprogramming languages

A default shell is associated with your account A default shell is associated with your account when created – Bash is the default shell in Linuxwhen created – Bash is the default shell in Linux

A list of some UNIX shells:A list of some UNIX shells:– BourneBourne– KornKorn– C shellC shell– BashBash

Page 17: Essence of Unix

1717

Choosing User Names Choosing User Names and Passwordsand Passwords

To use UNIX, a user must log in by providing a To use UNIX, a user must log in by providing a unique user name and passwordunique user name and password

UNIX system administrators create accounts by UNIX system administrators create accounts by adding user names and passwordsadding user names and passwords

Users log in to UNIX or Linux systems as long Users log in to UNIX or Linux systems as long as they have accounts on the workstation or as they have accounts on the workstation or host (server) computerhost (server) computer

Page 18: Essence of Unix

1818

Connecting to a UNIX SystemConnecting to a UNIX System

Remotely through TelnetRemotely through Telnet

Through network client softwareThrough network client software

As peer on peer-to-peer networkAs peer on peer-to-peer network

On a stand-alone PCOn a stand-alone PC

Through a dumb terminalThrough a dumb terminal

Page 19: Essence of Unix

1919

Connecting to UNIXConnecting to UNIXUsing TelnetUsing Telnet

Telnet is terminal emulation softwareTelnet is terminal emulation software– Connects your PC to a server, or hostConnects your PC to a server, or host

PC could be running UNIX, Linux, PC could be running UNIX, Linux, Windows OS, or Macintosh OSWindows OS, or Macintosh OSOnce connected to a UNIX host, work Once connected to a UNIX host, work with UNIX may beginwith UNIX may begin

– Uses IP addresses or domain names Uses IP addresses or domain names to access remote systemsto access remote systems

Page 20: Essence of Unix

2020

Logging in to UNIXLogging in to UNIX

Log in by entering username and password Log in by entering username and password when UNIX system booted or connected towhen UNIX system booted or connected to

Enter at prompt (command-line mode) or into Enter at prompt (command-line mode) or into login box (GUI mode)login box (GUI mode)

Now commands can be issued at the Now commands can be issued at the command promptcommand prompt

Page 21: Essence of Unix

2121

Logging In to UNIXLogging In to UNIX

Telnet is accessed in Telnet is accessed in Red Hat Linux using Red Hat Linux using the GNOME interfacethe GNOME interface

Page 22: Essence of Unix

2222

Entering CommandsEntering Commands

To interact with UNIX, a command is entered To interact with UNIX, a command is entered at the command promptat the command prompt

UNIX is case-sensitive and most commands UNIX is case-sensitive and most commands are typed in lower caseare typed in lower case

Two categories of commandsTwo categories of commands– User-level: perform tasksUser-level: perform tasks– System administration: system managementSystem administration: system management

Page 23: Essence of Unix

2323

Entering CommandsEntering Commands

The date commandThe date command– Displays the system date, which the system Displays the system date, which the system

administrator maintainsadministrator maintains

The cal commandThe cal command– Shows the system calendarShows the system calendar

The who commandThe who command– Shows who is using the system and their Shows who is using the system and their

current locationcurrent location

Page 24: Essence of Unix

2424

Entering CommandsEntering Commands

Page 25: Essence of Unix

2525

Entering CommandsEntering Commands

Page 26: Essence of Unix

2626

Entering CommandsEntering Commands

Page 27: Essence of Unix

2727

Entering CommandsEntering Commands

Command-line editingCommand-line editing– Certain keystrokes perform command-line Certain keystrokes perform command-line

editing (shell dependent)editing (shell dependent)

Multiple command entryMultiple command entry– More than one command on one line by More than one command on one line by

separating with a semicolon(;)separating with a semicolon(;)

The clear commandThe clear command– Clears the current screenClears the current screen

Page 28: Essence of Unix

2828

Entering CommandsEntering Commands

Command-line historyCommand-line history– Use up and down arrow keys to scroll Use up and down arrow keys to scroll

through command historythrough command history

The whatis commandThe whatis command– Displays a brief description of a command Displays a brief description of a command

for help purposesfor help purposes

Page 29: Essence of Unix

2929

Entering CommandsEntering Commands

The man program The man program displays the UNIX displays the UNIX online reference online reference manual, called the manual, called the man pages, for man pages, for help purposeshelp purposes

Page 30: Essence of Unix

3030

Logging Out of UNIXLogging Out of UNIX

Logging out ends your current process Logging out ends your current process and indicates to UNIX that you are and indicates to UNIX that you are finishedfinished

Logging out is shell dependentLogging out is shell dependent– Bourne, Korn, Bash – exit commandBourne, Korn, Bash – exit command– C shell – logout commandC shell – logout command

Page 31: Essence of Unix

3131

Understanding the Role of the Understanding the Role of the UNIX System AdministratorUNIX System Administrator

System administrator manages the UNIX System administrator manages the UNIX systemsystem– Adds users and deletes old accountsAdds users and deletes old accounts– Also called the superuserAlso called the superuser– Unlimited permission to alter systemUnlimited permission to alter system– Unique user name: rootUnique user name: root– Prompt ends with # (pound) symbolPrompt ends with # (pound) symbol