Basic Linux and DrScheme quickref
Basic Linux: Text in brackets < > is a parameter and is not meant to be typed literally.
Make sure you're using a Linux lab machine and not a Windows machine.
Logging out: use the start menu in the bottom left corner.
Directory browsing: Click the folder icon in the top left.
Shell usage: Right click on the desktop gives you a menu. Choose terminal.
Running a program from the terminal: type <program name>&
eg. drscheme&
& causes the preceding command to fork off the terminal; if you don't type it then the terminal will be monpolized by the program.
Changing your password:
In the terminal type passwd and follow the directions.
Web browsing: run mozilla&. The course site is www.cs.caltech.edu/~cs1
Submitting labs and homework: cs1man submit <file name>
To copy and paste: Selecting text copies it. Clicking the middle button pastes.
File and directory navigation and manipulation in the shell language:
pwd outputs your current location
cd <dir> changes your location to the directory specified by <dir>.
eg. cd / will move you to the root directory,
and cd ~ will move you to your home directory.
A directory or file can be specified either absolutely or relatively:
absolutely: specify the location from the root of the directory tree
eg. /usr/bin/ is the directoy bin in usr located at the top level of the tree
relatively: specify the location from your current location:
../ specifies one level up
<name> specifies a directory or file at this level.
eg. from /usr/bin use ../../lib to specify /lib
and from / use lib to specify /lib.
mv <file or dir> <dir2> moves a file or a directory into directory dir2.
mv <file or dir> <dir2>/<name> if <dir2>/<name> doesn't already exist then <file or dir> gets renamed to <name> and moved to <dir2>.
eg. to simply rename a file type mv <file> <new name>.
cp <file> <dir2> copies a file to dir2.
rm <file> removes a file.
mkdir <dir> makes a directory.
rmdir <dir> removes a directory.
rm -r <dir> recursively removes the directory and all subdirectory files and directories.
man <program> outputs the manual entry for the program.
eg. man cp will tell you how to copy a directory.
DrScheme:
Run it from the terminal by typing drscheme&.
Make sure to choose PLT/Pretty Big from the Language -> Choose Language (Meta+L) menu option, or when starting DrScheme for the first time.
The bottom window is for interpreting expressions that don't need to be saved or edited.
Type expressions in the top window then click [run] to evaluate them. This window is mainly for definitions that will be saved to file. Any definitions evaluated in the top will be visible from the bottom.
Click [stop] if you suspect that your program may be in an infinite recursion.
The key commands are of the form Meta+<letter>. alt on your keyboard means Meta.
For English definitions of scheme functions look in
Help->Help Desk->Software->Languages->R5RS