UNIX SIG Notes By Christopher J. Fearnley Cruising the Information Superhighway with a Unix Shell Account Many experienced Internauts consider the Unix shell account to be one of the fastest and most powerful interfaces to the Internet's vast resources. But it can be a little difficult to get started. So in this month's article I want to inform PACS' members of some of the basic concepts and commands for using a Unix account to manage Cyberspace. I have been using a shell account on Net Access for the past couple of months. My presentation will be somewhat biased toward their service, but should be extendable to any Internet provider who offers shell accounts. The basic Internet services can be accessed with simple commands. I will list some Internet services, describe them, explain the command and point you to the on-line help (sometimes I'll even throw in an example). First, NetNews is the Internet's BBS. There are over 4,000 newsgroups available. Newsgroups run the full gamut from the profound to the profane. I highly recommend reading at least news.announce.newusers and news.answers to learn more about USENET and NetNews. There are many available interfaces to NetNews: tin, trn and rn are among the most popular. In Unix we refer to the on-line manual pages by "tin(1)", "trn(1)", and "rn(1)" which simply means that one can type "man 1 tin" or even more simply "man tin" to read up on how tin works. All three of these newsreader offer help with the "h" key. I recommend trying tin: it's very nice and by editing the ~/.tin/tinrc file (you may use the command "pico ~/.tin/tinrc" to edit this file) it can be configured almost anyway you want. The other basic Internet service that everyone uses is mail. The two main mailreaders under Unix are pine and elm. pine may be nicer for newusers, but elm is also very nice and will be more familiar to those of us who have been using the PACS Multi-SIG BBS. elm can be configured by editing the ~/.elm/elmrc file. pine is configured best from one of its internal menus (if you hate menus, avoid pine!). See elm(1) and pine(1) for more info. I have already mentioned editing some configuration files. You will need an editor to post news and compose e-mail. There are many powerful editors available under Unix: vi, vim, vile, emacs, jove, jed, joe, and pico. Only vim, emacs and pico are currently available at Net Access (you could use "archie jove" to find jove, for example, and compile it yourself, however). pico is a brain-dead, but functional editor. emacs is very, very powerful; you get help by typing C-h (ctrl + h). vim is Vi IMproved. vi is the standard editor available on every Unix system. It is very powerful (though not as flexible as emacs). You can get on-line help within vim by typing :help. More vim help is available on Net Access in /usr/local/doc in the files reference.doc and vim-tutorial. There are good books on both vi and emacs at any bookstore (the O'Reilly books come to mind as excellent tutorials). Check out vi(1), vim(1), and pico(1) for more info. Now to throw some more Internet-related programs at you. First, irc(1) which is usually just shorthand for the newer ircII(1). This is the Internet Relay Chat which is a global multi-user chat session. archie(1) searches for programs available for ftp on the net. gopher(1) is a menu interface to much of the Internet (generally you need to know the name of a good gopher server to accomplish much). For starters you might try "gopher veronica.scs.unr.edu". The two major ftp (file transfer protocol) apps are ftp(1), ncftp(1). ncftp is particularly nice. ftp lets you download files from around the Internet. Don't forget to choose "binary" mode before downloading programs! Both of these programs offer help with the "help" keyword. The above should help you access the services offered by the Internet. But to really take advantage of a Unix shell account you will want to use the tools available under the Unix system. First, you will need to navigate the filesystem. The Unix filesystem is hierarchical. It is similar to DOS' except one uses "/" instead of "\" to separate directory names. ls(1) lists files in the current directory. ls -a lists all files (even the "hidden" ones). cd(1) is the command to change directories. mkdir(1) makes a new directory and rmdir(1) removes a directory. rm(1) deletes file(s) and mv(1) moves (or renames) them (also works on directories). less(1) and more(1) are file browsers. grep(1) is a file searcher. find(1) is a file finder. gzip(1) and (un)compress(1) are file compression tools. tar(1) is a file archiving tool. Many other tools are available and any good book on Unix will cover them. Since the Unix shell provides some wonderful features, I must discuss these! There are many shells available: sh(1), bash(1), csh(1), tcsh(1), ksh(1), zsh(1) and others. Basically the shell interprets your command and arranges for Unix to run it. You can change your shell with the "chsh bash" command for example (this will not take effect until your next login -- you can test a new shell with, e.g., "bash -i" to get an interactive bash shell). bash, tcsh and ksh are modern shells and very full-featured. sh is the original shell and is not recommended for interactive use. csh was an improvement over sh for interactive use. I like bash because it is very full-featured (it combines most of the csh and sh features and adds some new ones too). bash supports a help function (just type "help" from the command line). One of the most useful features that most shells support is job control. Most jobs (programs) can be suspended with ^Z, use "fg" to bring the job back into the foreground and "bg" to continue running the command in the background. The "jobs" command will list your jobs, useful if you have more than one. bash and tcsh (at least) support command and filename completion with TAB or ^I. Both also support command history which can be navigated with the arrow keys and edited. That should be enough to get you started cruising on the Information Superhighway with a Unix shell account. There are many more commands and each command mentioned has numerous command-line options that modify its behavior (so reading those man pages can take awhile!). You can get more help from the newsgroup comp.unix.questions or its FAQ located at rtfm.mit.edu:/pub/usenet-by-group/comp.unix.questions (which is a syntax accepted by ncftp to bring you directly to the directory in question). The latest news on the Linux front Michael K. Johnson (editor of Linux Journal) and others estimate that there are over 2 million installed Linux systems worldwide. This means that Linux is just behind the Mac as the third most popular OS on the market today. Linus announced yet another code freeze for the 1.2 kernel (we are at version 1.1.85 at the time of this writing). Unfortunately, no sooner had the announcement gone out but numerous people submitted patches to him that they were holding onto. So the code freeze barely got started when new features were added. Maybe we will see 1.2 by the February meeting, maybe we will have a much more featureful kernel several months from now. Who can predict the march of free software? Or even commercial software! Next month's meeting will be Q & A. We really need a system to demo Linux on. Anyone have a laptop or desktop you can demo your system on? For the March festival it would be nice to have a Linux booth. Anyone see anyway to set this up? Some people said they would like to go to the noon demo of PACS' IBM SIG's new Internet connection with Net Access. I will stay with the Unix SIG for the second hour if there is interest in continuing any discussions, but for the sake of argument consider the Unix SIG to only run from 11 am - noon this month.