Bryn Mawr Computing Do IT  
 
Computing Services Home
 
* Do IT
* Use IT
* Learn IT
 
* News
* Policies
* Staff List
* About Us
* Contact the Help Desk
 
 
 Learn IT : Software Documentation : Unix-Tutorial  
  Unix OS

Connecting

Messages
SSh File System Commands
E-mail Creating Files
the Shell Creating Plans
Getting Help Other Useful Commands

UNIX is an operating system. Unlike MacOS and Windows, UNIX is a text-based operating system.  Users input commands from a terminal.  UNIX allows many people to use the same computer simultaneously. It’s often run on servers, which are powerful computers that allow other computers to contact it for various purposes.

Our email and network file storage server, Ada (ada.brynmawr.edu), is a UNIX server. When you login to Ada to change your password or check your email, you are accessing your UNIX account. 

This document will provide you with some information about UNIX, and the basic commands you need to know to effectively operate in a UNIX environment.

 

Connecting to Ada

To use a UNIX system, the first thing you must do is establish a connection.  We use the SSh protocol to connect to ada.

Top

What is SSh?

SSh stands for Secure Shell.  Secure means that all of the data sent or received through the shell is encrypted.

Top



How Do I Use It?

PC

All college-owned PCs come with a program called PuTTY, a Unix terminal. PuTTY utilizes the SSh protocol to connect to servers. To use PuTTY, first locate the start menu at the bottom right-hand corner of the screen. Click on it once to display everything in the menu. Point to the Network Tools folder at the top of the menu. Click on the PuTTY icon to start the program. This window will appear:




Locate the ada in the saved sessions section in the middle of the window. Click ada and then click Load. Then click the Open button at the bottom of the window. When the terminal window appears, type your e-mail username and press Enter.  Then type your e-mail password and press enter. You are now logged into ada.

If you want to download PuTTY for use on your personal computer, you can do so here.

Top


MacOS X

All Apple Computers running OS X come with a preloaded program called
Terminal that can be used to establish connections  to a server. First, locate
the dock at the bottom of the screen. Then locate the Terminal application icon in the dock.
Click on the terminal application once to launch. A window like this should appear:






Type ssh username@brynmawr.edu, where username is your e-mail username. Then press enter.  At the Password prompt, type your e-mail password and press enter. You are now logged in on the ada server.

When your username and password are accepted by the system, you will see a prompt. For most Ada users, the prompt will be ada> .

The prompt is the line where commands are entered. If you were going to change your password, for example, it is at this prompt where you would type the change password command, passwd. Remember that you always need to press Enter (or Return)after entering a command so the system can process it.

Top

 

How Do I Check my E-Mail?

There are some advantages to checking your e-mail through our UNIX system.  For instance, UNIX programs are text-only, so there is significantly less load time than web-based clients or clients such as Eudora and Thunderbird.  Since UNIX systems do not execute attachments, there is no risk of infecting your computer with a virus. 

Please note that you are logged in directly to the server, anything you move, delete or rename is permanent, so be careful. 

First, you must select a program to use.  We have three mail clients pre-installed for general use on ada.

  • Pine: Distributed and maintained by the University of Washington, Pine is a simple, user-friendly e-mail client that is best for beginners.  Pine uses pico to edit emails.
  • Elm: Similar to pine in interface, Elm uses emacs as its default editor.
  • Mutt: Highly customizable, powerful mail client.  Though similar to both elm and pine, mutt is in a league of its own. The default editor is vi. Not for the novice user.

Top

Shells

There are a number of different UNIX command interpreters (called shells). The shell handles your input to the system. Each shell operates in its own unique way. The default shell on Ada is the C shell. To find out what shell you are running, type echo $SHELL at the prompt. If the system responds by printing /usr/bin/shell, where shell is the name of the shell you are using.  For example, if the terminal responds with /usr/bin/csh then you are using the C Shell.  The C shell is the default shell.

Every user has access to all of the shells that are running on ada.  In addition to the C shell, we have the Bourne shell (sh), the Korn shell (ksh), bash (bash), and an enhanced C shell (tcsh).  To change your shell, simply type the abbreviation of the shell you want at the prompt.

ada>bash

bash-2.05$

 

Each shell uses a series of files which store the users preferences. These files are referred to by the system when you log in. Two commonly used files are the .login and the .cshrc. These files can be edited to suit each user’s preferences. Do not edit these files if you are unsure of what you are doing, as you could delete important instructions and thereby lose access to needed paths.

Top

 

How Do I Get Help?

ada> man

 

The commands:

