old-www/LDP/LG/issue15/clueless.html

251 lines
9.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Clueless at the Prompt Issue 15</title>
</HEAD>
<BODY >
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>CLUELESS at the Prompt: A Column for New Users</H2>
<H4>By Mike List,
<a href="mailto:troll@net-link.net">troll@net-link.net</A> </H4>
</center>
<P> <HR> <P>
<center><IMG ALIGN=MIDDLE SRC = "../gx/list/gnub.jpg" ></center><p>
Welcome to installment 2 of Clueless at the Prompt:
a new column for new linux users.
On advice from several respondents, I'm going to start
using a new format for specifying commands:</p>
<pre>
Typing them on a separate line
separated from the text by a space
</pre>
<p>
Hopefully, this will minimize any confusion by even
the very inexperienced user as to what should be
typed at the prompt.
</p> <p>
Last time we explored some of the differences and
similarities between linux and DOS/Windows, and I'm
going to continue this time with some stuff you
already know, but perhaps aren't fully aware of.
</p> <p>
One respondent seemed to take exception to my DOS-linux
comparison, reminding me of the features that make
linux and unices(unix like systems) more powerful than
DOS.
</p> <p>
Fair enough, this is a new users column and I would
like to make sure that I'm not assuming that everyone
who reads this column can read my mind. Besides, if I
endure the slings and arrows of outrageous gurus I can
hopefully expand my knowledge base, which I can then
use for future columns.
</p> <p>
Still, the paradigm of SUPERDOS holds some water.It is,
after all a command line operating system which
supports a windowing system, which has all the
capabilities of MS Windows plus a few features that make
Windowslook pale.
</p> <p>
When you installed linux from whatever distribution,most
of the packages installed came as pre-compiled binaries
that were for the most part usable as is.
However, if you found any applications that didn't come
with the distribution they'll probably need to be unpacked
and installed or compiled or both.
</p> <p>
You could use a utility like installpkg, pkgtool, or dopkg
but unless the package is from the distribution, the utility
will likely install it to the / (base ) directory, which is
probably less than optimal.
</p> <p>
Instead, use the midnight commander, which is a Norton
Commander clone, to view the contents of the package.
To do this find the file,( I don't have a CD-ROM so I'm not
sure of the procedure there )locate the file, probably with
.tgz or .tar.gz extension, and highlight the file, then
hit enter. you will see the contents of the archive.
Read the files called for instance, INSTALL, README,
Readme.whatever, or any file whose name suggests that it
has necessary information, for a clue as to where best to
unpack it. For instance, X apps probably should be unpacked
in the /usr/X11R6 directory.
To unpack the archive:
</p> <pre>
cd /thechosendirectory
</pre><p>
then:
</p> <pre>
tar -zxvf /wherethearchiveis/file
</pre> <p>
you will see a list of files as they unpack. When this process is done,
you will be returned to your shell prompt. If you get any error messages
they should be pretty self explanatory, for instance a message saying file
not found means you didn't name the file correctly in the tar command,
unexpected EOF means the file was very likely corrupted or download was
incomplete, try to get the file one more time.
</p> <p>
At your shell prompt type:
</p> <pre>
ls
</pre> <p>
to see a list of files and directories that were untarred. then:
</p> <pre>
less /anyfilenamelike INSTALL,README,Readme.*(*= unx, elf, lnx, etc)
</pre> <p>
It wouldn't hurt to check any license, or Copying files for info on
propers to the authors.
It also might be a good idea to print out the files if they are long or
contain a lot of special instructions so you can read and reread them
to minimize the possibility that you will have to recompile or reinstall.
If you aren't familiar with linux printing you can just:
</p> <pre>
cat /filename>/dev/lp0 (or lp1, or wherever your printer is located)
</pre> <p>
If you are in the directory that the file is in, you can skip the
frontslash on the filename.
If the files include a precompiled binary, you're done except to install
if the documentation suggests a location other than where you unpacked
and reboot or run ldconfig.
</p> <p>
If you want to examine the contents of subdirectories of your current
directory type:
</p> <pre>
cd subdirectory (leave off the / )
</pre> <p>
then,
</p> <pre>
ls
</pre> <p>
or,
</p> <pre>
ls subdirectory
</pre> <p>
If you cd to a subdirectory, you can return to the top level directory by
typing:
</p> <pre>
cd -
</pre> <p>
If you have chosen a source file distribution of the software, then you
will need to read the file INSTALL very carefully to find what needs to be
done. Typically you might run
</p> <pre>
./configure
</pre> <p>
then edit the Makefile with a text editor as described in the INSTALL or
README files, then run:
</p> <pre>
make
</pre> <p>
sometimes followed by an option like linux, unx, linux-elf as instructed
in INSTALL.When it is done compiling, the time will vary according to the
program, type:
</p> <pre>
make install
</pre> <p>
sometimes followed by an option as above.
</p> <p>
The above is only a general guide to steps usually needed to install
software in linux, more detailed instructions will come with the archive.
READ THEM CAREFULLY!or print out the files.
</p> <p>
Back to the DOS-Linux comparisons. In DOS there is a method of concatenating
several files together under a batch file, which could be run to execute a
string of commands. Linux also has this capability but it is called scripting,
basically if you ever used MSEdit to create a batch file, you've done it before,
except that you must change permissions to make it executable. Type:
</p> <pre>
chmod u+x filename
</pre> <p>
To make sure you have executable permission,type
</p> <pre>
ls in the directory the file is located, usually ~ , or /home/whoever you
are
</pre> <p>
Look for an asterisk * after the filename which shows that it's an executable
Then you can run the string of commands by simply typing the file name of the
script you created.
</p> <p>
Of course there's a lot more to writing scripts than this, but I'm just a GNUbee
and some things take a little time. Ihave written a couple of very simple
scripts to control the dialup to my ISP but they are very simple and rely on
recursion rather than more correct scripting so they must be killed after they
have done their jobs. An example is "on-n-on", a script I wrote to continue
dialing until I can beat the busy signal on the remote modem. It is very simply:
</p> <pre>
ppp-on
sleep 30
on-n-on
</pre> <p>
The script above is called up and dials every 30 seconds until a connection is
reached, so when 30 seconds goes by without the modem dialling you will have a
connection and can open a browser or E-mail. Before that you must quit by
hitting Ctrl+C, however so that the script won't continue to use resources to do
what it has already accomplished.
</p> <p>
I am accepting suggestions as to how this could be done more correctly, but so
far it works for me and I have given you an idea how simple scripts can be.
</p><p>
Thanks for all the input I got from readers and surprisingly from other authors,
encouragement in the form of suggestions, none of them suggested that I go back
to m******ft.
</p> <p>
If I had some ideas about the kind of machines Linux is going on it would be
helpful. I'm running a relatively old 486/66 with no CD-ROM so I installed from
floppies, but most of the information here will be more about what can be done
AFTER installation.
</p> <p>
There is some discussion from from the Linux Users Support Team with regard to
the most loved, most misunderstood linux institution, man-pages. Many people,
myself included feel that they should be a little more user friendly, and some
have suggested that they be replaced witha set of documents similar to howtos>
Let me know what you think about man pages,how they could be improved, replaced
supplemented, whatever,and I can have some info next time.
</p> <p>
BTW, I made at least two errors in my DOS to Linux commands table, not very
reassuring,but the DOS command for making a directory is:
</p><pre>
md</pre> not<pre> mkdir</pre>
<p>
and file copy should have been:
</p><pre>
cp /filename /to </pre>not <pre>cp /filename/filename /to
</pre><p>
<h4> Next Time- Let me know what you would like to see in here and I'll try to
oblige just e-mail<a href="mailto:troll@net-link.net">troll@net-link.net
</a> me and ask, otherwise I'll just write about what gave me trouble and
how I got past it.</h4>
<p> TTYL, Mike List </p>
<!--===================================================================-->
<P> <hr> <P>
<center><H4>Previous "Clueless at the Prompt" Columns</H4></center>
<P>
<A HREF="../issue14/clueless.html">Clueless at the Prompt #1 - February 1997</A>
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Mike List <BR>
Published in Issue 15 of the Linux Gazette, March 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./answer.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./bbartlg.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
</BODY>
</HTML>