Computer Systems

Computer systems must carry out many tasks, such as receiving input from a keyboard or from one or more remote terminals or networked workstations, sending output back to them, running programs for multiple users or multiple programs for one user, printing documents, storing and retrieving information on a mass storage device. All of these activities need to be coordinated to make effective use of the conputer's resources, such as memory and CPU time. The software that handles this coordination is called an Operating System. Without an operating system, a computer is nearly useless. The early ENIAC, for example, required that programs be set up by rewiring the interconnections between its components.

Software

Software, computer programs, can be divided into two very broad categories: System Software, the software that makes it possible to use the system; and Application Software, the programs that carry out specific tasks for users. Application programs may be different from system to system and user to user. The distinction between applications and system program is not rigid. A computer without an operating system is essentially an expensive paperweight.

Operating Systems

The operating system consists of

Some Client/Server TCP/IP Protocols

You have been using HTTP, the HyperText Transfer Protocol.

FTP, the file transfer protocol, allows you to transfer files between the client and server computers, and to request listings of files and directories and issue orher file-related commands. Many client programs have added additional features.

Telnet or remote logon allows you to connect to a remote system and issue commands as if you were connected directly.

Unlike HTTP, both FTP and Telnet require you to log on to the server with an approved username and password. The client then maintains a continuous connection to the server until you log off.

The original FTP and Telnet are insecure - they transmit your information in plain text which means it can be read by anyone who might intercept it.

There are also secure versions: Secure File Transfer Protocol (SFTP) and a secure remote logon.

Activity: Using a Command Line Interface

You have been given a user account on wyrd.hood.edu for this course. If you already had an account, it has been continued for this term. Wyrd is a PC running the Linux operating system and the Apache web server.

The Command Interpreter or Shell for an operating system lets the user command the system to perform various tasks such as log on and off the system, manage files and run utilities and application programs.

There is a summary of basic UNIX commands at http://wyrd.hood.edu/tutor/unix/unix.htm. We will talk about more of them later.

You can connect to wyrd by using

Secure clients are installed in the lab. If you are connecting from off-campus, you must use a secure connection.

Warning - UNIX COMMANDS ARE CASE SENSITIVE. This means that, for example, the command "ls" cannot be typed as
"Ls" or "lS" or "LS" , and the file name "UNIX.html" is different from unix.html and Unix.html.

Activity: Connecting to wyrd.hood.edu and logging in.

To start a remote session from the lab machines, launch the Secure Shell Terminal Client application from the StartMenu.

After a brief delay, you should be prompted for your password. Warning: remember that passwords are case sensitive.

Once your password is accepted, you will see a welcome message and a command prompt. The prompt shows your identification followed by a $.

    
      Logging on indicates acceptance of the acceptable use
      policies posted at http://wyrd.hood.edu/.  If you do not accept these
      policies, log off immediately.
      
      [echang@wyrd echang]$
     

Logging out

To log out when you are finished a session, enter the command exit or logout at the $.

Be sure to log out of both your Linux session on wyrd and your Pergola session on the lab PC before you leave the lab. Otherwise the next person who sits at your station has full access to your files.

Files and Directories

  1. Files are stored in directories organized into a directory tree

Activity: Some File Commands

  1. List your files
  2. Find out your working directory.
  3. Navigating directories: Changing to a new working directory.
    1. The command for changing to a new working directory is cd
    2. Change to the WWW directory by entering cd WWW. This is where you will put your web page files.
    3. Check your current working directory with pwd. What is it now?
    4. List the files in the current directory files now. If you have a new account for this class, all you will see are the . and .. directories.
    5. Change back to your home directory by entering cd ..
  4. Listing a different directory
    To get a listing of a directory other than your current working directory, you must specify a path to it. This can be either an absolute path (one that begins at the root directory) or a relative path (one that begins at your current working directory.)
  5. Making a new directory
    You can create new subdirectories within existing ones using the mkdir command. The new directory will be created in your current working directory unless you specify a different path.

