agenda getting started: using unix unix structure / features elements of the unix philosophy unix...

13
Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command Manual (man)

Upload: lesley-mathews

Post on 13-Dec-2015

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Agenda Getting Started: Using Unix

Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command Manual (man)

Page 2: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Textbook Coverage These PowerPoint notes are based

on Chapter 2 of textbook “A Practical Guide to Linux”

Read pages 19 to 30

Page 3: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Unix Structure The Linux operating system (OS) can be

visualized in terms of layers:

Linux Kernel

The shell & otherbasic utilities

Interpreters

Editors

Inventory controlsystems

Spreadsheetapplications

Word processorsComputer Hardware (Devices)

UNIX KERNELControls computer resources and schedules jobs

UNIX SHELLActs as a command interpreter and as an interface

between users and the operating system

UNIX UTILITIESA comprehensive set of utilities used by Unix administrators

& users. Utilities are often referred to as commands

Page 4: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Unix Features The Unix operating system has the ability to run many

processes (jobs) at the same time. Many jobs create other jobs that run simultaneously (for example, the Unix OS Kernel is a job which creates other jobs such as scheduling tasks, etc).

Running many processes at the same time can allow many users to connect to and use the computer resources at the same time (This concept is referred to as "multitasking").

The Unix file system allows users to share or restrict access to their files and directories.

Unix allows for a “Super-user” or “root” account to update or modify the UNIX Kernel (operating system).

Page 5: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Unix Features

The Unix Shell provides a command interpreter to allow the user to communicate with the computer system (both on a software and hardware basis).

There are thousands of commands available. Many of these commands or "utilities" are available for the regular user. There are also commands that are available for the "super-user" for administering the OS.

The Shell is not only a command interpreter, but is also a programming interface commands can be bundled into files to be run (shell scripts) to accomplish many tasks.

Page 6: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

The Unix Philosophy The Unix operating system is

considered to be a “complex” operating system by the beginning user.

In order to get an “intuitive feel” (better understanding) of Unix, users should understand the philosophy of Unix which was developed by its creators over 30 years ago.

Page 7: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Elements of the Unix Philosophy

“Keep It Small and Simple (KISS)”:Do one task well (i.e. A command should be designed to do only one task and do it well).

“Understand the Unix Hierarchy”Everything on the UNIX OS is interpreted as a file (file, directory, device). Directories are structured in a Hierarchical nature (like a family tree) to better organize material. Similar concept applies to processes.

Page 8: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Elements of the Unix Philosophy

“Using Pipes”:Unix commands can be connected by a mechanism called "pipes" to modify results from a command (this process is called "filtering"). In this way, small and specific commands can be connected together to achieve the desired output or results.

“People can Read”There is much documentation available to help the user to solve problems related to Unix and Linux, such as HOWTO manuals, online documentation and newsgroups.

Page 9: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Utilities (Commands) For the remainder of this course, you

can assume that utilities and commands mean the same thing.

Linux commands are usually typed in lowercase followed by an argument (or arguments).

Pressing ENTER or RETURN signals that you have completed giving an instruction and that you are ready for the OS to execute the command or respond to your message.

Page 10: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Unix Command Structure command [arg 1] [arg 2] … [arg n]

An argument is a filename, string or text, or some other object that a command acts upon.

An option is also an argument that modifies the effect of a command.

A space, a number of spaces, or a tab can be used to separate commands from arguments, or to separate arguments.

Page 11: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Command Line Editing You can correct a mistyped command

prior to pressing ENTER or RETURN Erase Characters

Backspace or CTRL-Backspace or CTRL-h Delete a Word

CTRL-w Delete an Entire Line

CTRL-u

Page 12: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Command Line Editing Aborting Program Execution

CTRL-c or DELETE

Recalling Previous Commands

Phobos: <ESC><K> (K - up, J - down)

Matrix: Up arrow , Down arrow

Page 13: Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command

Online Command Manual (man)

A comprehensive online manual for common UNIX commands

format: man [options] command Options:

-k provides short (one-line) explanation relating to the commands matching the character string

eg. man -k calendar