Dana Vrajitoru
C151 Multi-User Operating Systems

Lab 1

Due Date: Tuesday, January 17, 2012.

Ex. 1.
Make sure you get an account for our Linux filesystem from me. If you already have one from a previous class, you don't need a new one.

Tools

  • On a Linux machine you will need a terminal. Where it is located depends on the system. You can find it under the Applications menu - Accessories under Ubuntu. On Fedora you need to clock on Activities, then Applications, then scroll down to find the Terminal.
  • On a Windows machine, you need to install a program like Putty. On the campus machines, it can be found under the All Programs - Putty. At home, follow the link to the Putty download page (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). Right-click on the link for putty.exe and choose Save Target As (Explorer) or Save Link As (Firefox). If you save the executable putty.exe on a flash drive, you can run it on any computer without having to install it.
  • On the MacOs you can use the Terminal application that is part of the standard system installation. On the campus machines it should be in the dashboard already (the icon looks like a monitor). At home you should find it either directly under Applications or under Applications - Utilities.

    Starting up. Follow the instructions for the type of system that you are working on.

  • On a Linux machine, log on and launch a terminal.

  • On a Mac machine, launch a terminal and then run the command:
    ssh cs##.cs.iusb.edu -l username -XY
    where ## means a 2-digit number between 01 and 30. Substitute username by the account name you were given. This opens a remote secure session on the machine that you specified. You will be prompted for a password. You may have to try several numbers to find one that works because some of these computers may be booted in Windows or MacOS, in which case they will not respond to this command.

    Example (connectMac.gif).
  • On a Windows machine, launch Putty and type the following as the Host Name:
    cs##.cs.iusb.edu
    where ## means a 2-digit number between 01 and 30. Make sure that the connection type is SSH. Example (putty1.png). You may be asked a security alert system the first time you log on to a particular host, like in this Example (putty2.png). Just answer yes. A terminal window will open where you will be prompted on a second screen to enter your username and password, like in this Example (putty3.png). These should be the ones you get from me. You may have to try several computer numbers until one works (see Mac section above).

    On your home computer, you may want to bookmark the session information for easy access. You can enter the username and remote host name, then give is a name easy to remember in the Saved Sessions box, and click Save. After that you'll be able to launch the session again by double-clicking on the bookmark name in the list. It is not recommended to save the password.

    Ex. 2. Introduction to some shell commands.

    A command is a small executable that perform some operation involving the file system, processes, operating system. For example, the command "ls" stands for "list" and will display a list of the files contained in the working directory.

    Commands can have arguments specifying what they apply to. For example, for the command ls, we can provide a different directory that the active one to display the contents of (/var/log/ in the following case):
    ls /var/log

    Commands can also have options that modify the way they are executed. For example, an option for the command ls would be "-l" that makes it display the list of files with a long list of arguments:
    ls /var/log -l

    If you are not sure about what a command does and what options can be used with it, the easiest way to find out is with the command "man", which is short for manual (q to exit):
    man ls

    Commands we'll use below:

    Practical:

    Ex. 3 Saving the content of your terminal.

    Ex. 4. Using alpine to send an email.

    Submission. Submit the file lab1term.txt containing the text in the terminal for exercise 2 to Oncourse. Under Assignments 2 there is a section called Lab 1 where you can submit it. The due date for this lab is next Monday at 11:59pm.