File Permissions

Unix is a multi-user operating system. You share wyrd with the other students in your class, and students from many other classes. The system uses file permissions to control who can and cannot access your files in different ways.

  1. Access is controlled at three levels: Owner (you), Group (users with whom you share a group) , Other (the rest of the world). Each level may be granted or denied permission to Read, Write, or Execute the file. File permissions are shown in long directory listings.
  2. file permissions
  3. List the files in your home directory. Who is allowed to read the WWW directory you created? Who is allowed to write to it?
  4. Try to list the directory /home/echang (ls /home/echang ). What happens? (The line in the home directory listing is
            drwx--x--x  11 echang   echang       2048  Feb  7 16:29 echang
    

Activity: Your Web Directory

The WWW directory in your home directory is where you must store files to publish them on the Web. The Web server on wyrd can retrieve files that are in that directory, including those in subdirectories within it. If a file is not within that directory - for example one in that Desktop directory - it will be available to the Web server.

First, look at your web site. Open the browser and enter the URL

       wyrd.hood.edu/~your_username

If your account is a new one, you will see a directory listing headed "Index of..." similar to the picture below.

However, your listing should show the cs280 directory you made earlier. (If you have used an account for CS 181, you will see the pages you published for that class. You will not see the cs280 directory listed because it is hidden byt your index.html page, but it is there.)

The web server's listing also shows the ~ symbol, but in this case it means your Web home - your WWW directory.

s

You will put your web work for this course in the cs280 directory.

Change your working directory (cd) to the cs280 directory.

Show the it280 drectory in the browser by clicking its name. If you can't see the name, browse to

       wyrd.hood.edu/~your_username/it280

Use a text editor

You can create files on wyrd by using a text editor. The simplest one is named Pico. To use it, enter the command pico name_you_want_for_the_file.

For this exercise,

  1. Be sure your working directory is your it280 directory.
  2. Be sure the browser is showing the it280 directory listing.
  3. enter pico sillypage. You will see a blank editing screen.
  4. Type a short message, such as "Hello World".
  5. Press Ctrl-X (shown as ^X at the bottom of the editing screen.) and press Y when asked if you want to save the changes.
  6. List files to see that the file has been created.
  7. look at the browser. Does it show the new file.

The browser has no way of knowing that you made changes over on wyrd. It simply fetches a document and displays that document until you tell it to get another one.

  1. Refresh the browser
  2. Notice that the display has now been updated to show the new file.
  3. Click on the new file to see your message.

Browse with Lynx

You don't need graphics to browse the web

Exercise: Lynx Team Scavenger Hunt!

.

Go to the Hood College home page. (http://www.hood.edu). BEGINNING AT THAT PAGE, AND USING ONLY THE NAVIGATION PROVIDED, find as many as you can of the following. Write down the URL of the page where it is shown. Make a note of the steps you took to find it. (Pressing the delete key will bring up a page with your History List, which shows the URLs you have visited.)

  • Quit Lynx - press q.
  • Changing your password:

    You can change your wyrd password. You do not need to do it during class time. Read through the following instructions first.

    1. Choose an acceptable password BEFORE beginning the password changing process.
    2. At the command prompt $, enter the command passwd and follow the prompts.
    3. You will first be asked to enter your current password. This is a security precaution.
    4. Then you wil be asked to enter your new password and to re-enter it. If you choose an unsafe password, it will be rejected, and you must choose another.
    5. DO NOT tell anyone your password. Not your classmate, not your spouse/child/mother/significant other, not me or anyone else.
    6. If someone sends you an e-mail claiming to be the system administrator (root or Atsuko Crum or me or another faculty member) asking you to tell them your password or telling you to change it to some specific word, do not do it. We will never ask for your password. If this happens, send root@wyrd.hood.edu an email about it immediately.