General Approach: describe the ability, don't give much background explanation, show common problems and how to deal with them. Introduction - To teach you commands you need to know to get through typical session; the 10% you use 80% of the time. - List of what they'll know how to do when they are done. - Won't teach you many fundamental Unix concepts that would make life easier because not necessary for survival - Recognize the pitfalls everyone always falls into - Part of the Essential series that includes emacs and mh First You Need... - Get all these things from your acc't administrator. For faculty, Athena; for projects, someone on project; for students in classes, a TA or instructor - login id what it is - password (may have specified both yourself if self-reg pgm in, but not "alive" until given by instructor) - home machine - cluster room number - combo to cluster door Login - Hardwired vs dial-up, see elsewhere for dial-up - List of kinds of terminals, don't use vt125 or vs100, yet - sample login login server???? (different things to say) describe motd mail message fortune cookie system prompt - Problems with login: login incorrect exactly right, no blanks? try again no luck, see consultant If login server, more possible problems Logout - You MUST - say logout (^D doesn't work) - 1 hour auto-logout - Problem: There are stopped jobs - Problem: Not login shell - If login server, ~. - forward ref to killing job You Have to Know... - Control keys DEL key, NOT backup, different on Pros & 240s called "erase" char in Unix Cancel whole line, Ctrl-U How to do CTRL keys (also see as control-c and ^c) Ctrl-S, Ctrl-Q (won't work if login server) Bail Out: CTRL-C If no work: try several, q, exit, Return CTRL-D Return, Ctrl-Y, Ctrl-Z, kill forward ref Can't just walk away. - Case sensitivity generally lowercase learn to mimic exactly what you see - Common problems /ALL UPPERCASE Everything is dead: NO SCROLL???, locked keyboard, confused terminal, system down..What to do. Shows me a screen of stuff, but won't go on...(program is using more) Entering Commands - The shell command interpreter, your agent to the system two shells, Bourne and C, we use C (footnote, actually 3 shells, athena using newshell like Tops-20, see man newshell) can do lots of things, most we won't show you, see... - Command format varies, but usually command options file command all lowercase, no abreviations, ~250 in all, really just name of program options format variations, single letter, hyphen, if take value, if many single letters, string together files the direct objects Separate pieces with blanks. End with return. If command is worng, command not found. If options wrong, prints proper usage, If file is wrong, filename not found, filename can't open, filename no such file or directory. Change Password Files - two kinds, directories and individual files. Start off with individual files - definition, a thing with a name and stuff in it - names, <256, any char, but a-z, A-Z, 0-9, ., and _ best. Others can lead to BIG trouble. again, case matters. conventions: extentions to remind of type. some programs require (like compilers). Some files start with just ., don't normally show up. Background files. Described below.\ Wildcards (*) go here? - To list files ls, ls -a, ls -l and what it means, ls -la different kinds, directories, biniaries, can see type with -F many other options, note -R and d, in particular - Examine contents cat more "piped through more" as with man and mail. very powerful program, can't go backward. SPACEBAR, q, RETURN - Delete files rm - Copy files cp - Rename (move) files mv - Create a file quick and dirty cat >file emacs, see Ess emacs Output of any command with > brief on redirection anytime you wish what you're seeing on screen in file... - printed output copy of file on paper cluster has 2 printers, laser and line (may not have line) sign in cluster tells you where they are laser is default (brief describe of both) to print lpr [-P printer] file -P laser -P line -P alternate and what it means more options, see man lpr don't use print or pr to see what's doing print servers, queues lpq [-P printer] to cancel lprm [-P printer] problems: no response to lpq printer out of paper Directories - hierarchical tree - learn your way around, make mental map, otherwise you'll always feel and be a little out of it - starts at /, /bin /lib /usr /mit - everybody on the tree somewhere - home directory, default directory, ~/, set at login - absolute path names, relative path names - to create, mkdir - to see where you are, pwd - to change current default, cd - to delete rmdir (all files under must be gone, -r, BE CAREFUL) - to copy whole subtrees (-r option on cp) - Problem: ls /Mail permission denied you NEVER put a / at the beginning unless you really mean root - man hier Protection, Who Can Read Your Files? - only you (foot about people created before date?) - controlled by something called umask - world divided in three: you group (primary, mit, others, /etc/groups other (often called "world" everyone) - 3 kinds of access read, write, execute, different for plain files and directories, copy table out of McGilton Copy table explaining the numbers, e.g. def is 700 - umask set in .login - to make a particular file public - to create a directory whre your group can share - to create a public directory - to open your files to all - philosophy (an aside about Unix traditions, privacy committee) The Files Already There - Brief descriptions of major, will start showing you the larger world of things going on without having to understand them quite - .cshrc - .login - Mail What's Going on Around You? - users, who, finger, w, ps Dealing with Other Machines - there is a network, with other hosts - "r" series of commands - ruptime, rsh (single command), rcp (always from, must be world read), rlogin if you have account on other machine only, rwho, finger@host Consulting Help - ask your neighbor - students and TAs - student consultants - olc? - telephone number? - notes? Help - online man apropos notes? /usr/doc - printed What Next? - learn the editor - learning your specific application - fiddling around with games, sending mail, reading notes