Linux Tutorials

Document Sample
Linux Tutorials
Description

This is an example of linux free tutorials. This document is useful for conducting linux free tutorials.

CS 1 Tutorial

The basics of Linux, 

DrScheme, and cs1man

Linux: Introduction

• Probably heard of Windows and Mac operating 

systems

• Linux is another popular one (it’s free too!)

• All the CS cluster machines run Linux

– CS cluster = computer lab in room 154

• Comes in many shapes and sizes (i.e. 

distributions)

• E.g. Ubuntu, Gentoo, Debian, Red Hat, …

• CS Cluster uses “Mandriva”

Linux: Introduction

• Provides a terminal, a.k.a shell

• Text­based interface to the operating system

• Also provides a GUI 

(Graphical User 

Interfacde)

What you’ll see

or possibly…

Terminal: navigating directories

• pwd: print working directory

• cd : change directory

• cd .. : go to the parent directory

• cd ~ : go to the home directory

• cd / : go to root directory

– The root directory on Linux is similar to the C:\ 

directory on Windows. 

– Instead of C:\Documents\brent, it’s 

/home/brent

Terminal: listing directories

• ls: list contents of current directory

• ls : list contents of another directory

• ls ­a: list directory contents, including 

hidden files

• ls –l: list directory contents with additional 

information

– size, date, owner, permissions, etc.

• Can combine arguments, e.g. “ls ­al”

Terminal: Examining files

• Refer to files by name, with some shortcuts

• * character is wildcard

• Tab­completion

• cat : print file contents to screen

– Best for short files (since it dumps the whole file)

• less : examine file

– Good for longer files

– Press up and down to scroll (pgUp and pgDown also)

– Press ‘q’ to quit

– Press ‘/’ to search (‘n’ for next occurrence)

• man : display a help file

– Manual pages show up in less

Terminal: managing files

• cp  : copy a file

• mv  : moves a file

• Also used for renaming

• mv  : move a file to another 

directory

• Can also use [mv or cp]  

• Moves or copies file into given folder

• rm : remove (delete) a file

• Be careful!

• BIG difference between “rm *.txt” and “rm * .txt”

Linux: Dealing with directories

• mkdir : make a directory

• rmdir : remove an empty directory

• rm –r : remove a directory and its 

contents

• mv: behaves the same way

• cp: one important difference

• Use “cp ­r” to copy directory contents

Linux: More Useful Commands

• passwd: change password

• man : already discussed

• emacs : edit a file

– To save: CTRL+x, CTRL+s

– To close: CTRL+x, CTRL+c

• Other text editors, too

– vi / vim: emacs’s rival

– gedit, nano: easier to use

• exit: close the terminal (also ctrl­d)

Doing work remotely

• You are encouraged to work in the CS lab, but 

there are tools available for working remotely

• SSH: Log in to a machine remotely, as if you 

were sitting in front of that computer

• Text­only terminal

• SCP: lets you copy files between your computer 

and a remote machine (uploads and downloads)

• Some free Windows tools for this

• PuTTY – an SSH client

• WinSCP – an SCP client

• Linux and Mac:

• Can already use ssh and scp via the terminal

Doing work remotely: PuTTY

• PuTTY: a free SSH 

client for Windows

– Host name: 

cs.caltech.edu

– User your CS 

cluster username 

and password





– To download: just google “putty” or “putty download”

Doing work remotely: WinSCP

• WinSCP: a free 

SCP client for 

Windows

– Host name: 

cs.caltech.edu

– Use your CS cluster 

username and 

password

– To download: again, just Google it

cs1man

• Terminal interface for submitting labs

• To turn in a lab:

– cs1man submit lab1 myanswers.scm

• To turn in multiple files:

– cs1man submit lab1 file1.scm file2.scm notes.txt

– cs1man submit lab4 *.scm readme.txt

• Made changes or fixed a bug?

– Resubmit with the same command. Only the most recent 

submission is graded.

• Corollary: don’t resubmit if the deadline has passed

– Same thing for reworks

• Grading

– cs1man will automatically email you once your TA 

grades your submission.

cs1man: on the web

• http://cs1man.cs.caltech.edu

– View your status, grades, and TA’s 

comments.

– Your cs1man login and your CS cluster login 

are DIFFERENT ACCOUNTS

• They have the same usernames

• Passwords are not necessarily the same

DrScheme

• To load: type 

drscheme in the 

terminal

– When starting 

DrScheme for the first 

time, be sure to choose 

“PLT/Pretty Big” as the 

language choice.

• The top window is for 

your program code.

• The bottom window is 

for program results and 

simple code.

Email forwarding

• Your CS cluster account comes with an 

email address of the form: 

username@cs.caltech.edu

• To set up mail forwarding:

– Edit a file called “.forward” (the dot means the 

file is hidden) and put your regular email 

address as the sole line in the file.

– Nowadays, it can be changed in webmail

• http://webmail.cs.caltech.edu/

Questions?


Share This Document


Other docs by Ben longjas
Air Conditioning Repair
Views: 245  |  Downloads: 8
Arizona Criminal Records
Views: 674  |  Downloads: 1
Best Digital Camera
Views: 250  |  Downloads: 2
McDonalds Menu
Views: 29052  |  Downloads: 44
How to Get on Myspace at School
Views: 906  |  Downloads: 4
Basic Contract Writing
Views: 561  |  Downloads: 22
History of Linux
Views: 299  |  Downloads: 32
Mile High Club
Views: 356  |  Downloads: 0
Cheat Sheets for Xbox
Views: 284  |  Downloads: 5
by registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!