Week 1 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 *both* of the the course texts before they are all gone, and before the bookstore sends the extra copies back to the publisher! Learn how to use the news software. See the link on the course home page. Post a message in the news group algonquinc.test and then cancel it. Read the course announcements frequently, especially before tests. You will find a link to the announcements new group outlined in blue near the top of the home page for this course: http://www.algonquincollege.com/~alleni/dat2330/02w/ Look under the "Notes" button on the course web page for these study notes for the Linux textbook: chapter1.txt (Introduction) Download Floppix and make two (TWO!) separate copies on diskettes. (Floppy disks wear out - you will need two copies of each diskette.) Complete these Floppix Labs from http://floppix.ccai.com/ Floppix Lab: 1 (Geting Started) Floppix Lab: 2 (Running Commands) You can't boot Floppix from an MSDOS window running under Windows9x. You must shut down Windows and restart in "pure" MSDOS mode. Most Algonquin labs will not let you boot anything other than Windows. We apologize for this - is is a new department policy. You can safely run Floppix at home; however, you must choose "standalone" instead of "dhcp" for your networking. =============== 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 "CRC error" or "kernel panic" 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). If your DHCP networking (option 3) did not give you an IP address, you will find that network commands such as "telnet acadaix" will say "no such host name". Become the super-user (see the Floppix lab #27 on "superuser") and retry the networking: $ su Password: # /etc/init.d/network 1.standalone - choose this option if you are unsure 2.fixed IP (experts only) 3.dhcp (server-assigned IP address) 4.dialup connection (limited support - note: a winmodem is NOT a modem) Choose DHCP (#3) again. If it says "Network configuration complete", you now have an IP address and things should work correctly. If it still gives you a "standalone" configuration, the network is not connected and you cannot use network commands such as "telnet" or "ftp". ==================== Rebooting to Windows ==================== To reboot the machine while it is running Floppix (e.g. to reboot into Windows again), you have three choices: 1) become Super User (root) and type: shutdown -r now 2) use the standard CTRL-ALT-DEL key sequence 3) push the RESET button (Floppix ONLY!) Never push the RESET button on a real Linux or Unix system - you will damage the file system. Floppix is RAM-based; it doesn't use a disk. All files created or modified while running Floppix will be lost upon reboot. (Floppix runs entirely in RAM - nothing is changed on disk.) =========================== TELNET to Unix from Windows =========================== I don't recommend using the Windows TELNET clients - they display the screen poorly and students often forget to set up their windows correctly, which may lead to people corrupting files that they edit incorrectly. 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 from Windows? 1) drag TELNET window to full size (it will not expand further) 2) terminal type: vt100 3) lines: 24 From the College, you can telnet to the host name: acadaix From the Internet, telnet to the name: 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.) Interrupting a process usually terminates the process. Whatever the process was doing is left incomplete and unfinished. (Files will be incomplete.) Sending the EOF character tells the process that you are finished typing at your terminal; but, it does not interrupt or terminate the process. The process will finish whatever it is doing. ==================== Basic Command Syntax ==================== Many Unix commands need both a VERB (what to do) and an OBJECT (what to do it on). The following incorrect attempts at Unix commands are wrong: $ /etc/passwd (missing VERB; what are you trying to DO?) $ cat (missing OBJECT; catenate WHAT file?) 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 (e.g. on ACADAIX): - 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). Note: The ITS department may be blocking finger and talk from working over the Internet. 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 GNU and Linux ====================== GNU - Gnu's Not Unix - GNU is a Free Software Foundation (FSF) project - rewrote Unix in the public domain (the way it started out) - chief architect: Richard Stallman (original author of EMACS) Linux "distribution" == Linux Kernel + GNU Utilities - The GNU kernel hasn't progressed far (named HURD) - So, we use the Linux kernel with all the Unix-compatible GNU utility software