After installation, when you restart your machine,
everything works fine but you look puzzled! All you get on your screen is a little $ sign
in one corner. All the services are installed and running, and unless you start up X
Windows or any other application that’s all you are going to see. If you are familiar
with DOS or Windows you can start exploring the system. Assuming that you did a standard
installation, the shell that you will be using is bash, the equivalent of command.com.
Much like DOS, you now have a host of internal and external commands. Now, lets see how to
display the files on the system, get help, and read documentation.
To see directory listing, Linux has the familiar dir
command for users who have been working on DOS. However, the actual command is ls.
Filenames in Linux don’t have to conform to 8.3
format. In fact, filenames can be really long–up to 255 chars. Also, there are no
standard extensions to indicate file types like BAT, EXE, COM, and so on. Fortunately,
Linux has a nice color-coded directory display which shows a ‘*’ at the end of
executable files.
Linux has symbolic links, similar to shortcuts in Win 95.
Another important thing to remember about files is that they have permissions associated
with them. Since Linux is a multi-user system, different users on the system have personal
files which are secured by a password. So all the files are not accessible to all users.
Everyone can see only what they are authorised to. All files have both an ownership and a
permission, which control their accessibility.
In linux HELP can be availed just as in DOS version 5.0 and
above. Type help at the $ prompt to get help about the bash shell. This
displays all the internal commands. For help on a specific command use the man command.
In Unix, man refers to the online manuals, which gets you extensive help including
full syntax, options and switches, and in most cases examples.
This should be enough to get you started. Reading some
documentation at this stage would be a good idea. Recommended reading, at this point would
be Matt Walsh’s Getting started and Installation guide or Larry Greenfield’s
Linux User Guide.
Don’t hesitate in experimenting with the system, but
be aware of one fact–unlike a DOS machine, a Unix machine needs to be shut down in a
proper fashion. Similar to what is done in Win 95 or NT. To shut down, run the halt
command or even simpler, CTRL-ALT-DEL. This will force the system to do a proper shutdown,
which is essential for multi-user systems.
Essential commands
Lets take a look at some essential commands. The table
shows a comparison between DOS and Linux for some essential commands.
The PC Quest update script has several aliases
defined, which map commands to familiar names/syntax, for instance, dir, del, ren, cls,
nc, and win have all been aliased appropriately.
Now that the things are running fine, you need to make sure
that they continue to do so. Linux is a multi-user system, which makes it very convenient
to monitor tasks. Even if your machine is a standalone desktop, in character mode, you get
a minimum of six virtual consoles. To switch between these consoles, you use the ALT-Fn
where n=1-6. You can work on more than one console at a time. If you run X Windows, then
you can launch as many shell windows as you want.
If your installation procedure went as planned, then there
would be several services already running. To quickly check what is running use the
command ps (process status). This lists out all the processes that are currently
running, over which you have control at that time. To see more processes, you need to use
the option ps -a. There is also a program called top which does something
similar except that it does it on a continuous basis. The best thing to do with top is to
run it in either a separate window if you are running X Windows, or run it in a separate
virtual console. The top program shows much more information, including number of users,
load average, and memory usage.
You may also need to kill some processes at some
point of time. This can be done by noting down the process ID (PID) and then issuing the
command kill PID.
Monitoring programs like who and w show the
number of users online. To monitor network traffic you can use the netwatch
program. Netwatch is not installed by default but is easily available from several ftp
sites on the Net.
The system should just run fine now. However, in case, you
get really stuck, use CTRL-ALT-DEL. Also in case could not shut down in a proper manner,
then the next time the system boots up, it will complain and will automatically run a
program fsck which is the equivalent of scandisk.
Non-DOS commands
There are several commands that don’t have DOS
equivalents, but are required when you get started. All commands related to multi-user
capabilities have no DOS equivalents. For instance, file permissions these are controlled
by the program chmod. Permissions have to be granted at three levels, first for the
owner, then for a group, and finally for the world. The permissions include three
different aspects, read, write, and execute (rwx). Apart from protecting your files, the
chmod program is needed to make files executable. To change the ownership on a file, use
the chown command.
Apart from being multi-user, Linux is multi-tasking. At the
$ prompt one can type in several commands separated by semicolons and all of them will
run.
Of course, using the virtual consoles is a better idea than
just multiple commands on a single line. One can also run a job and send it into the
background using the fg and bg command.
If you remember 4DOS, the enhancements to command.com,
then you will appreciate the bash shell. You can repeat your commands by pressing the
cursor up and down. Another one is the TAB key for filename completion—type the first
few characters of a filename and complete it by hitting the TAB key.
The cd command brings you back to your home
directory from wherever you are, cd – will take you back to the previous
directory that you were in.
You can see all the boot-up messages, which just scroll by,
by using the shift-pgup to scroll back a couple of screen fulls at a time. Shift-pgup can
also be used to look at the output of other programs.
Sometimes you may get a screenfull of junk, when you cat
a binary file. You don’t have to quit and reboot your system, all you need to do
is reset the console. This can be done either by blind typing the word reset and
pressing ENTER or by the following character sequence CTRL-V Esc c ENTER.
Documentation
Linux documentation far supersedes that of most commercial
software. It has the entire manual of the commercial version of Red Hat, then there are
the HOWTO guides, the man pages, the info pages and finally the Linux
Documentation Project (LDP) documents. Many documents are available in several formats—HTML
for easy online reference and most also come in PostScript so that they can also be
printed. The PC Quest CD-ROM contains pages with links to all the documentation, so
make sure you check them out. Otherwise a good place to start is in the following
directory/usr/doc.
Rescue disk
Finally, a word of caution— in case you get stuck with
your system and it no longer boots, the only way out is a rescue disk. The disks that you
make at the time of installation are what you need to be able to recover from disaster. So
store them carefully.
Assuming that all has gone well, and that you are now the
proud owner of a well configured and fully working Linux box, all we can say is Have Fun!