42
Chapter One The Essence of UNIX and Linux Guide To UNIX Using Linux Fourth Edition Chapter 1 Unix (42 slides) 1 CTEC 110

Guide To UNIX Using Linux Fourth Edition

Embed Size (px)

DESCRIPTION

Guide To UNIX Using Linux Fourth Edition. Chapter One The Essence of UNIX and Linux. Objectives. Explain operating systems, including PC, mainframe, and network operating systems Describe the UNIX and Linux operating systems Explain the purpose of UNIX/Linux shells - PowerPoint PPT Presentation

Citation preview

Page 1: Guide To UNIX Using Linux Fourth Edition

Chapter One

The Essence of UNIX and Linux

Guide To UNIX Using Linux Fourth Edition

Chapter 1 Unix (42 slides)

1CTEC 110

Page 2: Guide To UNIX Using Linux Fourth Edition

• Explain operating systems, including PC, mainframe, and network operating systems

• Describe the UNIX and Linux operating systems• Explain the purpose of UNIX/Linux shells• Understand how to select user names and

passwords• Connect to UNIX/Linux using Telnet or SSH

Objectives

Chapter 1 Unix (42 slides)

2CTEC 110

Page 3: Guide To UNIX Using Linux Fourth Edition

• Use basic UNIX/Linux commands and command-line editing features

• Explain the role of a system administrator• Change your password for security• Use multiple commands to view the contents of

files• Redirect output to a file

Objectives (continued)

Chapter 1 Unix (42 slides)

3CTEC 110

Page 4: Guide To UNIX Using Linux Fourth Edition

• Operating System (OS)– The most fundamental computer

program– Enables you to store information, process

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

Understanding Operating Systems

Chapter 1 Unix (42 slides)

4CTEC 110

Page 5: Guide To UNIX Using Linux Fourth Edition

Understanding Operating Systems

Chapter 1 Unix (42 slides)

5CTEC 110

Page 6: Guide To UNIX Using Linux Fourth Edition

• A personal computer (PC) OS conducts all I/O, processing, and storage operations on a stand-alone computer

PC Operating Systems

Chapter 1 Unix (42 slides)

6CTEC 110

Page 7: Guide To UNIX Using Linux Fourth Edition

• A mainframe OS controls a large computer system with multiple processors for I/O, processing, and storage operations for many users

Mainframe Operating Systems

Chapter 1 Unix (42 slides)

7CTEC 110

Page 8: Guide To UNIX Using Linux Fourth Edition

• A network OS controls the operations of a server computer (host), which accepts requests from user programs running on other computers (clients)

Network Operating Systems

Chapter 1 Unix (42 slides)

8CTEC 110

Page 9: Guide To UNIX Using Linux Fourth Edition

• Server-based network– Centralized processing approach– Data and applications server resident– If server fails, entire network fails

• Peer-to-peer– Distributed processing approach– Data and applications workstation

resident– Each system is both a server and a client

Server-based vs. peer-to-peer networks

Chapter 1 Unix (42 slides)

9CTEC 110

Page 10: Guide To UNIX Using Linux Fourth Edition

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

server-based network Client/server workstations connected to a

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

network

Introducing the UNIX and LinuxOperating Systems

Chapter 1 Unix (42 slides)

10CTEC 110

Page 11: Guide To UNIX Using Linux Fourth Edition

• UNIX/Linux is a multi-user system• UNIX/Linux is a multitasking system

– Can execute more than one program at a time

• UNIX/Linux is a portable operating system– Used in many computing environments

Introducing the UNIX and LinuxOperating Systems (continued)

Chapter 1 Unix (42 slides)

11CTEC 110

Page 12: Guide To UNIX Using Linux Fourth Edition

• Bell Labs originally developed UNIX in the late 1960s and early 1970s

• Distributed in source code form• Universities modified the code to work on different

machines

• Two standard versions of UNIX evolved– System V (Bell Labs)– Berkeley Software Distribution (BSD)

A Brief History of UNIX

Chapter 1 Unix (42 slides)

12CTEC 110

Page 13: Guide To UNIX Using Linux Fourth Edition

• Shell– The interface between user and OS

• Hierarchical Structure– Directory and subdirectory organization

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

inner core

UNIX Concepts

Chapter 1 Unix (42 slides)

13CTEC 110

Page 14: Guide To UNIX Using Linux Fourth Edition

Chapter 1 Unix (42 slides)

