Lab 1: intro to the labs


Lab exercise:

  1. Get your account information from the course instructor, read the rules of conduct regarding computing accounts, and follow the instructions on this web page to login to your CS account, open a web browser, open a command window, change your password, and log out.

  2. Log back in with your new password and open a web browser and command window.

  3. Read the "Introduction to linux" section and the "Useful commands" section below.

  4. In your home directory, use the mkdir command to create a subdirectory named games, then use the ls command to check if it worked. (games should appear in the list of files/directories if you succeeded.)

  5. Once you have created your games directory, use the cd command to move into that directory, then use the pwd command to check if it worked. (games should be at the end of the path name if you succeeded.)

  6. Still in your games directory, use the mkdir command to create a subdirectory named lab1, and use the ls command to check if it worked.

  7. Type in the command gedit to open the text editor.

    Now in the empty editor window type the following:

           #! /usr/bin/python
    
           print "hi!"
           
    Click on the "Save" command in the editor toolbar, using "hello.py" as the file name, and click on the "Save" button.

    Quit the editor (using File->Quit or click on the x in the upper right corner of the editor window.)

    Back in your terminal window, type the following command
    chmod u+x hello.py

    Now type in the command
    ./hello.py

    If successful, you should see
    hi!
    appear in the terminal window.

    Congrats! You have just successfully written and executed your first python program for the course!


Introduction to the CS laboratory


Introduction to linux and bash