|
|
||
UNIX is the operating system used on the MHC servers. Telnet and SSH are protocols used to create a connection with the server. Tera Term is one example of a telnet client. PuTTY can be used for both, and a patch is available for Tera Term which allows it to use SSH.
One of the most important things to remember about UNIX is that it was designed for geeks who know what they're doing. That means it assumes you know what you're doing, too, and if you tell it rm thesis.doc it won't ask you if you really want to delete that file, it'll just do it. So make sure you do know what you're doing.
Type see help for more information.
Some UNIX commands are similar to ones that you may be familiar with from MS-DOS, such as cd, but others are completely different. Here is a short list of useful commands:
| mkdir directory | Create a new directory |
| cd directory | Change current working directory - see cd, see changedir |
| ls ls | more | List contents of current directory (pipe to more if the files run over a page) - see ls |
| pico file.ext | Edit a file with the Pico text editor - see pico |
| cp file.ext newfile.ext | Copy a file - see cp, see copy |
| mv file.ext newfile.ext | Rename a file - see mv, see copy |
| rm file.ext | Delete a file - see rm |
| chmod 644 file.ext | Set web permissions for a file - see chmod |
| lynx | Browse the web with Lynx - see lynx |
| finger username | Find out info about a user - see finger |
| who | more w | more | Find out who's logged onto the MHC system - see who |
| telnet axis | Login to axis |
| man | UNIX manual pages |
| stands for 'pipe', and | more lets you see long output more easily by spewing it out one screen at a time (such as with ls and w above).
If you want to know more, there are many lists of commonly used UNIX commands on the web. You can also type see h at the prompt.
Enter see access at the prompt or look at http://www.mtholyoke.edu/lits/network/doc/access.txt.
If you are going to connect to the server from off-campus, please use SSH rather than telnet. SSH is roughly the same as telnet, but it encrypts data, especially your password, so that no one can grab it as it passes from your computer to MHC. It is secure.
First find out the process ID number of the session you want to kill. Type ps at the % prompt to do this. This will list the process ID (PID) and location (TTY). One of these sessions is your current one, so type tty to find out your current location. Kill the other session(s) by entering kill -TERM # # # (where "#" is a PID number).
For more information, type see kill at the prompt.
Locking your session means that no one can do anything with it until it's unlocked. To do this, type lock at the prompt. You will be asked for a key to unlock the session, and then to confirm the key.
By default, the lock program will time out in 15 minutes. You can change this by either specifying the time limit with lock -300 (for 300 minutes) or lock -0, which will lift the limit completely.
If you forget the key, you can sign in and kill the lock process as explained just above.
Type hostdisplay at the prompt and choose the option you want.
If you want to change it to something other than the options offered
there, quit that and type pico .login. Ignore most of the stuff
on this page (if you accidentally change something, you can quit without
saving any changes and start over) and arrow down to the line which starts
with set prompt=. In this line, change what's inside the
double quotation marks to whatever you want. If you want the prompt to still
have the numbers and % sign at the end, leave the \!% bit in.
When you've done making your changes, hit Ctrl-X to quit and
hit Enter to confirm the filename. The new prompt will show up
the next time you login.
You should set your terminal emulation program to send ^H
(Ctrl-H) for the backspace/erase character. This can be done in
Tera Term by clicking on the Setup menu, selecting Keyboard,
and checking Backspace key. Enter see backspace at the
prompt for more information.
MHC has limits, or quotas, to the amount of server space it allows to its users. There are two kinds of quotas, hard and soft. It is possible to exceed the soft quota temporarily, but not the hard quota. Once the soft quota is filled, there is a grace period of a few days; if the usage is not then brought below the soft quota, the soft quota becomes the hard quota, and nothing more can be stored (i.e. no incoming email). Type hquota at the prompt for more information.
Type quota at the prompt on mhc. The numbers in the column
under blocks is how much you have saved (in kilobytes);
quota and limit are, respectively, the soft and
hard quotas.
More information about quotas is at http://www.mtholyoke.edu/lits/tsr/vhelpdesk/networkspaces.shtml#quotas.
What appears as your classwork directory is actually a symbolic link (like a Windows shortcut) to directory on another filesystem. You can see this clearly by entering ls -l or dir at the prompt (in your home, starting directory). You will have a line which looks something like this:
lwrxwrxwrx 1 root student 36 May 13 2000 classwork -> /classwork/users/student/02/lbmelton
The first l means that this entry is a link (d
stands for directory, - for file). (The next 9 characters define
the permissions
of the link.) The last column in the line is the most interesting for us; it
shows the name of the link (classwork) with an arrow to its
target, in my case /classwork/users/student/02/lbmelton. The
target is in a completely different part of the file hierarchy from your home
directory. This is why you can't simply navigate up a level to get back to
home.
You could create a symbolic link back to your home directory, but the simplest way to get back there (for those using a shell) is to type cd $HOME, cd ~, or even simply cd.
If you really want to create that link (perhaps useful when mapping one's
network drive on a PC or Mac), the command is ln -s [target-path]
[link-name]. You can find out the path of your home directory by
typing echo $HOME ($HOME is an environment variable,
and the echo command displays its value). In my case, if I wanted
to call my link "home", I would cd to my classwork directory and then type:
ln -s /classwork/users/student/02/lbmelton home.
There's a handy little utility called leave which will remind you to log out at a specific time. Simply type leave at the prompt, and the program will ask you "When do you have to leave?" Enter an absolute time, without punctuation, in either 12-hour or 24-hour time (for example 530 or 1730). Or you could enter a time interval, for example +45 if you want to leave in 45 minutes. Unix will then check the time periodically and remind you at five minutes before, then one minute before, when time is up, then once a minute for ten more minutes. The last reminder is
You're going to be late! That was the last time I'll tell you. Bye.
Another way to start the program is to enter the time on the command line, for example leave 530 or leave +45.
![]()
Copyright © 2002 Mount Holyoke College. This page created and maintained by Laura Melton. Last modified on February 11, 2002. |