File: advani.html

package info (click to toggle)
lg-issue35 1-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,796 kB
  • ctags: 107
  • sloc: makefile: 36; sh: 4
file content (221 lines) | stat: -rw-r--r-- 13,821 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
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<title>Getting Started with Linux LG #35</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<!--endcut ============================================================-->

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

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

<center>
<H1><font color="maroon">Getting Started with Linux</font></H1>
<P align="center"><i><b>Version 1.0 November 98</b></i></P>
<H4>By <a href="mailto:prakash@freeos.com">Prakash Advani</a></H4>
</center>
<P> <HR> <P>  

<b>This document is written for people who have just installed Linux but don't 
  know what to do next. Most of the commands discussed here should work on all 
  distribution of Linux but since I use Red Hat 5.0 some of them may be specific 
  to Red Hat 5.0. I have also used Caldera OpenLinux 1.3 and have included some 
  Caldera specific information. If any of you have any suggestions or ideas to 
  improve this document, they are most welcome. All commands are in quotes and 
  you need to type them without the quotes. For example if you see type "ls" then 
  you just need to type ls. You will also have to press the ENTER key after typing 
  each of the commands. There are some useful commands in the document but for 
  complete command reference you will need to refer to additional documents.</b>
<P> <HR> 
<P>Let us begin with first booting into Linux. When you boot Linux, you will see 
  a lot of messages coming up. You need not understand all of them right now but 
  if you get some errors while booting, you may want to look at them. These help 
  in understanding them and do any troubleshooting if required. First thing you 
  must do is login in to your Linux system. At the login prompt type "root" (or 
  whatever username you have created) and put in the password. The password is 
  selected at installation. If you installed linux on your machine then you are 
  the root user and you have supervisory access to the system. If you didn't choose 
  any password then the system will not ask for a password, instead take you straight 
  to the Linux prompt. You will now come to the Linux prompt. The prompt will 
  be a # if you are root or will be a $ if you are some other user and have chosen 
  the BASH shell. If you are new to Linux then you should use the BASH shell. 
  Out of several shells under Linux, I prefer BASH because it is easy to use. 
  BASH is also the default on most Linux Distributions. Your prompt may look something 
  like.</P>
<P>[root@yoom.com /root]#</P>
<P>If you need to logout just type "exit".</P>
<P>Once you have logged in type "dmesg" to see the bootup messages. You will see 
  something like:</P>
<P><code>Serial driver version 4.13 with no serial options enabled<br>
  </code><code>tty00 at 0x03f8 (irq = 4) is a 16450<br>
  </code><code>tty01 at 0x02f8 (irq = 3) is a 16450<br>
  </code><code>Real Time Clock Driver v1.07<br>
  </code><code>hda: QUANTUM FIREBALL_TM2110A, 2014MB w/76kB Cache, CHS=1023/64/63<br>
  </code><code>hdc: CREATIVECD2421E, ATAPI CDROM drive<br>
  </code><code>ide0 at 0x1f0-0x1f7,0x3f6 on irq 14<br>
  </code><code>ide1 at 0x170-0x177,0x376 on irq 15<br>
  </code><code>Floppy drive(s): fd0 is 1.44M<br>
  </code><code>FDC 0 is a post-1991 82077<br>
  </code><code>md driver 0.35 MAX_MD_DEV=4, MAX_REAL=8<br>
  </code><code>raid0 personality registered<br>
  </code><code>DLCI driver v0.30, 12 Sep 1996, mike.mclagan@Linux.org.<br>
  </code><code>Partition check:<br>
  </code><code> hda: hda1 hda2 &lt; hda5 hda6 hda7 &gt;<br>
  </code><code>VFS: Mounted root (ext2 filesystem) readonly.<br>
  </code><code>Adding Swap: 16092k swap-space (priority -1)<br>
  </code><code>Soundblaster audio driver Copyright (C) by Hannu Savolainen 1993-1996<br>
  </code><code>SB 3.1 detected OK (220)<br>
  </code><code>sb: Interrupt test on IRQ5 failed - device disabled.<br>
  </code><code>YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob 
  Hooft<br>
  </code><code>1993-1996<br>
  </code><code>sysctl: ip forwarding off<br>
  </code><code>Swansea University Computer Society IPX 0.34 for NET3.035<br>
  </code><code>IPX Portions Copyright (c) 1995 Caldera, Inc.</code></P>
