Computing FAQ

Written by Steve Richter <richters@stwing.upenn.edu>
Updated years later by Reilly Grant <rm@stwing.upenn.edu>
Uploaded and cleaned more years later by Brian Zhang <zhangbr@stwing.upenn.edu>

Table of Contents

0.1 What is this FAQ about and how is it organized?
0.2 What is STWing Computing?
0.3 How do I get access to these computing resources?
0.4 How can I get involved in STWing Computing?

1 Logging on and Checking Mail
1.1 How can I check my mail on Force?
         1.1.1 What the heck is a shell prompt?
         1.1.2 How do I get to a shell prompt?
         1.1.3 Ok... now I've got a shell prompt, what do I do now?
1.2 How do I configure Outlook or Netscape to check my mail?
1.3 How do I check my mail via the Web?
1.4 I'm getting certificate-related errors when trying to check my email. What should I do?

2 Newsgroups
2.1 How do I read the STWing newsgroup, or others for that matter?
2.2 What is the UPenn news server?
2.3 What is the name of the STWing newsgroup?
2.4 Which news reader should I use from a shell prompt?

3 Basic commands for the UNIX shell
3.1 How do I see my files in my directory (folder for some MS initiates)?
3.2 How do I go to a different directory?
3.3 I'm lost, how do I get back to my home directory (and what was the silly "~" in the last answer)?
3.4 How do I make directories under my home directory?
3.5 How do I delete / rename / copy / move files?
         3.5.1 How do I delete a file?
         3.5.2 How do I delete a directory?
         3.5.3 How do I rename a file?
         3.5.4 How do I copy a file?
