[ Genetics Computer | GCG | Windows 95 | Online Guides | CMMG Home ]
1. INTRODUCTION TO UNIX
UNIX is a computer operating system that allows secure access for
multiple simultaneous users. It allows the sharing of resources
such as files and hardware across a network. The users can connect
to the UNIX computer from anywhere on the network and operate the
computer from a remote location.
You use UNIX commands to instruct the computer to perform actions.
The commands act on some "input". Input is usually something you
type or is a file stored on the computer's hard disk. The result
of the command is some "output". The output is either displayed on
the screen or is saved in a file. Switches are additions to the
UNIX command that change the way it performs its actions.
In general, most things computers do are done with files, so we need
to learn how to do things with files. Files are stored in directories
(or folders) on the hard disk.
NB: UNIX is case sensitive, so you must type lower case or upper case
exactly as indicated for commands and filenames.
In the examples below, the Genetics computer (genetics.wayne.edu)
is assumed to be the the UNIX host for illustrative purposes.
2. TELNET
Telnet is a program that allows you to connect your PC to a UNIX
computer through the network and control programs on the UNIX
computer. Use the telnet program on your PC to connect to the
IP address of the UNIX computer and login with your username and
password.
When you are logged in, you will see the UNIX prompt: genetics%
3. HOME DIRECTORY
When you log in, you are located in a folder on the hard disk
called your home directory. Your home directory is /home/username
(substitute your own username). You are allowed to make changes
to files in your home directory (and subdirectories thereof), but
not in other directories.
4. WHERE AM I? pwd command
To find out the name of the current working directory, type pwd
5. WHAT FILES ARE IN MY DIRECTORY? ls command
To list the files in your directory, type ls
Type ls -l to list the long information about your files.
Type ls -a to list all your files, including hidden ones.
The -l and -a in those lines are "switches" that change the way
the ls command behaves. Most UNIX commands have switches available.
6. REDIRECTING THE OUTPUT TO A FILE greater than symbol
When you typed ls, the results (output) appeared on your screen.
You can save the results to a file instead. Type ls -al > ls.out
That will cause the results of the ls -al command to be saved into a
file called ls.out The ">" (greater than) symbol redirects the output
of the command into the file. If you use 2 greater than symbols like
this: ls -al >> ls.out the output from the ls command is appended
onto the end of the file, saving the already existing data in that
file, if any.
7. HOW CAN I SEE WHAT'S IN A FILE? more command
Use the more command to see the contents of a file: more ls.out
The more command displays the contents of a file one page at a
time. To see more pages (if any) press the space bar.
8. HOW DO I COPY A FILE? cp command
Use the cp command to copy a file: cp ls.out ls.copy
That will make a copy of the ls.out file and name it ls.copy
9. HOW DO I EDIT A FILE? pico command
Use the pico text editor to edit a file: pico ls.copy
Press the Ctrl-X key combination to exit from the pico editor.
10. HOW DO I RENAME A FILE? mv command
Use the mv command to move a file to a new name: mv ls.copy junk
That will rename the ls.copy file to junk
11. HOW DO I DELETE A FILE? rm command
Use the rm command to remove a file: rm junk
That will delete the junk file.
12. HOW DO I CHANGE TO OTHER FOLDERS? cd command
Use the cd command to change directories. To change into my home
directory type cd /home/dwomble To change back to your home
directory, type cd
13. WHAT OTHER UNIX COMMANDS ARE AVAILABLE?
See the file unixcom for a list of simple UNIX commands.
14. HOW CAN I GET HELP WITH UNIX COMMANDS? man command
Type help for a reminder of how to get help. There is ONLINE help for
UNIX commands by typing man command from the genetics% prompt (e.g. type
man ls to get help for the ls command) or get a UNIX guide at the bookstore.
15. TERMINAL TYPE setenv command
Some of the programs such as pine and pico need to know what kind of
terminal you are using. This is usually automatic with NCSA telnet or
when you are dialing in through MichNet. However, if you need to reset
your terminal type, from the genetics% prompt, type: setenv TERM vt100
and press enter.
16. HIDDEN (DOT) FILES
There are several files in your home directory, called dot files, that are
used to configure programs that you use. For example, .cshrc and .login
are read by the system each time you login to Genetics (these are similar to
DOS config.sys and autoexec.bat files), and .pinerc is read by pine each
time you start it up. These files are required, so don't delete them.
However, you may edit these files (carefully!) to customize the way
various programs operate.
17. HOW DO I LOGOUT FROM THE UNIX HOST COMPUTER? exit command
Type exit
18. OTHER WAYS TO CONTROL A UNIX COMPUTER
(Besides typing UNIX commands)
You can use the HYBROW Hypertext Menus and Browser system, or you can
use an X Windows server program on your PC.
[ Genetics Computer | GCG | Windows 95 | Online Guides | CMMG Home ]
Send comments to:
dwomble@genetics.wayne.edu
Copyright © 2003, David D. Womble.