Basics of Linux (how to move around, deal with files,
and get help)
by Jonathan Arehart
When a Linux system finishes booting and starting services, it then gives you the opportunity to log in and begin working. The login system is only slightly similar to the login system you may have seen in Windows 95 or 98. It is more analagous to that of Windows NT, in that each user has different priviledges on the system. The user root, which we will be using today, is the superuser similar to Administrator in Windows NT. The main differences that the login process has in Linux over Windows NT are that more than one person can connect to the machine and do work at the same time and that such logins do not have to be done locally (they can be done over the network).
To actually log in, type root as the username and then enter the password you set during the install. You should then get a prompt similar to "[root@teach root]$". The prompt indicates which user you are, which machine you have connected to, and which directory you're in. The most useful of this information is the current directory.
If you have used MS-DOS, either on its own, or the versions included with Windows 95, 98, or NT, then you will notice similarities as we start moving around in Linux. There are several commands that have very close equivalents. They are listed below:
|del or erase||rm|
|mkdir or md||mkdir|
A few words about these before we move on... By default ls gives little more information about the files in a directory than their names. It can be made to give more information with switches that are documented in the man page for ls (see the section on getting help below for more on man pages). cd, mkdir, cp, and rmdir are quite close. rm is different in that, unless you are root, it does not ask for confirmation. However, you can force it to (or not to) ask for confirmation. mv is interesting in that it acts like both move and rename. To rename a file, you mv it from its old name to its new one.
Other than the basic commands I've already mentioned, you'll need a way to edit text files so that you can finish building and configuring your firewall. We are going to use a program called pico for editing. I like pico because it is small, and because it has most of the help information I ever need on screen at all times.
There are several ways to get help. The primary one is the man (or manual page) command. For instance if I wanted to know more about the options I can use with ls, I would type man ls. There are a few things about the manual pages that are annoying. First, if you don't know the name of a command they're not much help. In that case, man -k keyword might work. Also, getting out of a manual page can be confusing. The two ways I know of are to press "q" on the keyboard, or to use "control-c".
There are serveral other methods that might also work. First is the whatis command. It checks to see if it has a description for the command who's name you feed it. whatis ls should tell you what ls does. Also, quite often commands will have some built-in help. For example cp --help should give you a screenfull of information about the options cp has. (One note about man -k and whatis: the software that updates the whatis database and manual pages keyword index is run one a day or week, so they will eventually be run by your Linux system, even if man -k and whatis don't appear to work initially. You can force them to run with the makewhatis and updatedb commands.
Another place to look for help is in the /usr/doc directory on your system. It has documentation (readme files, manuals, etc.) for many of the packages installed by the Red Hat installer (and from any rpm files you install by hand later). It also has copies of many of the Linux HOWTOs. The HOWTOs are available online as well, so the copies on your system may be a bit out of date.
There are also online resources that may be of help. They are:
|http://metalab.unc.edu/mdw/||The Linux Documentation Project|
|http://www.geek-girl.com/unix.html||The Unix Reference Desk|
|http://www.ctlug.org/||The Central Texas Linux Users Group|
|http://locutus.csres.utexas.edu/siglinux/||The University of Texas ACM's Special Interest Group for Linux|
|http://www.austinlug.org/||The Austin Linux Group|