3.6 How do I edit / create a text file (i.e. where's my notepad)?
3.7 Can I view webpages from a console (i.e. where's my netscape)?
3.8 Can I ftp things to and from Force?

4 Slightly more advanced commands for the UNIX shell
4.1 How do I get help on commands?
4.2 How do I see who else is on Force?
4.3 Now that I know who is there, how can I talk to them?
4.4 How can I get more information about a user, like all their logins or their real name?
         4.4.1 How do I make my own plan file?
         4.4.2 What are permissions and how do I change them?
4.5 How can I view a text file without having to open up a full editor?
4.6 How do I change my Force password?
4.7 How can I tell how close I am to my quota (how much I am allowed to store on Force)?
4.8 How do I set up a web page?

5 Specific commands
5.1 What are some cool things that only Force can do?
5.2 What's some other neat stuff on UNIX in general?

6 Security and Encryption
6.1 What are PGP and GPG?
6.2 How do I make a PGP key?
6.3 How do I get help with PGP or GPG?
6.4 How do I encrypt my mail messages?
6.5 How do I set up SSH keys?

7 Shell Configuration
7.1 How do I set environment variables in bash?
7.2 What are the configuration files for bash?

8 Compiling / Development
8.1 What development utilities are on STWing servers?
8.2 What C/C++ compilers are on Force?
8.3 Where is the JDK (Java Development Kit) located?
8.4 Where is OCAML?
8.5 What versions of make are on Force?
8.6 How do I make a shell script?

A Supplements
A.1 Mail and News
A.2 Shell Configuration

B Useful Links
B.1 UNIX/Linux Flavors, Distributions, and Culture
         B.1.1 Solaris
         B.1.2 Linux
         B.1.3 BSD
         B.1.4 General / Culture
B.2 Windows
B.3 General Interest

 


0.1   What is this FAQ about and how is it organized?

This FAQ is divided into a few sections pertaining to the different kinds of things you may want to do on Force or a UNIX system in general. There are sections that will be marked *technical* for more advanced users. If you are a new user to UNIX you may safely ignore these sections, unless you're just really curious. There are also several appendices at the end of this FAQ with more technical info, or where to get files referenced in the FAQ.

Back to top

 

0.2   What is STWing Computing?

STWing Computing is a group of servers, currently located in G-22 of King's Court that serve various functions including: e-mail, development, research, databases, web-mail, listservs, and intra-STWing communications.

These servers are maintained by Senior Sysadmin and his cohort of Junior Sysadmins. To contact the Sysadmins with any questions or concerns about STWing servers you can send them mail. Current staff for these positions and their emails are listed on the staff page.

Back to top

0.3   How do I get access to these computing resources?

All of these resources are available to all STWing members. Force accounts (i.e. shell / e-mail / development) can be obtained from the current STWing Sysadmin in King's Court 226. All other systems can be accessed by mailing the Sysadmins with your project idea and a description of what you need to complete it. All of these instances are handled on a case-by-case basis.

Back to top

 

0.4   How can I get involved in STWing Computing?

Contact us; we always need more help. Experience in Solaris, FreeBSD, and/or Linux is a help, but is not required.

Back to top

 

1  Logging on and Checking Mail

 

1.1   How can I check my mail on Force?

You can check your mail several ways on Force. You can either log onto the system directly (i.e. get a shell prompt), you can use a mail client (such as Thunderbird or Outlook) and connect via POP3 or IMAP, or you can use the STWing Webmail client.

Back to top

 

1.1.1   What the heck is a shell prompt?

A shell prompt is the standard way of interacting with a UNIX system. It is a text based interface (i.e. non-graphical) that allows you to start programs and applications and interact with the system to do anything from compiling programs to checking your mail.

*technical*

Force uses the bash (bourne-again shell) shell by default, but tcsh and zsh are also available. You can change your shell by using the 'ldapchsh' command.

Choices that are reasonable would be:

  • /bin/bash (default)
  • /bin/tcsh
  • /bin/zsh

Back to top

 

1.1.2   How do I get to a shell prompt?

From a Windows system:

 

  1. Download PuTTY and save it somewhere. No installation required.
  2. Enter "force.stwing.upenn.edu" in the host field.
  3. Click "Connect" and click "Accept and Save" when asked to confirm the SSH host key.

From a Macintosh, Linux or other Unix system:

 

  1. Open a terminal. On Mac OS X the terminal can be found in Applications -> Utilities.
  2. Type ssh username@force.stwing.upenn.edu and press enter.
  3. Confirm the SSH key when asked, then enter your password.

Back to top

1.1.3   Ok... now I've got a shell prompt, what do I do now?

There are two main mail clients on Force that can be used from a shell prompt. These are pine and mutt. Pine is generally more user friendly out of the box, while mutt is more powerful and configurable. My personal preference is mutt, but with some significant changes in its configuration. Users new to UNIX may wish to use pine first since not as much setup is required.

Either can be reached simply by typing its name, i.e. 'mutt' or 'pine' at the shell prompt.

Note: For mutt I have some generic configuration files that make it much easier to work with. Go to Appendix Section A: Supplements for info on getting these and setting them up.

Back to top

 

1.2   How do I configure Thunderbird or Outlook to check my mail?

STWing supports both IMAP and POP3 mail services which are used by most popular mail readers. All mail transmissions are SSL encrypted between your computer and the STWing mail server, so you must use a mail client that supports this. Currently the best solutions are Mozilla Thunderbird or Microsoft Outlook.

Configration information:

  • Address: username@stwing.upenn.edu
  • Incoming mail: Both IMAP or POP3 are supported, IMAP is suggested.
    • IMAP: imap.stwing.upenn.edu
    • POP3: pop.stwing.upenn.edu
  • Outgoing mail server (SMTP): smtp.stwing.upenn.edu
  • Configure your mail client to "Always use authentication" and "Always use SSL".
  • Set the IMAP folder prefix to "Mail/" (if you use mutt) or "mail/" (if you use Pine). If you're just starting out please use "mail/".

 

Back to top

1.3   How do I check my mail via the Web?

https://webmail.stwing.upenn.edu/

Once there, enter your username and password to access the site and then once again at the mail login screen. You must select which folder prefix you use from the "Server" dropdown before you can log in.

Back to top

 

1.4    I'm getting certificate-related errors when trying to check my email. What should I do?

You need to download and install the CAcert.org root certificates. On Windows:

  1. Download and install the CAcert.org Windows installer package from the website above.
  2. Don't forget to verify the certificate fingerprints before installing!

On Mac OS X:

  1. Download the Class 1 certificate from the website above (in PEM Format).
  2. Don't forget to verify the certificate fingerprints before installing!
  3. You should be able to double click the certificate to install. More info can be found on the CAcert Wiki

Back to top

 

2  Newsgroups (OUTDATED)

 

2.1   How do I read the STWing newsgroup, or others for that matter?

There are several ways to read the STWing or UPenn newsgroups. You can either use a news reader on your PC (such as Mozilla Thunderbird or Outlook Express) or you can read them directly on Force via the shell prompt using tin or slrn.

Back to top

 

2.2   What is the STWing news server?

news.stwing.upenn.edu

The STWing news server allows unauthenticated, unencrypted connections as long as you are on the Penn campus. If you are connecting from off-campus (or value your privacy) you must tell your client to enable SSL and provide your STWing username and password for authentication.

Back to top

 

2.3   What is the name of the STWing newsgroup?

The newsgroup for general discussion is stwing.news. Announcements are posted to stwing.announce.

Back to top

 

2.4   Which news reader should I use from a shell prompt?

Either 'tin' or 'slrn' work well. They act a little differently and it is a matter of preference which you use. I personally use 'slrn'. I've included a configuration file for 'slrn' if you choose to use that, it's a bit more friendly (in my opinion). You can get it in the Appendix Section A : Supplements.

Back to top

 

3  Basic commands for the UNIX shell

 

3.1   How do I see my files in my directory (folder for some MS initiates)?

the command 'ls', will list all the files in the current directory

Popular options to this command are:

 

 

-F:

shows files, executables, directories in a more obvious way (i.e. directories are followed by a ''/'', executables by a ''*'')

 

-l:

long format (more details)

 

-a:

shows hidden files

these are used in the manner: 'ls -la' or 'ls -la directory' for example

Back to top

 

3.2   How do I go to a different directory?

the command 'cd other_directory' changes the directory you are in to

other_directory

note: in the above example other_directory is the full path to a directory on the system (i.e. /usr/local/bin or ~/classwork/cse110). There is also a shorthand convention to designate the directory above where you are which is '..'. For example, if you are in ~/classwork/cse110, and want to go back to ~/classwork, you could type 'cd ..'. Furthermore, if you are in ~/classwork/cse110 and want to switch to ~/letters/bob, you could type: 'cd ../../letters/bob'.

Back to top

 

3.3   I'm lost, how do I get back to my home directory (and what was the silly '~' in the last answer)?

On UNIX, your home directory is also called '~', simply typing 'cd ~' will bring you back to it.

note: from now on this notation (the '~' to mean your home directory) will be used in this FAQ

Back to top

 

3.4   How do I make directories under my home directory?

'mkdir new_directory' makes the directory new_directory in the current directory.

Back to top

 

3.5   How do I delete / rename / copy / move files?

 

3.5.1   How do I delete a file?

'rm filename' will delete the file called filename

Back to top

 

3.5.2   How do I delete a directory?

'rm -rf directory' will delete the directory called directory

*technical*

 

 

-r:

recursive delete

 

-f:

force (do not ask for confirmation)

 

3.5.3   How do I rename a file?

'mv filename newfilename' will rename (or move since they are the same thing on UNIX) the file from the old name ''filename'' to the new name ''newfilename''.

Back to top

 

3.5.4   How do I copy a file?

'cp filename newfilename' will copy the file ''filename'' to the file ''newfilename''.

Back to top

 

3.6   How do I edit / create a text file (i.e. where's my notepad)?

There are several text editors on UNIX. Probably the most user-friendly is 'pico'. You create or edit a file by typing:

'pico filename' or 'pico filename.txt' (if you really care to have the ''.txt'' there)

*technical*

Other editors on the system include vi, vim, emacs, and xemacs. If you are doing development I strongly recommend emacs or xemacs, both of which can be forwarded to your box if you have an Xserver running (such as Exceed) or are on a UNIX box. Remember to enable X forwarding through SSH on your end as well. Vim is a far more complex and configurable console editor. E-mail root@stwing if you want help with configuring it; I personally like it far better then pico.

Back to top

 

3.7   Can I view webpages from a console (i.e. where's my netscape)?

Yes, there are two text-based web browsers on Force: 'links' and 'lynx'.

 

 

'links':

newer and supports tables, so it generally looks better.

 

'lynx':

supports SSL if you need to contact an encrypted site.

 

Back to top

3.8   Can I ftp things to and from Force?

Yes, Force runs an FTP server and any popular FTP client will be able to access it. From Force there are both 'ftp' and 'ncftp'. 'ftp' is the standard UNIX ftp client. 'ncftp' is a more enhanced, user-friendly version. Force's address for FTP clients is: force.stwing.upenn.edu.

Back to top

 

4  Slightly more advanced commands for the UNIX shell

 

4.1   How do I get help on commands?

In UNIX the command for help is 'man'. This stands for ''manual''. You can access help for a specific command with 'man command'. If you are unsure you can get help on a general topic (i.e. get a list of relevant man pages), with the command 'apropos keyword' where keyword is the topic you want help on.

*technical*

'apropos' is simply shorthand for 'man -k'

Back to top

 

4.2   How do I see who else is on Force?

The commands:

 

 

'w':

show all users on the system and what they are doing

 

'f':

show all users on the system and where they are coming from

 

'who':

a variation on 'f'

these will all give you info on who is on the system and what they are doing at the moment (i.e. if they are idle or actually there)

*technical*

'f' is simply shorthand for 'finger'. This is not true on all UNIX systems so do not always expect it.

Back to top

 

4.3   Now that I know who is there, how can I talk to them?

the commands 'write' and 'talk' can be used to either write a msg to someone's terminal or start a chat session with them

'write username' starts a session that will write lines of text to a user's console, you can end the transmission by typing ctrl-D

'talk username' starts a chat session with the user where you can type back and forth on a split screen

'ytalk username' starts a session much like 'talk' only it is a more advanced client, allows for scrolling text, and more then two people in a chat among other nice features.

note: you can use ctrl-l to refresh your screen after someone invariably writes over your mutt / pine / pico window.

Back to top

 

4.4   How can I get more information about a user, like all their logins or their real name?

the UNIX command 'finger username' will show you a list of all a user's information, their logins, and their plan file. Try the command: 'finger mbruni' for an example of a plan file.

Back to top

 

4.4.1   How do I make my own plan file?

create a ''.plan'' file in your home directory then change the permissions on it so others can read it (type: 'pico .plan' to edit the file)

Back to top

 

4.4.2   What are permissions and how do I change them?

Permissions are the access controls (security) on files to determine who and read/write/execute them. You can change the permissions on files and directories with the 'chmod' command.

in this case: 'chmod 711 ~' then 'chmod 644 .plan' will make the necessary changes

for more info on the 'chmod' command type: 'man chmod'

Back to top

 

4.5   How can I view a text file without having to open up a full editor?

You can use the command 'less' to simply view a file, move up and down in it, or search it.

*technical*

'more' and 'less' are both technically called pagers and are both installed on Force. By setting the PAGER environment variable you can change the default one for your shell.

You can search you a text string in 'less' by typing '/' and then the string and then <enter>.

Back to top

 

4.6   How do I change my Force password?

type 'passwd' at the prompt

Back to top

 

4.7   How can I tell how close I am to my quota (how much I am allowed to store on Force)?

typing 'quota -v' at the prompt will give you a summary of your usage on Force/Nexus

Back to top

 

4.8   How do I set up a web page?

log into Force and type these commands:

'mkdir ~/public_html'

'chmod 711 ~'

'chmod 755 ~/public_html'

then put all your web page files under ~/public_html (don't forget an index.html).

Your web page can be accessed at: http://www.stwing.upenn.edu/~username

 

*technical*

Force supports Perl and PHP scripting files. For Perl scripts, I recommend making a ~/public_html/cgi-bin directory for them to reside in.

Back to top

 

5  Specific commands

 

5.1   What are some cool things that only Force can do?

 

'movies':

show the movies playing on resnet

 

'stats':

show the top posters on the newsgroup (or other newsgroups)

 

'check_connections':

show more detailed info about how people are connected

 

'hogs':

show top disk users on Force

 

'turnin':

a mirror of the SEAS 'turnin' program using SSH to turn assignments in to Eniac directly off of Force.

 

5.2   What's some other neat stuff on UNIX in general?

 

 

'bc':

simple calculator

 

'cal':

show monthly calendars

 

'top':

show cpu usage and a live process list

 

'grep':

look through files for a phrase (used: 'grep phrase filenames')

 

6  Security and Encryption

 

6.1   What are PGP and GPG?

PGP stands for Pretty Good Privacy and is an encryption suite created by Phillip Zimmerman. GnuPG (Gnu Privacy Guard) is the Open Source version created by the GNU project and installed on Force.

Back to top

 

6.2   How do I make a PGP key?

gpg --gen-key

Back to top

 

6.3   How do I get help with PGP or GPG?

man gpg should do the trick.

Back to top

 

6.4   How do I encrypt my mail messages?

Using mutt you can do this very easily. Look at the .muttrc, .muttrc-pgp2 and .muttrc-gpg in the Appendix Section A: Supplements to see how to set it up.

Back to top

 

6.5   How do I set up SSH keys?

Use the command ssh-keygen to generate a new key pair. Add the public key (in the .pub file generated) to your ~/.ssh/authorized_keys file and keep the private key on your workstation.

Back to top

 

7  Shell Configuration

 

7.1   How do I set environment variables in bash?

'export VARIABLE=value' is the format to set it at the command line

Back to top

 

7.2   What are the configuration files for bash?

~/.bash_profile and ~/.bashrc are the two main config files for bash. At the top of .bash_profile the STWing.bash_profile is brought in first. These are the system settings and is updated by the Sysadmin staff, please do not remove it. Add all your changes after that line.

note: some examples of these files are included in the Appendix Section A: Supplements. They are for reference, and are simply my way of setting things up. They should only be taken as a guide.

Back to top

 

8  Compiling / Development

 

8.1   What development utilities are on STWing servers?

Force is the main development server for STWing. It has both standard C/C++ compilers (cc and gcc) as well as Java development tools and facilities for LISP and OCAML.

Back to top

 

8.2   What C/C++ compilers are on Force?

the default compiler on Force is the most current stable version of GCC. It's is located at /usr/local/bin/gcc.

there is also a SPARC specific compiler 'cc' located at /usr/local/bin/cc

finally, there are several other revisions of gcc in the /opt hierarchy. You can change which one you are using by setting the CC environment variable prior to doing a ''make".

Back to top

 

8.3   Where is the JDK (Java Development Kit) located?

The current JDK is located in /opt/java.

Back to top

 

8.4   Where is OCAML?

OCAML is installed in /usr/local/bin and all its utilities should be in your PATH already.

Back to top

 

8.5   What versions of make are on Force?

There are three versions of make on Force:

 

'make':

default Solaris make

 

'gmake':

GNU make

 

'dmake':

distributed Solaris make

 

 

*technical*

you can do multi-cpu makes with both 'gmake' and 'dmake' like this:

'gmake -j4' (Force has 4 cpu's) or 'dmake -j 4'

Back to top

 

8.6   How do I make a shell script?

to make the shell recognize a script as a shell script add the line:

#!/usr/local/bin/bash

as the first line of the script

note: be sure to make the script executable.

Back to top

 

A  Supplements

All these files are located in the /projects/stwing-computing-faq directory. I suggest typing 'cd /projects/stwing-computing-faq' and then 'ls -la' to see everything that is availiable.

Back to top

 

A.1   Mail and News

 

  •  

  • .muttrc - general mutt configuration file

     

  •  

  • .muttrc-pgp2 - mutt config for PGP 2.6.2

     

  •  

  • .muttrc-gpg - mutt config for GPG

     

  •  

  • .muttprintrc - config for printing w/ mutt

     

  •  

  • .slrnrc - general slrn config file

     

 

Back to top

A.2   Shell Configuration

 

  •  

  • .bash_profile - general configuration file for the bash shell

     

  •  

  • .bashrc - file for aliases and other additions to the bash environment

     

  •  

  • STWing.bash_profile - the STWing bash config sourced before the local .bash_profile

     

  •  

  • genfunct.sh - some general bash functions I use

     

  •  

  • secfunct.sh - some security related bash functions I use

     

  •  

  • termfunct.sh - some functions to setup my terminal in a better way (in my opinion)

     

  •  

  • terminal configuration files (.terminfo/*) - some config files to make the above functions work properly

     

Note: All of these files are offered as-is, they should be considered as a guide only and depending on your configuration may not work without modification, use them at your own risk. With that being said, these are an example of how I set up my bash environment. Hopefullly they will be of some use in you developing your own style of doing so.

Back to top

 

B  Useful Links

 

B.1   UNIX/Linux Flavors, Distributions, and Culture

 

B.1.1   Solaris

 

 

Sun Microsystems

http://www.sun.com

 

SunSolve

http://sunsolve.sun.com

 

EduGremlin

http://www.sunedu.net

 

B.1.2   Linux

 

 

RedHat Linux

http://www.redhat.com

 

Mandrake Linux

http://www.linux-mandrake.com/en

 

Debian Linux

http://www.debian.org

 

Linux Kernel Archives

http://www.kernel.org

 

B.1.3   BSD

 

 

FreeBSD

http://www.freebsd.org

 

OpenBSD

http://www.openbsd.org

 

NetBSD

http://www.netbsd.org

 

B.1.4   General / Culture

 

xkcd

http://xkcd.com

 

Freshmeat

http://freshmeat.net

 

Slashdot

http://www.slashdot.org

 

SegFault

http://www.segfault.org

 

ThinkGeek

http://www.thinkgeek.com

 

B.2   Windows

 

 

Microsoft

http://www.microsoft.com

 

Firefox

http://www.mozilla.com/firefox

 

Winfiles

http://www.winfiles.com

 

Tucows

http://www.tucows.com

 

B.3   General Interest

 

STWing

http://www.stwing.upenn.edu

 

UPenn

http://www.upenn.edu

 

UPenn Computing

http://www.upenn.edu/computing