Shell tutorial

Preview:

DESCRIPTION

A very basic introduction to the command line for CMDC's Tech 101 series

Citation preview

Basic Introduction to the Command Line

Tech 101 Workshop CDMD Fall 2013

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.

What is the Command Line?

A place to enter direct commands.

Shell & Terminal Emulators

In OSX it is accessed through Terminal

The Command LineIn The Beginning Was

Console

Command Line

Prompt

Let’s Do It!Open a terminal on your

machines

Navigating the TerminalLook Ma! No mouse.

!

Use left and right arrows to move the cursor

Use Up and Down arrows to retrieve previous commands

Basic Commandsls = list. (dir in DOS)

pwd = print working directory

cd = change directory

man = manual

clear = clear screen

control-c = exits command if frozen

What You’ll See: ls

ls shows files and folders

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

Folders do not.

What You’ll See: cd

cd changes the directory

cd .. goes up one level

cd $directoryname goes to that directory

What You’ll See: pwd

pwd: shows you where you are

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

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)

Exercise: Make a FileThe Touch Command

Try This:

use touch to create a file

edit the file with nano

verify the changes using edit

delete the file using rm

Let’s Take a Break

http://bit.ly/tech101basic

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

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

Let’s Take a Break

http://bit.ly/tech101basic

Part 3: Hardware Hacking

Use the command line to own your machines.

Recommended