Computer Labs

Undergraduate Lab

SCI 254
7:00 a.m. - 10:00 p.m
Monday - Friday

Students can use the last 6 digits of their student ID number to access the undergraduate lab. Access will automatically be granted to all students enrolled in CS courses on the first week of classes. Students who add classes after the first meeting will be added within a week. If access is needed sooner, the student should contact the lab tech.

 

 

Graduate Lab

SCI 241
Permission Only

 


After Hours Access

You can access your lab accounts from home or another computer at any time by telneting into your account. If you need to come into the labs after hours, a special permission form is needed from the department office. To access the lab before 7:00 am or after 10:00 pm, the permission form must be signed by your instructor, the Chair, and the Director of Operations.

Note: This process may take a couple days so try to plan ahead.

 

Security Rules
  1. The lab doors are not to be propped open at any time.
  2. Each student must use the last 6 digits of their student ID number to access the lab.
  3. If the labs are warm, open the windows and use the fans, from SCI 254, to help cool the rooms down.

 

Course Fee

Students enrolled in the following courses are required to pay a $13.00 course fee, per course:

CSC 413, CSC 415, CSC 600, CSC 615, CSC 620, CSC 630, CSC 637, CSC 640, CSC 641, CSC 642, CSC 644, CSC 645, CSC 650, CSC 651 CSC 656, CSC 664, CSC 665, CSC 667, CSC 668, CSC 671, CSC 675, CSC 690, CSC 720, CSC 730, CSC 745, CSC 775, CSC 810, CSC 820, CSC 825, CSC 830, CSC 835, CSC 837, CSC 840, CSC 841, CSC 842, CSC 845, CSC 846, CSC 848, CSC 849, CSC 850, CSC 856, CSC 857, CSC 864, CSC 868, CSC 870, CSC 871.

The course fees are used for maintaining and improving the computer science labs for the benefit of all computer science students, specifically related to student classwork. The course fee pays for supplies such as toner, paper, and computer hardware and software needed for classes. These fees also give the department more flexibility to fund lab assistants and lab improvements from other funding sources.

 

Lab Printing Quota

Each Course Fee, paid per semester, entitles you to print 400 sheets from the CS Lab Printer during that semester. (e.g. - If you have paid 2 course fees, you have a total of 800 sheets for your beginning Printing Quota.)

If you exhaust your quota and still want to print, all you need to do is pay another fee. Bring your Bursar Stamped Fee Sheet to the CS Dept Office and another 400 sheets will be added to your Print Quota.

 

Assistance or Concerns

A lab tech is available to assist students with technical and administrative issues associated with the lab.
For questions or concerns regarding the lab facilities or lab equipment/software problems, please contact csgrad@sfsu.edu

 


Unix Servers and Accounts

 

Unix Servers
Server Description
thecity.sfsu.edu Department of Computer Science Server
libra.sfsu.edu University Server
Getting Unix Server Accounts
Server Instructions
thecity.sfsu.edu You should already have an account if taking CS courses. If not request an account by contacting the department office. Your Username is the first part of your SFSU email address (WITHOUT the @sfsu.edu) and the Password is your Student ID. You use the same information to access the lab machines in SCI 254.
libra.sfsu.edu Request an account from Account Services, Division of Information Technology. Click here. The Username (first part of SFSU email address - WITHOUT the @sfsu.edu) and Password are the same as when accessing your SFSU email account.

 


Remote Access to Unix Servers

 

There are many programs you can use to login to remote machines and to transfer files to and from remote machines (from either end). Here is a brief summary (a very short description for each program)

Common Remote Access Tools
Tool Description
telnet a program which is used for logging into a a remote machine
ftp a program which transfers files to and from a remote machine
ssh & sftp
ssh & sftp work the same way as telnet & ftp. They are recommended 
over conventional telnet and ftp because they encrypt and transfer 
data securely whereas telnet and ftp pass everything in PLAIN TEXT, 
including passwords.

Students are encouraged to use ssh and sftp. This document provides information for ssh and sftp only.

 

Connecting to a remote Unix server from Windows