14CTEC 110

Page 15: Guide To UNIX Using Linux Fourth Edition

• Linux is UNIX-like– Not written from traditional UNIX code

• Linux is original code– Includes POSIX standards

• Other Linux information– Created by Linus Torvalds– Offers all the complexity of UNIX– Linux can coexist with other OSs

Linux and UNIX

Chapter 1 Unix (42 slides)

15CTEC 110

Page 16: Guide To UNIX Using Linux Fourth Edition

A shell is a UNIX/Linux program that interprets the commands you enter from the keyboard

Introducing UNIX/Linux Shells

Chapter 1 Unix (42 slides)

16CTEC 110

Page 17: Guide To UNIX Using Linux Fourth Edition

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

• A default shell is associated with your account when created; Bash is the default shell in Linux

• Some UNIX/Linux shells: Bourne, Korn, C shell, Bash• Can switch from shell to shell

Choosing Your Shell

Chapter 1 Unix (42 slides)

17CTEC 110

Page 18: Guide To UNIX Using Linux Fourth Edition

• To use UNIX/Linux, a user must log in by providing a unique user name and password

• UNIX/Linux system administrators create accounts by adding user names and passwords

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

Choosing User Names and Passwords

Chapter 1 Unix (42 slides)

18CTEC 110

Page 19: Guide To UNIX Using Linux Fourth Edition

• Remotely through Telnet (Use SSH Mostly Now!)• Through network client software• As peer on peer-to-peer network• On a stand-alone PC• Through a dumb terminal

Connecting to UNIX/Linux Using Telnet or SSH

Chapter 1 Unix (42 slides)

19CTEC 110

Page 20: Guide To UNIX Using Linux Fourth Edition

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

▫ PC could be running UNIX, Linux, Windows OS, or Macintosh OS

▫ Once connected to a UNIX/Linux host, work with UNIX/Linux may begin

– Uses IP addresses or domain names to access remote systems

Connecting to UNIX Using Telnet

Chapter 1 Unix (42 slides)

20CTEC 110

Page 21: Guide To UNIX Using Linux Fourth Edition

• Developed for UNIX/Linux systems to provide authentication security for TCP/IP applications, such as FTP and Telnet

• Can encrypt communications as they go across a network or the Internet

• openSSH includes protocols and software for free distribution on UNIX/Linux systems

Secure Shell (SSH)

Chapter 1 Unix (42 slides)

21CTEC 110

Page 22: Guide To UNIX Using Linux Fourth Edition

• Log in by entering username and password when UNIX/Linux system booted or connected to

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

• Now commands can be issued at the command prompt

Logging In to UNIX/Linux

Chapter 1 Unix (42 slides)

22CTEC 110

Page 23: Guide To UNIX Using Linux Fourth Edition

With a standalone computer and an X Window desktop such as GNOME, you must open a terminal window to access the command prompt

Logging In to UNIX/Linux (continued)

Chapter 1 Unix (42 slides)

23CTEC 110

Page 24: Guide To UNIX Using Linux Fourth Edition

• To interact with UNIX/Linux, a command is entered at the command prompt

• UNIX/Linux is case-sensitive and most commands are typed in lower case

• Two categories of commands– User-level: perform tasks– System administration: system management

Using Commands

Chapter 1 Unix (42 slides)

24CTEC 110

Page 25: Guide To UNIX Using Linux Fourth Edition

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

administrator maintains• The cal command

– Shows the system calendar

Using Commands (continued)

Chapter 1 Unix (42 slides)

25CTEC 110

Page 26: Guide To UNIX Using Linux Fourth Edition

Using Commands (continued)

Chapter 1 Unix (42 slides)

26CTEC 110

Page 27: Guide To UNIX Using Linux Fourth Edition

Using Commands (continued)

Chapter 1 Unix (42 slides)

27CTEC 110

Page 28: Guide To UNIX Using Linux Fourth Edition

• The who Command– To get information about who is logged in– Useful for administrators and users

• The clear Command– Clears the screen

• The whatis command– Displays a brief description of a command for

help purposes

Using Commands (continued)

Chapter 1 Unix (42 slides)

28CTEC 110

Page 29: Guide To UNIX Using Linux Fourth Edition

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

Using Commands (continued)

Chapter 1 Unix (42 slides)

29CTEC 110

Page 30: Guide To UNIX Using Linux Fourth Edition

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

