File: clueless.html

package info (click to toggle)
lg-issue16 4-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,256 kB
  • ctags: 77
  • sloc: tcl: 89; makefile: 37; sh: 4
file content (228 lines) | stat: -rw-r--r-- 8,160 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Clueless Issue 16</title>
</HEAD>
<BODY BGCOLOR="#EEE1CC" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000" >
<!--endcut ============================================================-->

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H3>CLUELESS at the Prompt: A Column for New Users</H3>
<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>
<b>Welcome to installment 3 of Clueless at the Prompt: 
A Column for New Users.</b>
 <p>
 <b>Thanks for the encouraging e-mail.In response to several requests,
here is a little information to help you get your feet wet.</b>
<hr>
<p><h4> Multitasking</h4>
<p>
 If you are familiar with that other windowing thing, you may be aware of 
the concept of multitasking. Using a single computer to do several
applications at once is a highly desireable trait of an OS.
<p>
  It's fairly obvious how to accomplish this in a windowing environment,
but not so obvious at the shell prompt.Here's some of the details.
<p>
When you start a program at the shell prompt, you can stop it by typing
<pre>
    Ctrl-Z
</pre><p>
Whereupon you will be returned to the shell prompt. Then type:
<pre>
    bg
</pre><p>
which will restart thet program or job in the (b)ack(g)round and allow you
to run another job while that kernel ccompiles, without changing to a
different VC. You probably know that you can change VCs by using the
<pre>
    Alt-F2
</pre><p>
through F6. Each one of these can also be used in the manner that I have
described, to the extent that you can run yourself out of resources in a 
fit of deep hack mode euphoria if you aren't careful.If you get really
exuberant you could even forget what all you have going. Relax, you can
find them all by typing:
<pre>
    jobs
</pre><p>
which will list all jobs running in the background, much like the 
<pre>
    ps 
</pre><p>
command lists all processes that are using your precious memory and 
CPU to a nub.
<hr>
<p><h4>Mount </h4>
<p> 
When you boot up linux your file system or rather your hard drive must be
mounted, so that the file system can be read and acted on.Your floppy
drive, tape backup, or CD-ROM may not be automatically mounted, so you 
could have need of the mount utility.For instance:
<pre>
    mount -t ext2 /dev/fd0 /mnt  or  mount -t msdos /dev/fd0 /mnt
</pre><p>
will mount your floppy drive that dos calls a: to a directory called /mnt
from where you can access files on floppy disks. In the first example,
the /mnt directory can be read in the ext2 filesystem, while the sescond
reads floppies written in msdos format.To read the contents of the floppy
drive, which is now /mnt you can type:
<pre>
    cd /mnt 
</pre><p>
then,
<pre>
    ls 
</pre><p>
or 
<pre>
    less filename 
</pre> <p>
In a similar manner,
you can mount your other floppy drives, tape drives, CDROMs, or other
read write devices.These devices can be unmounted using the 
<pre>
    umount /dev/fd0  or /dev/whateveryoumounted
</pre><p>
command.
<hr> 
<p><h4>Some timesavers....</h4>
<p>
Here are a few  tips that can make your linux life a little easier.
<p>
When you first logon to linux there are some commands that make use of
optional switches,which you may not know or be sure of. You might make a
typo in your command that you don't catch until after you hit enter.
To try it again without retyping the whole command, just tap the up arrow
key, which will bring back the previous command so that you can return to
the scene of the crime and replace the mistyped or mistaken characters.
In fact if you tap enter several times you can go back to what you did
several commands previous.
<p>
To change back to a directory you have just left, or to scan
subdirectories, you can use :
<pre>
    c -
</pre><p>
in the following manner. change from your /home directory to the main 
trunk directory:
<pre>
    cd /
</pre><p>
then, to look at the top level of each directory, for instance:
<pre>
    cd usr
</pre><p>
then:
<pre>
    ls
</pre><p>
If you didn't find what you were looking for, just:
<pre>
    cd -
</pre><p>
and you will find yourself at the trunk / again. Unfortunately you can
only go one layer deep, but it is still useful when you install a source
package and want to check out the contents of each of the subdirectories.
Sometimes, atleast at first, you may not know how to stop a program or
process that's running, but you are unwilling to let it slowly eat up your
memory or CPU overhead. You can type:
<pre>
    ps  -a
</pre><p>
to get a list of all running processes, make note of the pid (Process ID)
number and type:
<pre>
    kill pidnumber      for instance   kill 2395
</pre><p>
But there is an easier way. Browse through the LSM (Linux Software Map)
for a utility , actually a nicety called die-1.1 . You can unpack
this into a directory or use installpkg dopkg or what ever your single
package installation utility is. Then look for the /die-1.1 and cd to it.
It contains a couple of files, a source file,
<pre> 
    die11.c
</pre><p>
and a documentation file,
<pre>
    die.doc
</pre><p>
Assuming that you installed the GCC compiler, just type:
<pre>
   gcc -o die die11.c
</pre><p>
hit enter and presto you've compiled a utility called die.Just mv this to
a directory in your path, and if you like, mv the die .doc to /usr/doc
or somewhere it can be with its other help text friends( but not man pages 
they'll pick on it unmercifully).Next time you're in a quandary about how
to gun down a process just type:
<pre>
    die commandname
</pre><p>
and it will do the deed. To find out more about die just type:
<pre>
    die
</pre><p>
with no argument and it will give you a summary of the commands you can
try the up arrow keys on<h3> ; )</h3>(this emoticon is the only one that
doesn't
make me nauseous)
<p>
<hr>
<p><h4>Disclaimer</h4>
You have probaly noticed this column doesn't have as much content as the
previous two, presumably since linux is really an easy OS to learn so 
my curve isn't as steep, or maybe it's the fact that I have gone half
crazy trying to install a DECvt220 to a serial port and it refuses to
cooperate
<p>
I guess I made a mistake when I said I made a mistake about the mkdir
command in DOS. Several people sent me mail that mkdir -md, rmdir-rd
and a couple ohers are synonymous with linux commands. One fella told me
he made symbolic links to several DOS commands so he can use them without 
having to learn new but similar commands. Sick, but ingenious.
 </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><br>
<A HREF="../issue15/clueless.html">Clueless at the Prompt #2 - March 1997</A>
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Mike List <BR> 
Published in Issue 16 of the Linux Gazette, April 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./lg_toc16.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./library.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./cebit.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->