Reference Card Unix
Reference Card Unix
For help, contact the HelpDesk: Phone: 348-2435 E-mail: Help.Desk@ua.edu Web: helpdesk.ua.edu Open 8:00 a.m. - 4:45 p.m. Monday - Friday.
Directories
mkdir directory-name make a new directory rmdir directory-name remove a directory (must be empty of all files) cd directory-name change to a directory cd change to your home directory cd .. change to directory one level up ~ . .. / home directory current directory directory one level back entire filesystem root
Getting Started
UNIX commands are used while connected directly to bama through an SSH or terminal interface. Our recommended programs include SSH Security Shell, TeraTerm with SSH, and Macintosh Terminal. More information is available online at ncs.ua.edu. Commands are entered by giving the command name, any desired options, then any filenames or directory names all separated by spaces. When enter is pressed, the command is processed by bama. UNIX is case sensitive. All UNIX commands are lower-case. Type commands demonstrated on this reference card exactly as shown. File and directory names can be mixed-case but always must be typed exactly as named. For complete lists of options use the man command.
Printing
To select a new printer: LPDEST printername export LPDEST lp option filename print file cancel printjob cancel print job in queue. Get printjob name from lp command result enscript options filename format file for PostScript printer lpstat p printername check printer queue. Use printername all to see full list.
Scripting
Programs can be be scripted using the any of the following. Login startup files are in ( ). /bin/ksh (.profile, .kshrc [if setup]) /bin/sh (.profile) /usr/local/bin/bash (.bash_login, .bash_profile, .profile) /bin/csh (.login, .chsrc) /usr/local/bin/tcsh (.login, .chsrc) /usr/local/bin/perl /usr/local/bin/wish8.0 /usr/local/bin/rexx
Compilers
f77 options filename.f FORTRAN77 (Sun) f90 options filename.f90 FORTRAN90 (Sun) cc options filename.c C (Sun) CC options filename.cc C++ (Sun) gcc options filename.c C (gnu) g++ options filename.cc C++ (gnu) pc options filename.p Pascal (Sun) Options are compiler-specific. Execute the compiled binary with ./binary-name If not specified, binary will be called a.out
Shell Commands
history show previously-run commands escape (repeat k or j) move up or down through history of commands. Press enter to re-execute (ksh only). alias newcommand command-string create new command that runs command-string, including all of the given options command > outputfile command s output replaces outputfile (>> will append) command < inputfile command s input comes from inputfile command1 | command2 command1s output becomes command2 s input
X-Windows
. enableX sets user DISPLAY. Xwindows server must be enabled on PC netscape start Netscape Navigator textedit filename edit filename jws Java Workshop programming suite ws Sun Workshop programming and debugging suite
2000-2003, The University of Alabama. The information included here is for The University of Alabama central computing facility as it was configured on the document date. It may or may not apply to other Unix systems.