How to Use the Internet and E-Mail

How to Use the Internet and E-Mail

Norman Matloff
University of California at Davis
matloff@heather.cs.ucdavis.edu

January 24, 1999

Contents

1  Network Structure and Access
    1.1  Domains
    1.2  Access
2  Using E-Mail
    2.1  The Best Unix E-Mail Utility
    2.2  Having Accounts on Multiple Machines
    2.3  E-Mail Culture
3  Packing and Compressing Groups of Files (tar, gzip, etc.
4  The Talk Program
5  Usenet
6  Using the Ftp Program
7  Remote Login
8  The World Wide Web
9  On-Line Information Services
    9.1  Web Search Engines
    9.2  On-Line Library Catalogs
A  Faux Windows Programs

1.  Network Structure and Access

The Internet consists of tens of thousands of computers all over the world, linked to each other by phone lines and LAN's (Local Area Networks, consisting of electrical or fiber optical cables) which are active 24 hours a day, every day.

These computers are at universities, companies, government agencies, etc. You can usually guess which one of these three categories a site belongs to, at least for the U.S., by looking at the last part of the network address: `.edu' for eductional institutions, `.com' for commercial sites, `.gov' for government agencies, `.mil' for the military machines, `.org' for nonprofit organizations, etc. Outside the U.S., though, the last part of the address will usually be the country abbreviation, e.g. `.ca' for Canada, `.uk' for England, `.hk' for Hong Kong, etc.

1.1  Domains

A subset of the network in which all the machines are directly linked to each other is called a domain. For example, all Internet machines at UCD form a domain, and thus they all share a .ucdavis.edu suffix in their network addresses. All Computer Science Dept. machines at UCD form a subdomain of that domain; thus all their network addresses have a suffix .cs.ucdavis.edu Similarly, the ACS machines all share a suffix .engr.ucdavis.edu

When you are logged on to one computer and wish to contact another--e.g. send mail, or use talk or ftp (see below)--you may discard the part of the address which the two machines have in common. This is very similar to the fact that when you phone someone who is in your own area code, you don't have to include the area code when you dial.

For example, consider people who may wish to use talk with me. My machine address is heather.cs.ucdavis.edu If someone on the CS Dept. machine ogive wishes to talk to me, he/she would type

   talk matloff@heather
in order to save typing (but typing

   talk matloff@heather.cs.ucdavis.edu
would still work).

If someone on the ACS machine frijoles wanted to talk to me, he/she would type

   talk matloff@heather.cs
Finally, if someone on a non-UCD machine wanted to talk to me, he/she would have to type the full address:

   talk matloff@heather.cs.ucdavis.edu

1.2  Access

You can access the Internet from any computer connected to the network. In turn, you can usually reach such a computer by dialing in from home with your PC and modem.

With an ordinary connection, you use a communications program such as kermit or minicom. If instead you use a SLIP or PPP connection, your PC actually becomes part of the Internet; you do your logins via telnet or rlogin, and can perform other Internet operations such as ``surfing the 'Net.''

What about windows? It certainly would be nice to be connected to the remote machine from more than one window. What can one do here?

Again, if one is running SLIP or PPP from a PC with windows (X11 under Linux, or just Microsoft Windows), one can log in separately multiple times to the remote machine, once from each window.

If you just have an ordinary connection, you can still do some restricted windowing which is quite helpful. This is described in an appendix.

2.  Using E-Mail

Electronic mail (``e-mail'') is a tremendously useful tool, both for computer specialists and for anyone who has access to a computer network. Our department secretaries, for example, use it very extensively, for communicating with faculty and graduate students, setting up appointments for visitors to the department, and so on.

You can use e-mail to: Send messages to your friends, including those at other universities; get help with your coursework from me and the TAs; apply for jobs; send files; etc.

2.1  The Best Unix E-Mail Utility

It is likely that you are already familiar with e-mail, and that on Unix you are using the pine e-mail utility for this. I personally use mutt; it is easy to use, and much more powerful than pine. See my introduction to mutt, at

http://heather.cs.ucdavis.edu/~matloff/mutt.html

2.2  Having Accounts on Multiple Machines

If you do have accounts on multiple machines (which is common), you don't want to have to go to all the machines to read your mail. To avoid this, create a file named .forward in your home directory of all machines except the one on which you wish to read your mail. For example, my main machine is heather.cs.ucdavis.edu so on all other machines on which I have accounts (e.g. the ACS machines), I have the following one-line file in my home directory, named .forward:

   matloff@heather.cs.ucdavis.edu
If someone sends mail to me at a ACS machine, this file will make that mail get forwarded to heather.1

2.3  E-Mail Culture

Since tone of voice does not come through e-mail, a number of special symbols have been developed, the most famous of which is :-) which denotes a smile (turn your head 90 degrees to the left to view it!). There are a number of others, e.g. :-( for a frown.

As a courtesy to the person whom you are sending the e-mail, when you are typing an e-mail message, PLEASE hit the Enter key every time you want to make a new line. Do NOT simply allow the cursor to automatically go to the next line, because your message will then have very long lines which make it very difficult for the recipient to use > marks in replying to you.

3.  Packing and Compressing Groups of Files (tar, gzip, etc.

If you have a group of files which you want to transfer from one machine to another through the network, it is easier to pack them all into one big file, transfer that one file, and then unpack at the other machine.

On Unix systems, the most commonly used pack/unpack program is tar. One uses the c command to pack, and the x command to unpack. For example, suppose at Machine 1 I have files A, B and C, and I wish to transfer them to Machine 2. I can do so as follows. On Machine 1, I type

   tar cf g.tar A B C
The c option means I am creating a tar-file, while the f says that the next item on my command line will be the tar-file name. So, I am creating a tar-file named g.tar from the files A, B and C.

I can now transfer the single file g.tar to Machine 2 (details below). After I do that, I can type

   tar xf g.tar
at Machine 2, to extract all the files from g.tar--and now the files A, B and C will be on Machine 2!

By the way, if say, B had been a subdirectory, then the g.tar file would also include all the files within B, and the B subdirectory and its files would then be created by the unpacking at Machine 2.

When you unpack a tar-file, in some cases you should use the p option, e.g. as

   tar xpf g.tar 
This preserves the original file permissions.

In many cases, a tar-file will also be compressed, both to reduce network transfer time and to save space on the disk. On Unix machines, this compression is usually done with the compress program or the gzip program. For instance, if in the example above I type

   compress g.tar
the file g.tar will be deleted, and a new, smaller file g.tar.Z will take its place. To retrieve the original file, I would type

   uncompress g.tar.Z
Similarly, if I use gzip, the compressed file will have a .gz suffix added to its name, and I can uncompress using the program gunzip.

Programs for DOS/Windows are generally bundled and compressed using the zip program (not gzip). To use them, you will need the unzip program, available in the zip subdirectory of the msdos directory at most ftp archive sites described below (e.g. as the file unz512x3.exe).

4.  The Talk Program

You can have an interactive discussion with other people who are currently logged in at any computer in the Internet world, no matter how far away they are.2 To talk to anyone, simply type `talk' followed by his/her network address. You will see your screen split in two pieces, one showing what you type and the other showing what the other person types. When you want to end your conversation, just type control-c.

Of course, the person must be logged on at the other machine, and currently using that machine (they may be logged on but still not using the machine; e.g. I am logged on to my office machine, Heather, constantly, even though I may not be using it).

5.  Usenet

This is an ``electronic bulletin board'' of tens of thousands of Internet sites, with ``newsgroups'' (i.e., subject areas) on hundreds of subjects, e.g. politics, sports, cooking, music and so on.

You can also find jobs through Usenet, both in the national newsgroup misc.jobs.offered, and in the UCD newsgroup ucd.cs.jobs

To get involved with Usenet, you will need to choose a ``news reader'' program. The most famous one is rn, but much nicer ones exist, such as tin. To get started, simply type `rn' or `tin' at the Unix shell prompt. There is excellent on-line help provided.

I strongly recommend that your first-time use by with rn but that you use tin for all your subsequent times. The reason for this is that rn will automatically include all newsgroups for you. That way you can get an idea of which ones exist, by simply using an editor, e.g. vi, to inspect your .newsrc file in your home directory. But after that first usage, I suggest you use tin from then on.

6.  Using the Ftp Program

The ftp program is very nice for transferring files from one machine to another. If you are on Machine X, you can use ftp to connect to Machine Y (as long as both are on the Internet), and then use the `put' command to copy files from X to Y, and the `get' command to copy files from Y to X.

One really nice usage of ftp is anonymous ftp. Here you log in to sites all over the world which are open to the public. You log in under the username `ftp', and just send your e-mail address as the password. You do not need an account on the machine at that site.

You can use anonymous ftp to get access to various databases, and to get a lot of public-domain (i.e. freely copyable) software. Literally thousands of free programs are available. (Almost all of the Unix programs are completely free, and about half of the DOS/Windows programs are completely free, with the other half being ``shareware.'' The latter term means the authors asks for a small donation.) For example, one of the most complete sites is wuarchive.wustl.edu at Washington University at St. Louis. Another one which has basically the same stuff (but sometimes is less busy than the Wash. U. site) is rigel.acs.oakland.edu

To use ftp, merely type

   ftp site_address
Commands like cd and ls work pretty much like their counterparts in Unix. One obtains files using the get command, and places files at the remote site using put.3

You can also use World Wide Web browser programs, such as lynx to do anonmyous ftp. In fact, you may find this easier and more convenient than using ftp! (See details below.)

At most anonymous ftp sites, the goodies are in the directory `pub' and its subdirectories (the Wash. U. site is an exception; in this case, the stuff is in the directory `mirrors'). Directories typically include a file whose name is something like `000.index.txt', which describes all the files in that directory.

When you first log in to the ftp site, type `bin', to set binary mode, i.e. 8-bit-character mode, since many of the files consist of 8-bit characters. (And it won't hurt, other than in slower transfer speed, if the file I get is 7-bit ASCII.)