If your local machine is a Window PC, there are many free GUI based software available. A popular telnet/ssh client is PuTTY. You can dowload here PuTTY Website

Another popular ssh/sftp client is ssh.

 

Connecting to a remote Unix server from Linux & Unix

If your local machine is a Linux or Unix machine, you can use command line utilities, ssh or sftp, to connect to remote Unix/Linux servers. See Unix online reference manual pages ("man ssh" & "man sftp") for complete information. 

 

Using ssh to connect to a remote machine
  1. Run ssh command with remote login name and machine name.
  2. If this is the 1st time connecting to this remote host, ssh will create RSA key and save it in your local machine. Enter 'yes' to allow this task. 
  3. enter remote account password.
  4. Now, you are connected to the remote machine and can start works on the machine. 
  5. To return to local machine, type "exit".

Example: Use ssh from libra.sfsu.edu to connect to thecity.sfsu.edu.

Note: Comments have // surrounding them in the example below:

libra% ssh jwong@thecity     // Step 1 //

The authenticity of host 'thecity (130.212.3.51)' can't be established.

RSA key fingerprint is 3d:61:51:28:54:38:e5:fd:b7:a1:36:30:bd:01:1c:aa.

Are you sure you want to continue connecting (yes/no)? yes

// Step 2 //

Warning: Permanently added 'thecity,130.212.3.51' (RSA) to the list of known hosts.

jwong@thecity's password:    // Step 3 //

Last login: Sun Jun  6 18:18:30 2004 from libra.sfsu.edu

Sun Microsystems Inc.   SunOS 5.8       Generic February 2000

Sun Microsystems Inc.   SunOS 5.8       Generic February 2000

[jwong@thecity] ~:           // Step 4 //

 

Using sftp to connect to a remote machine
  1. Run sftp command with remote login name and machine name.
  2. Enter remote account password.
  3. Now, you are connected to the remote machine. You may use any sftp/ftp commands.
  4. To return to local machine, type "quit".

Example: Use sftp to transfer a file "jwong/pj2/p2.c" from remote machine "thecity" to current directory at local machine "libra".

Note: Comments have // surrounding them in the example below:

libra% sftp jwong@thecity // Step 1 //

Connecting to thecity...

jwong@thecity's password: // Step 2 // 

// Step 3 : sftp commands //

sftp> cd pj2              // change to directory pj2 //

sftp> ls                  // list files in pj2 //

.     ..    p2.c

sftp> get p2.c            // transfer file p2.c to the local machine //

Fetching /export/home/faculty/jwong/pj2/p2.c to p2.c

sftp> quit                // Step 4/ /

libra% ls                 // back to libra, list files at current directory//

p2.c

See ftp information from SFSU Division of Information Technology here.

 


Basic C/C++ Compilers & Compiling Information

 

C/C++ compilers
Type Compiler
GNU C/C++ compilers gcc or g++
SunOS/BSD C/C++ compiler cc or c++

 

Introduction to compiling C/C++ programs in remote server
  1. Use ssh to login to the remote server.
  2. Use a file editor to create program file, say proj1.cc, in your directory OR Use sftp to transfer the file proj1.cc from your local machine to your directory in the remote server.
  3. Use C++ compiler in the server to compile the program, i.e. type "g++ proj1.cc". If you don't have any errors, the compiler will translate your C++ program (proj1.cc) into an executable program in your current directory, called a.out (the default name).
  4. To run (execute) your C++ program, just type "./a.out". Now the statements in your C++ program proj1.cc will begin to execute.
  5. If you compile a new program lab2.cc. The compiler overwrote the executable of proj1.cc with the executable of lab2.cc, giving it the same default name "a.out". To save the executable program of proj1.cc under a different name instead of a.out, for example under the name proj1 type "g++ proj1.cc -o proj1". Similarly, to save the executable program of lab2.cc under a different name, lets say under the name lab2 type "g++ lab2.c -o lab2".
  6. Now to run the program proj1.cc just type ./proj1. To run the program lab2.cc just type ./lab2.

See Unix online manual "man g++" for complete information.