<P>You will realise that the messages scrolled down before you could read them. 
  To see them page by page type "dmesg | less" or "dmesg | more".</P>
<P>The dmesg command provides valuable information about the hardware devices 
  detected by Linux. It also helps in knowing if there was some problem somewhere. 
  Like if you see the line: sb: Interrupt test on IRQ5 failed - device disabled. 
  It means there was a problem with setting up of the Sound Blaster sound card 
  at IRQ5. If you get such errors, it may mean that some of your hardware is not 
  working correctly under Linux.</P>
<P>The BASH shell has a lot of ease of use. If you like working a lot on the command 
  line, you will find it very easy. The bash shell allows using the previous command 
  by press the up arrow key. You can also search for previous commands by typing 
  "CTRL-R" and typing some words from the previous commands. To clear the screen 
  press CTRL-L or simply type "clear".</P>
<P>Another important command is df. Just type "df" and you will see something 
  like:</P>
<P>
<pre>Filesystem	1024-blocks	Used	Available Capacity	Mounted on<br>/dev/hda6	 388362		341804	26501	93% 		/<br>/dev/hda5	 614672		572176	42496	93% 		/dosd </pre>
<P>This gives information of all your mounted hard disk partitions, available 
  space and used space. The space shown is 1024 blocks which is 1024 bytes or 
  one Kilo Byte. It also shows at which directory the partition is mounted. Like 
  in DOS and Windows partitions and devices are allotted drive letters such as 
  C:, D:, E:; in Linux partitions or devices are mounted onto directories. For 
  example /dev/hda5 is mounted on /dosd. Normally /dosc, /dosd, would be your 
  mounted dos partitions. It could also be anything else. Which means you can 
  access your Dos files through Linux by going through these directories.</P>
<P>Another useful command is ls. Type "ls" and you will see something like:</P>
<P><code>bin/ dev/ etc/ lost+found/ proc/ tmp/<br>
  boot/ dosc/ home/ mnt/ root/ usr/<br>
  cdrom/ dosd/ lib/ opt/ sbin/ var/</code></P>
<P>Type "ls -l" to see a more complete list. This will show the owners, permissions, 
  date and time of when last modified and file sizes. You will need to understand 
  file permissions once you get the hang of the basic Linux operations. Permissions 
  are useful for multiuser Linux system where you need to restrict or allow access 
  to files or directories.</P>
<P>
<pre>drwxr-xr-x 2	root root 2048	Sep 17	12:49	bin/
drwxr-xr-x 2	root root 1024	Oct 4	23:24	boot/<br>drwxr-xr-x 2	root root 1024	Sep 2	17:32	cdrom/<br>drwxr-xr-x 3	root root 21504	Oct 22	12:54	dev/<br>drwxr-xr-x 2	root root 1024	Oct 2	21:59	dosc/<br>drwxr-xr-x 13	root root 21504	Jan 1	1970	dosd/</pre>
<p>The cd command is used to change directories, you can try by typing "cd /" 

to go the root directory. Type "cd -" to return back to where you were. If you 
just type "cd" you will return back to your home directory.
Installing softwares, opening compressed files under Linux.
<P>If you download documents, utilities, softwares or anything else for Linux, 
  you will find that a lot of them have extensions of .tgz or .tar.gz. In that 
  case you will have to type the following command to extract the files. Replace 
  filename.tar.gz with the name of the file. </P>
<P>gzip -dc filename.tar.gz | tar xvf -</P>
<P>If you downloaded some Linux files under DOS, chances are that the file names 
  may get truncated. In that case you will have to rename your files before extracting 
  them under Linux. To rename files just type "mv oldfilename newfilename". Replace 
  oldfilename with what the current file name is and replace newfilename with 
  what you want the file name to be.</P>
<P>Several files are also in the .rpm format. These formats are for the Red Hat 
  and Caldera distribution and they are also used by other distributions. To install 
  rpm's type </P>
<P>rpm -i filename.rpm</P>
<P>If you are upgrading an existing software type</P>
<P>rpm -U filename.rpm</P>
<P>If your distribution does not support RPM's you can add that support by installing 
  the RedHat Packet Manager (RPM). Similarly there is pkginstall under some distributions 
  to manage .tar.gz files.</P>
