Top Banner
Basic Introduction to the Command Line Tech 101 Workshop CDMD Fall 2013
20

Shell tutorial

Dec 02, 2014

Download

Technology

A very basic introduction to the command line for CMDC's Tech 101 series
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Shell tutorial

Basic Introduction to the Command Line

Tech 101 Workshop CDMD Fall 2013

Page 2: Shell tutorial

Why Should I Care?Give your computer(*) direct commands

Be in control

Children use pictures to control their computers, grown ups learn to read and use words. (this is a joke.)

(*) Also remote computers, VMs, & servers.

Page 3: Shell tutorial

What is the Command Line?

A place to enter direct commands.

Shell & Terminal Emulators

In OSX it is accessed through Terminal

Page 4: Shell tutorial

The Command LineIn The Beginning Was

Page 5: Shell tutorial

Console

Command Line

Prompt

Page 6: Shell tutorial

Let’s Do It!Open a terminal on your

machines

Page 7: Shell tutorial

Navigating the TerminalLook Ma! No mouse.

!

Use left and right arrows to move the cursor

Use Up and Down arrows to retrieve previous commands

Page 8: Shell tutorial

Basic Commandsls = list. (dir in DOS)

pwd = print working directory

cd = change directory

man = manual

clear = clear screen

control-c = exits command if frozen

Page 9: Shell tutorial

What You’ll See: ls

ls shows files and folders

files have an extension (.exe, .txt. .html)

Folders do not.

Page 10: Shell tutorial

What You’ll See: cd

cd changes the directory

cd .. goes up one level

cd $directoryname goes to that directory

Page 11: Shell tutorial

What You’ll See: pwd

pwd: shows you where you are

Page 12: Shell tutorial

Exercise:use ls, cd, and pwd to explore your machine.

Page 13: Shell tutorial

More Commandstouch = touch $newfilename (creates file w/o editing)

nano = nano $filename (opens file in nano editor)

edit = edit $filename (edits file in default editor)

rm = rm $filename (deletes file. CAREFUL)

Page 14: Shell tutorial

Exercise: Make a FileThe Touch Command

Page 15: Shell tutorial

Try This:

use touch to create a file

edit the file with nano

verify the changes using edit

delete the file using rm

Page 16: Shell tutorial

Let’s Take a Break

http://bit.ly/tech101basic

Page 17: Shell tutorial

Part Two: TutorialGo through a self paced tutorial to try new stuff.

Page 18: Shell tutorial

Pick a TutorialTutorial on Manipulating your Mac’s Appearance

http://bit.ly/tech101osx

http://www.wikihow.com/Customize-Your-Mac-Using-the-Terminal

More Advanced Linux Tutorial

http://bit.ly/tech101adv

http://linuxcommand.org/learning_the_shell.php

Very Basic Tutorial Repeating First Lessons

http://bit.ly/tech101basic

http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line

Page 19: Shell tutorial

Let’s Take a Break

http://bit.ly/tech101basic

Page 20: Shell tutorial

Part 3: Hardware Hacking

Use the command line to own your machines.