Basic info about Sun machines
- You may use the Sun lab pretty much whenever the building is open.
This is an unusual privilege that exists only because our community is
respectful and cooperative.
- You may eat or drink in the lab. Don't spill anything on the machines.
- When logging in remotely use SSH. Use Secure File Transfer to
transfer files.
- Machines are multi-user; what you do has an effect on others, and vice-versa
- Never unplug the machines or remove the internet connection.
If there's a problem, contact the system administrator Ivan Fetch
(x13299, JGH 106).
- You may lock the workstations for up to 5-10 minutes.
To lock a workstation, right click on the desktop, and select lock.
- If you find someone logged in to an unattended machine, just move to
another machine, if possible.
- Keep your files in an organized directory structure. Get rid of files
that you don't need (disk space is a shared resource)
- If you're running a computationally intensive program, run it on a
machine that is not being heavily used, and run it with
nice
- This page has a list of the names of the Sun lab machines:
Sunlab hardware.
Unix commands - Accounts and users
- Use up-arrow to save yourself from re-typing your previous commands
users
- lists usernames of those currently logged in
finger
- lists names and usernames of those logged in
who
- similar to finger
, different format
groups
- lists the groups you belong to
whoami
- gives username of person logged in in this shell
passwd
- change your passwword
logout
- logs you out
exit
- terminates a shell that is not a login shell
.plan
- create a file called .plan
in your home
directory to give information about yourself to other users
Managing jobs and processes
Ctrl-c
- terminates whatever program is running
Ctrl-z
- suspends whatever program is running
bg
- restarts last suspended job, runs it in the background
anycommand &
- runs the program anyprogram
in
the background
jobs
- lists all jobs that you have running in this shell
fg %n
- brings job number n
into the foreground
kill %n
- terminates job number n
uptime
- tells how long machine has been running, and how loaded the CPU is
top
- shows all processes on machine in order of CPU usage
ps
- lists all processes associated with this shell
ps -u yourusername
- lists all processes you are running on this machine
kill n
- terminates process with process id (PID) number n
nice anycommand
- runs anycommand
with a lowered
priority
renice n pid-no
- changes with PID number pid-no to
a priority level of n
nohup anycommand
- runs anycommand
with no associated terminal
batch
- run a command without an associated shell
Managing files
ls [-al] [filename]
- if no arguments,
lists the files in the
working directory, if filename is a directory,
it lists the files in that directory. -a shows all
files including hidden files, -l gives a long listing
-
mkdir dirname
- creates a directory
cd [directoryname]
- changes present working directory
to directoryname. If directoryname is omitted, it changes to home directory
-
pwd
- display the present working directory
mv source destination
- moves file "source" to
"destination". If
destination is an existing directory, it moves
source to that directory, else it renames source
cp source destination
- copies file "source" to "destination". If
destination is an existing directory, it copies
the file to that directory, keeping the same
file name.
Otherwise, it copies the file to the current
directory and gives it the name "destination"
rm filename
- deletes the file "filename"
- A couple of useful hidden files:
Each directory has two special hidden files called "." and ".."
The . directory refers to the current directory, and .. refers to the
directory one level above this one. For example, if my present
directory is ~ftl/mystuff, then:
cp ../foo .
copies the file ~ftl/foo
to ~ftl/mystuff/foo
Note that some of the above commands have additional flags not described
here. See the manual pages for more information.
Finding out about unfamiliar commands
man name
- displays the manual page for the command "name"
apropos keyword
- displays a synopsis of commands relating
to "keyword"
Reading email
There are lots of options!
- Use the UNIX program "pine". (Just type "pine" at the prompt)
It has a good visual interface, follow the menus.
- Messages can be saved and organized in folders - please do this
rather than leaving messages in your inbox, which is stored in
a shared location with limited space.
- You can forward your mail from another UNIX system to this one.
(or from this system to another machine). Create a file called
".forward" in your home directory. In this file, put the email
address you want to forward to.
- You can use DU Webmail - Go to http://webmail.du.edu and select
"imap.cs.du.edu" as the mail server, and enter your Math&CS Unix username
and password. While logged in to Webmail, do not access your
inbox via other mail software - you could corrupt your inbox.
- For more options on reading email, consult http://www.cs.du.edu/support/email/