[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] >> [CSE201] >> [Lab01] >> index
[Index] [Schedule] [Syllabus] [Glossary] [Labs] [Projects] [Resources] [Grading] [Search ]
Notes: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10]
Thu Jan 10 09:32:44 PST 2013


    CS201 Laboratory 1 -- Introducing the Lab Computers and UNIX


      Welcome to the CS201 Laboratory. The room, the computers, and the operating system are all state-of-the-art for a university computer science department. We try to maintain world class hardware and software for developing software. So we use Linux.


      In this laboratory it will be enough to have logged in, changed your password, found the browser, and used it to find and explore the course web site and syllabus. You should bookmark the course web page. As a final step follow the instructions to download, compile and run a classic first C++ program. Finally, log out. This will earn an A for the lab.

      Warning -- This is the easiest lab we will do.

      Future labs will involve thinking, creativity, testing ideas, fixing errors, and constructing new software. You should find this challenging -- even after 60 years work, computer science has not found an easy way to develop software.

      In this lab, when everything works as plan we can all leave early. However, sometimes it can take the full 200 minutes to do this laboratory.

      Read Me First

      The first rule is to leave our computers running! It takes time to reboot. During your first quarter if you think you need to reboot -- ask the lab teacher or the help desk next door.

      Read Me Next

      At the start the teacher will show you how to get started -- take notes.

      Logging in

      Your should have a blue screen with boxes for your "user-name" and your password, otherwise call over your teacher.

      There should be a "Session Type" menu under these two boxes, select "GNOME" -- a desktop environment that the systems administrator reccomends -- and I use a lot. (The alternative "KDE" environment has a performance problem and a different set of menus)

      Input your user id(this should be the same as your campus Coyote ID number ) in the box provided. Then input your password. This will be announced in the lab. (It is not secure and you should change it as soon as possible).

      Tap the "Enter" key on the keyboard.

      Wait for the operating system to start up.

      Starting a Browser

      Click "Activities" at the top left hand corner of the screen. It will display a set of "Favorites". Click the icon that shows an orange "Firefox" embracing the world.... or search the "Applications". Wait for it to start running....

      Find the lab instructions for this lab

      Type the following location
      into the location box and tap the "Enter" Key to go to the web site for this lab session.

      Find the web page for the class

      Click the "button" [Index] on the second line of the lab page.

      Notice that it lists events that have happened in the CS201 class. I post changes and new information every week.

      Once found you should bookmark it for the future.

      Find the syllabus and Open it

      The link to the syllabus is at the top of the "CS201 page".

      We covered this in class.

      Then go "Back" to the course web page.

      Find the study guide for the next class

      Look for the "button" [02] on the second or third line labeled "Notes:". Select it.... it tells you what to study...

      Grade = B

      If you account is OK and you get this far you have earned a B.

      You can now experiment further with our systems and with the programs you have downloaded. There are many interesting things to discover!

      1. Right click this link [ hello.cpp ] and Save as "hello.cpp". This is a famous C++ program that says "Hello,World".

      2. You will need a terminal window to send commands to your computer. This may be a favorite "Activity" or you may have to search the "Applications".

      3. Try this command: input using the keyboard and end with tapping the "enter" key:
        It prints your working directory's name.
      4. Input into the terminal window the following to see what is in the file.
         		cat hello.cpp
      5. To compile type the command line into the terminal window
         	g++ -o hello hello.cpp
        This compiles the program.
      6. Input the command line
      7. To run the program.
      8. Hold down the "Ctrl" key and tap the letter "D" to close the terminal.

      The first readings in the book explain some of the mumbo-jumbo above.
      pwdPrint Working Directory
      catOutput file to the terminal
      g++Run the Gnu C++ compiler to make an executable program
      ./programRun program in current directory "."

      (Close Table)

      Change your password

      In a terminal window (access from a remote machine) you input
      then supply your old password and tap return. Then enter your new password twice tapping return after each time.

      Get Credit Grade = A

      If you get this far before the end of the lab session you have earned an A. Tell me something you learned to get credit.

      Spare time

      There are a large number of Applications -- and all of them are pretty safe to use. You can also access stuff on the WWW -- including your Email. As you know -- much of the web is safe if you are careful what you access.

      You should spend time exploring...

      Logging Out

      NEVER leave a machine without logging out. Horrible things can be done to your work and reputation if others pretend to be you when you leave without logging out.

      Use a left click on your name (top right hand corner)... and then select Logout item...

      Now you can leave.

      About our Laboratories

      We try to maintain world class hardware and software. So we use Linux. This is the most popular university operating system. It has been adopted by professionals in large and small companies world wide for the following reasons:
      1. Price: It is free.
      2. Cost: It is easy to maintain and update.
      3. Security: It has evolved to resist the viruses, back doors, and Trojan horses found in Microsoft products.
      4. Privacy: It has a simple privacy scheme that hides your files from other users (but not the system administrators).
      5. Open: It was created by an international group of expert developers. We can join this group to fix problems.
      6. Powerful: It is designed by programmers, for programmers, to be used by programmers.
      7. Customizable: Before and after you log in there are dozens of options
      8. Applications: There are hundreds of programs you can use -- most of them designed by and for professional programmers.
      9. Internet-Based: Linux is based on the Internet. A window on your machine can be connected to any computer in the world.

    . . . . . . . . . ( end of section CS201 Laboratory 1 -- UNIX and X Windows) <<Contents | End>>


    [ ../lab02/ ]


  1. Gnu::="Gnu's Not Unix", a long running open source project that supplies a very popular C++ compiler.
  2. TBA::="To Be Announced", something I have to do.
  3. TBD::="To Be Done", something you have to do.

( End of document ) <<Contents | Top