<P>Man Man! What's man man ? These are help pages or manuals to get some help 
  on a specific command. To get help on man type "man man". Similarly to get help 
  on rpm type "man rpm". To get help on ls type "man ls" and so on. You can get 
  help on all the command using man. To begin with get help on commonly used commands. 
  These commands will help you move around files and directories. Some commonly 
  used commands are:</P>
<P>
<pre>cat	To type the content of a file
cp	Copy files
du&#9;To check the disk space used
pine&#9;Email client<br>find	Find files on the linux system<br>grep	Search for keywords on a file or a command
kill	To kill any process, ps to see the process number
less	If you cat a file you can pipe it to less for page by page viewing
ln	Create or remove links between files or directories<br>lpr	Print files or output to a printer<br>ls	List files or directories
mkdir&#9;To create a new directory<br>more	Similar to less but less is better than more!
mount&#9;See the mounted devices or mount additional devices
umount&#9;Unmount mounted volumes<br>mv	Move or rename a file<br>passwd	Change your password
ps&#9;To see the processes running<br>rm	Remove files or directories<br>rmdir	Remove directories<br>useradd	Add a user to the linux system
userdel	Delete a user on the linux system<br>usermod	Modify a user on the linux system<br>which	Find where a program is located<br>who	Displays the users logged in<br>zless	To see the content of a .gz file (compressed)</pre>
<P>Some more tips for bash users. If you know that the first letter of a command 
  for example is a but don't know the rest type "a" and then press TAB twice and 
  bash will show the list of possibilities. You can also press a single tab to 
  complete a command if there is only one possibility. This saves a lot of typing 
  time. Example type "mou" and then press TAB, bash will put mount on the command 
  line.</P>
<P>Pressing TAB twice shows all the Linux commands. It looks something like:</P>
<P>There are 1212 possibilities. Do you really wish to see them all? (y or n)</P>
<P>Type "y" and you will see all of them!</P>
<P>Sometimes if you type a command, the screen may scroll by too fast for you 
  to read, unless you are superman. In that case you can see the previous screen 
  by pressing Shift and PG-UP keys together.</P>
<P>If you type some commands, you can break by pressing CTRL-C or ESC. It may 
  not work in man or less, in that case just type "q".If you need to edit some 
  files try pico or joe. These are two easy to use editors. Joe works more like 
  WordStar and pico is the editor for Pine. Power users may try vi or emacs. These 
  two are very powerful editors but have a high learning curve. Examples would 
  be type "joe filename". Replace the filename with the name of the file that 
  you wish to edit.</P>
<P>Most distrbutions install X-Window. To start X-Window type "startx". X-Window 
  is a GUI for Windows. There are several flavours available which give you different 
  look and feel. To configure a redhat system type "setup". If you are under Caldera 
  type "lisa". You can also configure through a GUI interface under X-Window.</P>
<P>Most users may want to use some dos floppies or partitions. You can type some 
  dos commands under Linux without mounting your devices. Type "man mtools" to 
  see a list of these commands. These commands start with m, example the dos copy 
  command would be mcopy. Similarly there are several commands such as mattrib, 
  mcd, mcopy, mdel, mdeltree, mdir, mformat, mlabel, mmd, mrd, mmove, mren, mtype, 
  mzip, etc.To see some more Linux documentation's look under the following directories. 
  If the files have .gz extension the to view them type "zless filename.gz" replace 
  filename with the name of the file.</P>
<P>/usr/doc/FAQ<br>
  /usr/doc/LDP/install-guide<br>
  /usr/doc/mini/usr/doc/HOWTO</P>
<P>&nbsp;</P>
<P><a href="mailto:prakash@freeos.com">Prakash Advani</a> is an Internet and Systems 
  consultant based in Mumbai, India. Currently we are setting up a Web site dedicated 
  on Free Operating Systems [<a href="http://www.freeos.com">www.FreeOS.com</a>] 
  including Linux. Any help would be greatly appreciated.</P>
<P>&nbsp;</P>

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1998, Prakash Advani <BR> 
Published in Issue 35 of <i>Linux Gazette</i>, December 1998</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./lg_toc35.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="./dinsel.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./icaza.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->