Introduction to Computing
Version: June 6,2008
Welcome to the Duke University Duke Statistics computing system.
The Department of Statistical Science maintains and supports a modern high-performance Unix computing environment to support the research and educational mission of its faculty, students, and staff. Occasionally user privileges are extended to Duke Statistics visitors and to other guests. This brief document is intended to introduce you to the Duke Statistics computing environment, and especially to the responsibilities of users. Some useful information about e-mail and web pages follows this list of user responsibilities:
All users are expected to:
- Maintain a reasonably secure password, and do not share it with anyone (current rules: 6-8 characters long, no dictionary words (any language), including some numbers or symbols)
- Never turn off one of the Duke Statistics computers (this can damage the computer hardware and corrupt your data and those of other users)
- Never move a running machine (this can damage the hard drive, dislodge the power cord and cause data loss or corruption, or cause the computer to overheat and fail if air circulation is impaired)
- Avoid using any faculty member's computer without prior permission
- Avoid using departmental mail lists (prof@stat, grad@stat, staff@stat) for non-professional purposes
- Report problems promptly to help@stat.duke.edu (try to include a brief description of the problem and the machine name and operating system, both available in the output of the command ``uname -a'', if possible)
Guest users are additionally expected to:
- Avoid straining limited resources for non-Duke Statistics business:
- students should use accounts for course-related work,
- colleagues for collaborative research,
- MS students for their statistics research,
- family members sparingly, etc.
All users should minimize their use of disk storage (see below for relevant web page) and should learn about and use the nice and renice commands for long-running batch jobs.
- All guest accounts must have an Duke Statistics sponsor who will be
accountable for the guest's system usage.
- All guest accounts should be regarded as temporary, and account status is reviewed periodically. Course accounts are closed out at the end of the semester.
A great deal of information specific to the Duke Statistics computing environment (e.g., printing, disk space) is available on-line at URL (uniform resource locator)
- Unix Help:
In addition to the web-based help, you can find help about individual Unix commands with the commands man (manual, the online documentation for Unix) and apropos (try ``man man'' to get started), or for more recent additions with the command info (or C-h i within emacs). And you can always send e-mail requests to help@stat.duke.edu or ask the system administrator, Lance Brown (brown@stat.duke.edu, 684-5419).
- Architectures:
Duke Statistics maintains a complex heterogeneous system that evolves over time. While some staff and faculty members have personal computers running some form of Windows or MacOS, and limited support is available for these platforms, most Duke Statistics machines run some form of Unix: currently CentOS 5 Linux for all Intel- and AMD-based hardware. We support both 32-bit and 64-bit versions of Linux on these platforms. Effort is made to keep the multi-architecture environment as consistent as possible; still, there are some inevitable differences. For data/file conversion purposes, please note that Duke University maintains public Windows PC clusters in the basement of Old Chemistry in Room 016 and also in Room 104A Perkins Library machines. For more details, see the following URL:
http://www.oit.duke.edu/comp-print/labs/index.html - Security:
As a general security meta-reference, the following URL provides a number of references which should help when choosing a password or attempting to access the department remotely:
http://www.stat.duke.edu/computing/security/ - Remote Access:
To protect both your identity, data integrity, and our standing within the Duke University community, Duke Statistics allows only encrypted remote access to the department. To access your unix account you need to have an SSH (Secure SHell) client.
- TTSSH (a.k.a. TeraTerm SSH)
- F-Secure
- SecureCRT
- PuTTY
To securely access your email from remote sites, Duke Statistics maintains a secure IMAP server which you can access via Mozilla, Netscape, pine, mutt, and many other mail programs. For details about how to use this server, see the IMAP page.
- E-mail:
Your email address is user@stat.duke.edu (of course ``user'' must be replaced by your user ID). Additionally, you should be able to receive email as
firstname.lastname@stat.duke.edu.
Duke Statistics currently provides a few supported email clients:
- mutt - very nice, mime-aware email client
- pine - good, general purpose email client
- vm - emacs mail reader/composer (M-x vm)
- mail - old-fashioned Unix Mail/mailx (Not a good choice)
If you receive an email containing MIME (Multipurpose Internet Mail Extensions) content encoded in either base64 or binhex format, the save the mail message as a file (e.g., ivebeenmimed) and then use the command ``uudeview ivebeenmimed'' to extract the MIME content (often consisting of images, sound files, Microsoft stuff, etc). It will appear similar to the following in a mail client that is not MIME-enabled:
-Multipart_Tue_Aug__4_22:12:42_1998-1 Content-Type: image/gif Content-Disposition: inline; filename="natasha.gif" Content-Transfer-Encoding: base64 R0lGODdhnAGMAfcAAAUEBXSAZIgMEjJENYhIJkcLD8VJIva7qcWAPollNcyfY1xDK0cpIRM
- Web pages:
Your home page will be file ~/.public_html/index.html, which will be accessible to web browsers as http://www.stat.duke.edu/~user/. Several links to web authoring tools and guides appear in the info URL above.
- Text editors:
Several text editors are available from your Unix account.
Commonly used:
- emacs - editor with customized environments
- vi/nvi - great editing tool with an arcane command syntax
- pico - easy-to-use, simple, but limited editor (pine editor)
Less commonly used (but available):
- nedit - a nice X/Motif editor
- vim/gvim - enhanced vi with colors and other goodies
- Unix Shells:
The default shell (command environment) for unix accounts is tcsh (an enhanced variant of the C shell with both command-line editing, job control, and tab key context completions). Other shells (ksh, sh) are available, but are not supported. Your tcsh environment is controlled by the file ~/.cshrc, where ``~'' is shorthand for your home directory. You may customize the behavior of your shell by modifying this file (use one of the text editors above); some of the most commonly customized features include:
- Your path (which determines the programs that you can execute
without giving the full location of the executable file).
- Your default printer setting (this defaults to 214, the HP
LaserJet 4000N in Room 214). You may replace 214 in your
.cshrc file (look for the line ``setenv PRINTER 214'')
the most convenient entry printer in the list. Simply place the
hash # in front of the 214 and remove it from the more appropriate
entry.
Some programs (netscape, emacs) ignore your PRINTER environment variable and use their own defaults; if you do not see your printout where you would expect,
- Run ``lpq'' to verify that the job is not just queued up behind another (possibly stalled) job;
- Look in the printout trays near the printers to see if your job already came out and was stored;
- Check 214.
For more details on printing at Duke Statistics, see the printing page.
- the default ~/.cshrc also calls a file ~/.aliases
to set up short names for various frequently-called commands. Be
extremely careful when adding aliases: they must be only one line
long, unless you use the ``\'' character for line continuations.
- If you make any changes to your .cshrc or
.aliases file, type source ~/.cshrc to
bring the changes into effect.
- To avoid problems associated with syntax errors in these files, use the command ``tcsh -v -n ~/.cshrc'' to verify the syntax (you may need to temporarily add a # in front of the line which reads if ($?prompt) exit. The most frequent errors involve improper line continuations (from cutting and pasting) and the lack of a properly matched quote (' or ") and parentheses.
- Your path (which determines the programs that you can execute
without giving the full location of the executable file).
- X-Window managers:
The ``look and feel'' of your account is controlled by various files associated with the startup of your X Windows session.
- ~/.xsession controls what windows are initially
available at login and their layout. Diagnostic
output is sent to the file ~/.xsession-errors.
Be very careful when editing this file. Only the last entry should not have an ampersand (&) after it. This allows for logout on quitting the window manager.
- ~/.Xdefaults sets user-based customizations
of the X windows applications
- ~/.ctwmrc controls the colors, menus, borders,
number of virtual windows available under the ctwm window
manager (the default window manager for Duke Statistics). If this
file is absent, your account will use the default system
configuration (see below for locations).
- ~/.twmrc controls the the twm and ctwm window
managers. It is also maintained at the system-level by default.
If you would like to change the behavior of the window manager, copy the system-wide file (see below) to your home directory and edit as desired. Before doing this, it behooves you to read the man page for the window manager (e.g., ``man ctwm'') and understand what you are doing. A typo may leave your window manager unusable.
The default configuration file locations are:
- ctwm
- Global /usr/local/lib/ctwm/system.ctwmrc
- Note. This file contains hints on how to proceed with customizations without missing out on global info (e.g., host pull-down menus).
- twm
- FreeBSD /usr/X11R6/lib/X11/twm/system.twmrc
- Digital Unix /usr/lib/X11/twm/system.twmrc
If you happen to create an unusable .xsession file or .ctwmrc file, you may still login via a ``failsafe'' mode by typing and F1 (on most machines or CTRL plus RETURN) after your password at the login screen. Once in this mode, you may use a simple editor (vi, pico, or ``emacs -nw'') to rectify the problem.
- ctwm
- ~/.xsession controls what windows are initially
available at login and their layout. Diagnostic
output is sent to the file ~/.xsession-errors.