editing (shell dependent)• Multiple command entries

– More than one command on one line by separating with a semicolon(;)

Using Commands (continued)

Chapter 1 Unix (42 slides)

30CTEC 110

Page 31: Guide To UNIX Using Linux Fourth Edition

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

command history• Logging out ends your current process and indicates

to UNIX that you are finished• Logging out is shell dependent

– Bourne, Korn, Bash – exit command– C shell – logout command

Using Commands (continued)

Chapter 1 Unix (42 slides)

31CTEC 110

Page 32: Guide To UNIX Using Linux Fourth Edition

• System administrator manages the UNIX/Linux system– Adds users and deletes old accounts– Also called the superuser– Unlimited permission to alter system– Unique user name: root– Prompt ends with # (pound) symbol

Understanding the Role of the UNIX/Linux System Administrator

Chapter 1 Unix (42 slides)

32CTEC 110

Page 33: Guide To UNIX Using Linux Fourth Edition

• The System Administrator’s Command Line– [root@hostname root]#

• The Ordinary User’s Command Line– [username@hostname username] $

Understanding the Role of the UNIX/Linux System Administrator (continued)

Chapter 1 Unix (42 slides)

33CTEC 110

Page 34: Guide To UNIX Using Linux Fourth Edition

• For security purposes, changing passwords is necessary– Use the passwd command– UNIX/Linux allows new password if:

▫ The new password differs by at least three characters

▫ It has six or more characters, including at least two letters and one number

▫ It is different from the user name

Changing Passwords

Chapter 1 Unix (42 slides)

34CTEC 110

Page 35: Guide To UNIX Using Linux Fourth Edition

• Use cat, more, and less to view an entire file contents– cat displays a whole file at one time– more displays a file one screen at a time,

allowing scroll down – less displays a file one screen at a time,

allowing scroll down and up

Viewing Files Using thecat, more, less, head, and tail Commands

Chapter 1 Unix (42 slides)

35CTEC 110

Page 36: Guide To UNIX Using Linux Fourth Edition

• Use head and tail to view the first few or last few lines of a file– head displays the first few lines (10 lines)– tail displays the last few lines (10 lines)

Viewing Files Using thecat, more, less, head, and tail Commands (continued)

Chapter 1 Unix (42 slides)

36CTEC 110

Page 37: Guide To UNIX Using Linux Fourth Edition

• The greater than sign (>) is called a redirection symbol

• Create a new file or overwrite an existing file by attaching (>) to a command that produces output

• To append to an existing file, use two redirection symbols (>>)

Redirecting Output

Chapter 1 Unix (42 slides)

37CTEC 110

Page 38: Guide To UNIX Using Linux Fourth Edition

• OS controls all computer resources and provides the base upon which application programs can be used or written

• A server-based network is centralized (handled by the system administrator)

• A peer-to-peer network is decentralized• UNIX/Linux are multi-user, multitasking

Chapter Summary

Chapter 1 Unix (42 slides)

38CTEC 110

Page 39: Guide To UNIX Using Linux Fourth Edition

• UNIX/Linux systems can be configured as servers, client workstations, client/server workstations, or stand-alone

• The concept of the layered components that make up an OS originated with UNIX

• Linux is a UNIX-like OS for a PC• You communicate with the OS programs through

an interpreter called the shell

Chapter Summary (continued)

Chapter 1 Unix (42 slides)

39CTEC 110

Page 40: Guide To UNIX Using Linux Fourth Edition

• The system administrator sets up accounts for users that supply a username and password

• You work with UNIX by typing commands that you can learn by referring to the online manual called man pages

Chapter Summary (continued)

Chapter 1 Unix (42 slides)

40CTEC 110

Page 41: Guide To UNIX Using Linux Fourth Edition

• Most shells provide basic command-line editing capabilities and keep a history of your most recently used commands

• You can view the contents of files with view commands such as cat, less, more, head, and tail

Chapter Summary (continued)

Chapter 1 Unix (42 slides)

41CTEC 110

Page 42: Guide To UNIX Using Linux Fourth Edition

• Work through Hands-on Projects at end of chapter 1

• Canvas: Review Questions 1- (Do not do questions 22,23,24

and 25 on All Unix Chapters!)

• Read chapter 2 before next class session

• Quiz 1 UNIX…

Chapter 1 Unix Exercises

Chapter 1 Unix (42 slides)

42CTEC 110