By the way, the biggest wealth of free Unix programs are those for X11 windows.

7.  Remote Login

If you are logged in to one machine, and wish to log in to another from the first machine (e.g. in one window), just type `rlogin', followed by the network address.

8.  The World Wide Web

WWW sites are very much like ftp archive sites, but with a menu-driven interface. These are great places at which to gather information of all kinds, and the number of sites is mushrooming.

To access a World Wide Web site, use a
bf browser program, such as
bf lynx or
bf netscape. The latter can only be used on X11 or other graphics servers.

For example, the San Francisco Chronicle and San Francisco Examiner) are available on the Internet! Simply type

   lynx http://sfgate.com
The fields following ``lynx'' form the
bf Uniform Resource Locator (URL) for the item you want. Here is a short explanation of the fields: We are saying that we wish to use the
bf http file-transfer protocol, rather than, say ftp; the Internet address is sfgate.com; and the file we wish to access at that address is /new/schron/index.cgi.

You can get an introduction to the usage of browsers at

my brief tutorial at

http://heather.cs.ucdavis.edu/~matloff/WebTutor.html
Of course, WWW offers much, much more than just newspapers. The UCD site offers class schedules, student information, and so on. Some other sites are more fun, e.g. providing lyrics to popular songs.

Note that when you access one WWW site, it will often lead you to other sites, automatically as part of the service you ask for.

WWW also provides a very convenient way to browse through an anonymous ftp site. You could, for instance, access the Oakland University ftp site as follows:

 
   lynx ftp://rigel.acs.oakland.edu

(Note the `ftp' in place of `http'.) This forms a much more convenient way to browse through the ftp site than does the ftp program. You can also use it to download text files which you find at the site.

