The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs...

35
Introduction The Unix Shell Introduction Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information.

Transcript of The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs...

Page 1: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Introduction

The Unix Shell

Introduction

Copyright © Software Carpentry 2010

This work is licensed under the Creative Commons Attribution License

See http://software-carpentry.org/license.html for more information.

Page 2: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

The Unix Shell Introduction

Page 3: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Run

Programs

The Unix Shell Introduction

Page 4: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Run

Programs

Store

Data

The Unix Shell Introduction

Page 5: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Run

Programs

Store

Data

The Unix Shell Introduction

Communicate

with each other

Page 6: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Run

Programs

Store

Data

The Unix Shell Introduction

Communicate

with each other

Interact

with us

Page 7: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Interact

with us

The Unix Shell Introduction

Page 8: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Interact

with us

Telepathy

The Unix Shell Introduction

Page 9: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Interact

with us

Telepathy

The Unix Shell Introduction

Speech

Page 10: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Interact

with us

Telepathy

The Unix Shell Introduction

Speech

WIMP

(windows, icons, mice, pointers)

Page 11: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Interact

with us

TelepathyRewiring

The Unix Shell Introduction

Speech

WIMP

Page 12: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Interact

with us

TelepathyRewiring

The Unix Shell Introduction

SpeechTypewriter

WIMP

Page 13: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Typewriter

The Unix Shell Introduction

Page 14: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Typewriter

Line printer + keyboard

The Unix Shell Introduction

Page 15: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Typewriter

Line printer + keyboard

Text onlyText only

The Unix Shell Introduction

Page 16: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Typewriter

Line printer + keyboard

Text onlyText only

The Unix Shell Introduction

Page 17: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

Typewriter

Line printer + keyboard

Text onlyText only

The Unix Shell Introduction

CLUI: command-line user interface

Page 18: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

The Unix Shell Introduction

Page 19: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

The Unix Shell Introduction

Page 20: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

computer executes command

and prints outputand prints output

The Unix Shell Introduction

Page 21: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

computer executes command

and prints outputand prints output

user types another command

The Unix Shell Introduction

Page 22: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

computer executes command

and prints outputand prints output

user types another command

computer executes command

and prints output

The Unix Shell Introduction

Page 23: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

computer executes command

and prints outputand prints output

user types another command

computer executes command

and prints output

user logs off

The Unix Shell Introduction

Page 24: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

computer executes command

and prints outputand prints output

user types another command

computer executes command

and prints output

user logs off

The Unix Shell Introduction

Page 25: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

computer executes command

and prints outputand prints output

user types another command

computer executes command

and prints output

user logs off

shell

The Unix Shell Introduction

Page 26: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

user logs in

user types command

computer executes command

and prints outputand prints output

user types another command

computer executes command

and prints output

user logs off

shell

The Unix Shell Introduction

Page 27: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

The Unix Shell Introduction

Page 28: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

Most popular is bash (the Bourne again shell)

The Unix Shell Introduction

Page 29: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

Most popular is bash (the Bourne again shell)

The Unix Shell Introduction

Page 30: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

Most popular is bash (the Bourne again shell)

Using it feels a lot more like programmingUsing it feels a lot more like programming

than using windows, a mouse, etc.

The Unix Shell Introduction

Page 31: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

Most popular is bash (the Bourne again shell)

Using it feels a lot more like programmingUsing it feels a lot more like programming

than using windows, a mouse, etc.

Commands are terse and often cryptic

The Unix Shell Introduction

Page 32: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

Most popular is bash (the Bourne again shell)

Using it feels a lot more like programmingUsing it feels a lot more like programming

than using windows, a mouse, etc.

Commands are terse and often cryptic

Use it because:

The Unix Shell Introduction

Page 33: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

Most popular is bash (the Bourne again shell)

Using it feels a lot more like programmingUsing it feels a lot more like programming

than using windows, a mouse, etc.

Commands are terse and often cryptic

Use it because:

– many tools only have command-line interfaces

The Unix Shell Introduction

– many tools only have command-line interfaces

Page 34: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

A shell is just a program that runs other programs

Most popular is bash (the Bourne again shell)

Using it feels a lot more like programmingUsing it feels a lot more like programming

than using windows, a mouse, etc.

Commands are terse and often cryptic

Use it because:

– many tools only have command-line interfaces

The Unix Shell Introduction

– many tools only have command-line interfaces

– allows you to combine tools in powerful new ways

Page 35: The Unix Shell · The Unix Shell Introduction. A shell is just a program that runs other programs Most popular is bash (the Bourne again shell) Using it feels a lot more like programming

August 2010

created by

Greg Wilson

August 2010

Copyright © Software Carpentry 2010

This work is licensed under the Creative Commons Attribution License

See http://software-carpentry.org/license.html for more information.