Week 1-2 Notes for DAT2330 - Ian Allen Supplement to Text, outlining the material done in class and lab. Remember - knowing how to find out the answer is more important than memorizing the answer. Learn to fish! RTFM![*] ([*] Read The Fine Manual) Make sure you can log in to the ACADAIX Unix machine. If not, go to the ITS Help Desk to have your account reset. Buy the course texts before they are all gone, or before they send back the extra copies! Learn how to use the news software. Post a message in the algonquinc.test news group and then cancel it. Read the course announcements. You will find a link to the announcements group outlined in blue near the top of the home page for this course: http://www.algonquincollege.com/~alleni/dat2330/01f/ Look under the "Notes" button on the course web page for these study notes for the Linux textbook: chapter1.txt (Introduction) chapter2.txt (Getting Started) chapter3.txt (Utilities) Download Floppix and make two (TWO!) separate copies on diskettes. (Floppy disks wear out - you will need two copies.) Complete these Floppix Labs on http://floppix.ccai.com/ Floppix Lab: 1 (Geting Started) Floppix Lab: 2 (Running Commands) Floppix Lab: 13 (Who's on?) Floppix Lab: 22 (e-mail) Floppix Lab: 23 (telnet) Floppix Lab: 24 (ftp) Floppix Lab: 25 (links [www]) Floppix Lab: 27 (Super User) You can't boot Floppix from an MSDOS window under Windows9x. You must shut down Windows and restart in "pure" MSDOS mode. Most Algonquin labs this term will not let you boot anything other than Windows. We apologize for this - ITS made the change without notifying faculty. You can safely run Floppix at home. ---------------- Floppix Failure? ---------------- Watch the Floppix boot process for errors! If, during the Floppix boot process, you see anything that looks like "not enough memory" or "failed" or "cannot fork" or "error", your Floppix did not boot correctly. Try booting from a different set of Floppix diskettes. If the problem persists, try different hardware (change to another computer). To reboot the machine back to Windows from under Floppix, use the standard CTRL-ALT-DEL key sequence (or just push the RESET button, since Floppix doesn't write anything to disk!). =========================== TELNET to Unix from Windows =========================== If you use TELNET under Windows, you must configure your Windows TELNET client to connect correctly to a Unix system. See the course web page named "Using Telnet". What three things must you do when you use TELNET to Unix? - drag TELNET window to full size (it will not expand further) - terminal type: vt100 - lines: 24 - from the College, you can telnet to the name "acadaix" - from the Internet, telnet to acadaix.algonquincollege.com ============================== EOF and Interrupting Processes ============================== To interrupt a process that is running on your terminal, use the Interrupt Character, often CTRL-C (^C). (You can program a different character; often DEL is used.) Your EOF character, signalling end of input, is usually CTRL-D (^D). (You can program a different character; but, it is almost never done.) ==================== Basic Command Syntax ==================== Many Unix commands need both a VERB and and OBJECT. The following incorrect attempts at Unix commands are wrong: $ /etc/passwd (missing VERB; what are you trying to DO?) $ chmod 000 (missing OBJECT; change the mode of WHAT?) Remember to tell Unix both what you want to do and to what object you wish to do it. ===================================== Commands for a multi-user Unix system ===================================== These commands are useful for looking at or interacting with other people on the same machine: - who - w - finger - write - talk Both talk and finger take user@machine names, allowing interaction with people on other machines (if they permit it, and if the network permits it). To prevent users from writing on your screen, use: mesg n To exit from write, type your EOF character at the beginning of a line. To exit from talk, type your Interrupt Character. Remember: all these programs have manual pages! "man write" =========================== Notes on FTP command syntax =========================== The syntax of FTP commands is not the same as the syntax of Unix commands. This FTP command doesn't do what you think it does: ftp> ls -l filename output to local-file: filename? If you answer "yes" to this prompt, you will copy the output of "ls -l" into the file "filename" in your current directory, erasing what was there before. This is probably not what you want. The FTP command names resemble Unix command names; but, they are *not* Unix commands. The syntax is different. Be careful. (Also, don't type FTP commands into Unix and expect that they will work, e.g. "put filename".) ========================== Unscrambling your Terminal ========================== How to unscramble a terminal emulator that is in graphics characters set mode, where see many special and line-drawing characters instead of your typed text. (This might happen after you accidentally use "cat" to send a non-text file to your terminal screen, e.g. "cat /bin/ls".) To Fix (you may not be able to read what you are typing!): - On a Linux system (including Floppix) type: setterm -reset - On ACADAIX type: reset - On either type: echo ^V^O (that's CTRL-V CTRL-O) The above should switch your terminal emulator back to its normal character set. Practice this now, in case it happens to you on a test! ======================= Getting Out of Programs ======================= Getting out of Unix programs; or, getting help: Try various things such as: help ? quit Q exit x ^D (CTRL-D) ^C (CTRL-C) :q! (used in VI) logout bye ESC (the ESC key) . ^\ (CTRL-backslash) One of the above usually works. Sometimes you can use ^Z (CTRL-Z) to "stop" the process temporarily, and then type "kill %%" to kill it. (Remember to kill it, or it will sit there forever.)