man -k keyword lists commands relevant to a keyword

man command prints out the manual pages for a command

are helpful; other basic commands are:

cat - concatenates files

vi - text editor

finger - user information lookup program

ls - lists contents of directory

mail - sends and receives mail

passwd - changes login password

sccshelp - views information on the Source Code Control System

tset - sets terminal modes

who - who is on the system

write - writes to another user

You could find programs about mail by the command: man -k mail

and print out the man command documentation via: man mail

You can log out by typing "exit".

 

ada>

 

Short for manual, man is the UNIX help system. Often times cryptic, even to seasoned UNIX users, man provides instructions for using every command on the system. Try to use it every once in a while, when you are looking for information about more advanced commands. Your UNIX skills will get better and you’ll actually understand what you’re reading!

Top

 

Messaging on ada

 

ada>

Message from bmawrter on ada (pts/33) [ Wed Oct 6 13:42:11 2004 ] ...

hi there!

<EOT>

"Eeek! My screen just went crazy! A message just popped up out of nowhere!" What is actually happening is that someone (i.e. another user on the system) is sending messages to you using the write command. This command can be used by users to send messages directly to other people who are logged on the same system. To use it, type write username. Type what you like. When you are finished, press the Control and C keys to stop.

"But how did so-and-so know that I was on the system?" It’s easy to find out who is logged on the system. You can use the w and who commands to get listings of the users currently on the system. The w command will even tell you what they are doing! If you’re looking for a specific person, you can also finger their account. Finger will also help you find people’s usernames. Simply type f followed by whatever information you know.

ada> f bmawrter

Login name: bmawrter           In real life: Mawrter Bryn

Directory: /home/ada/bmawrter  Shell: /bin/csh

On since Oct 5 10:05:44 on pts/33 from guildlab-dhcp117.brynmawr.edu

No unread mail

Project: UNIX

Plan:

Q: How many Unix Support staff does it take to screw in a light bulb?
A: Read the man page!

Top

Filesystem Commands

Just as you might need to on a Mac or PC, you may need to list, create, and remove files and directories in your UNIX account. Here are some simple commands you’ll need to know:

Command

Definition

Usage

pwd Print working directory. System will tell you your absolute path.  ada> pwd

/home/ada/a1/username

ls List files. Use ls –la for more details. ada> ls

Mail/ temp/ email.txt word.doc

more View the contents of a file, without opening or editing the file.  ada> more email.txt

file will scroll by

mv Move or rename. Move a file to another name or location.  ada> mv email.txt oldemail.txt
cp Copy. Copy a file to another name or location.  ada> cp oldemail.txt email.txt
rm Remove. Used to erase a file.  ada> rm email.txt
mkdir Make directory.  ada> mkdir temp
cd Change directory. If typed with no argument, you will be returned to your home directory. Otherwise, use it to get to other directories.
 ada>  cd temp 
rmdir Remove directory. If a directory is not empty prior to removal, use rm –r.  ada> rmdir temp

Top

Creating Files

Creating files in UNIX can be a little tricky. That’s because there are so many ways to do it! Just like there are various word processing programs available for the Mac and the PC, there are many different text editors available in UNIX. You may have already used one of these!

  • pico: Best for beginners. Pico is the default text editor in Pine. All important commands are displayed on-screen.
  • vi: Best for advanced users. vi is the default text editor in mutt. It is also a standard component of any UNIX system.

Top

Creating Plans and Projects

I fingered my friend’s account, and I got all of these neat stuff, like her phone number and quotes. How can I do that?" Very easily!  Simply type:

ada> pico .plan

 

When the pico editor appears, type whatever you wish.  Press Control-X to exit and save.  Similarly, you can add a one-line project file by typing pico .project and following the above instructions.

Top

 

Other Useful Commands

From here, you’re on your own, limited only by your courage to try new things! To get you started, here are a few more commands to pique your interest:

  • alias – this will help you make short, one-word commands out of long commands
  • cal – will display this month’s calendar on the screen
  • clear – will clear the current screen
  • date – will display today’s date and time
  • fg – will restore a backgrounded process; to put a process in the background, press Control-Z
  • grep – will search your files for characters, words, or phrases
  • kill – use the ps command to check your processes; use kill to stop them
  • last – displays previous logins to the system; use it with the –n command or else you’ll get a screenful!
  • ps –will display a list of the current processes your userid is running
  • quota – check your disk quota to make sure you’re not running out of space
  • source – read in whatever file you specify and execute the commands in it

Top

 
  Information Services
Contact Us   |   Bryn Mawr Library   |   Search CS