9.  On-Line Information Services

9.1  Web Search Engines

If you would like to find some information on the Web but don't know where to look, a search engine might help you find it. For example, see the Starting Point search engine, at

http://www.stpt.com
Try just plugging in one or more keywords related to the information you are seeking.

9.2  On-Line Library Catalogs

You can access a number of them over the network. For example, the UC-systemwide catalog is called Melvyl, which you can access by typing

   telnet melvyl.ucop.edu
Once you are logged in, on-line help is available.

Melvyl also offers Access to a number of other university libraries, e.g. Stanford's,

Note that Melvyl is much more than a card catalog. For example, its MAGS section contains references to articles in news-analysis magazines and professional journals, and often contains their complete texts!

Melvyl even offers an up-to-the-minute weather forecast.

Again, on-line help is available, and is generally clear. By the way, note particularly the CAPTURE command. This is used to tell Melvyl not to show one screenful at a time, but instead to send you the entire item. It presumes that you are using the Unix
bf script program (or equivalent) to record everything which appears on the screen into a file. The file can later be read at leisure.

A.  Faux Windows Programs

If you access a remote machine via just a single window, you still can get a limited windowing capability from some very useful programs, screen and splitvt. The former is available from the gnu software site,

ftp://prep.ai.mit.edu/pub/gnu
The latter should be accessible via archie (the author was a UC Davis student). Type

archie -c splitvt
To use screen, simply type `screen' at the Unix prompt. That will result in creation of the first window. Hit ctrl-a ctrl-c for each additional window you want. If you have, say, two windows, it's like being logged on from two different terminals at once. Use ctrl-a ctrl-a to go from one window to the other. Use ctrl-a d to temporarily exit screen (note that even if you then exit your original login shell, and even turn off your terminal or PC, you still will be logged on in the windows). To permanently exit, just exit (``log off'') each window. You can also do ``cut and paste'' operations, to copy text from one window to another; please see the program manual for usage (very easy).

Screen's drawback is that each window is full-screen sized, so you can't see more than one window at a time. Splitvt allows you to have two half-windows simultaneously on the screen, very nice. To use splitvt, simply type `splitvt' at the Unix prompt. Hit ctrl-w to toggle between windows, ctrl-o q to exit.


Footnotes:

1 Since all the ACS machines share a common file system, I need to set up such a file on only one of them.

2 Exceptions: Some sites disallow this. Also, some machines are incompatible with each other for talk.

3 One can transfer multiple files with a single command, by using mget or mput. See ftp's on-line help for this.


File translated from TEX by TTH, version 1.1.