Transcript

Slackware Linux

Slackware Linux

Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Slackware Linux, Inc. All rights reserved.:

Slackware Linux,

Slackware Linux, Inc., 1164 Claremont Drive, Brentwood, CA 94513

: . : - . : . : , , .

:

2000 2005

Slackware Linux (Patrick Volkerding) Slackware Linux, Inc. Linux (Linus Torvalds). America Online AOL America Online, Inc. / .

Apple, FireWire, Mac, Macintosh, Mac OS, Quicktime TrueType Apple Computer, Inc., .

IBM, AIX, EtherJet, Netnity, OS/2, PowerPC, PS/2, S/390 ThinkPad International Business Machines Corporation , . IEEE, POSIX, and 802 Institute of Electrical and Electronics Engineers, Inc. .

Intel, Celeron, EtherExpress, i386, i486, Itanium, Pentium Xeon Intel Corporation .

Microsoft, IntelliMouse, MS-DOS, Outlook, Windows, Windows Media Windows NT , Microsoft Corporation / .

Netscape Netscape Navigator Netscape Communications Corporation .

Red Hat, RPM Red Hat, Inc. .

XFree86 XFree86 Project, Inc. , , . , , Slackware Linux, Inc. , , .

ISBN: 1-57176-338-4

.................................................................................................... xvii 1. Slackware Linux .......................................................................... 11.1. Linux?....................................................................................... 1 1.1.1. GNU ................................................................................... 2 1.2. Slackware? ............................................................................... 2 1.3. Open Source Free Software ..................................................................... 4 2. ........................................................... 7 2.1. ............................................... 7 2.1.1. man.................................................................................................... 7 2.1.2. /usr/doc .............................................................................. 9 2.1.3. HOWTO mini-HOWTO ......................................... 10 2.2. ........................................................................ 11 2.2.1. - ............................. 11 2.2.2. ............................................. 11 2.2.3. - ................. 13 3. ....................................................................................................... 17 3.1. Slackware.............................................................................. 17 3.1.1. ................................. 17 3.1.2. ............................................................................ 18 3.2. .......................................................................... 19 3.2.1. ..................................... 20 3.2.2. ...................................................................... 21 3.2.3. ........................................................................ 23 3.2.4. Root- ....................................................................................... 24 3.2.5. ................................................................. 24 3.2.6. ........................................................................... 24 3.3. ....................................................................................... 25 3.4. - setup ............................................................... 28 3.4.1. HELP ()....................................................................... 29 3.4.2. KEYMAP ( )........................... 30

vi

3.4.3. ADDSWAP ( ).............................................. 31 3.4.4. TARGET () .......................................................................... 32 3.4.5. SOURCE () ............................................................. 32 3.4.6. SELECT () ....................................................................... 34 3.4.7. INSTALL () .......................................................... 34 3.4.8. CONFIGURE ().................................................... 36 4. .................................................................................... 45 4.1. ........................................................................................ 45 4.1.1. ................................................... 45 4.1.2. ............................................................................... 49 4.1.3. /etc/rc.d .......................................................................... 51 4.2. .............................................................................................. 56 4.2.1. /kernels CD-ROM Slackware................................ 57 4.2.2. ................................... 57 4.2.3. ..................................................... 62 5. ............................................................................................. 65 5.1. : netcong - .............................................................. 65 5.2. ...................................................... 66 5.2.1. .......................................................... 67 5.2.2. (10/100/1000Base-T Base-2) ........................... 67 5.2.3. .......................................................................................... 68 5.2.4. PCMCIA ......................................................................................... 69 5.3. TCP/IP .................................................................................. 69 5.3.1. DHCP .............................................................................................. 70 5.3.2. IP ............................................................................. 72 5.3.3. /etc/rc.d/rc.inet1.conf.................................................................... 72 5.3.4. /etc/resolv.conf ............................................................................... 73 5.3.5. /etc/hosts......................................................................................... 74 5.4. PPP ............................................................................................................ 75 5.4.1. pppsetup .......................................................................................... 75 5.4.2. /etc/ppp ............................................................................................ 76 5.5. ............................................................................... 76

vii

5.5.1. .............................................................. 77 5.5.2. ............................ 77 5.5.3. ............................................................................. 80 5.6. ................................................................. 80 5.6.1. SMB/Samba/CIFS........................................................................... 81 5.6.2. (NFS) .............................................. 83 6. X................................................................................................... 87 6.1. xorgcong.................................................................................................. 88 6.2. xorgsetup ................................................................................................... 93 6.3. xinitrc ........................................................................................................ 93 6.4. xwmcong.................................................................................................. 95 6.5. xdm ............................................................................................................ 98 7. ........................................................................................................ 103 7.1. LILO........................................................................................................ 103 7.2. LOADLIN ............................................................................................... 107 7.3. ................................................................................. 109 7.3.1. Windows........................................................................................ 109 7.3.2. Linux ............................................................................................. 115 8. (shell) ................................................................. 117 8.1. ........................................................................................ 117 8.1.1. ............................................................................ 117 8.1.2. Root: ........................................................... 118 8.2. ............................................................................... 119 8.2.1. ........................................................................ 119 8.2.2. .............................................................. 120 8.2.3. / 122 8.3. Bourne Again Shell (bash)...................................................................... 124 8.3.1. ............................................................ 124 8.3.2. ................................................. 126 8.4. .................................................................... 127 8.4.1. screen ............................................................................ 128

viii

9.

............................................................. 131

9.1. .............................................................................. 131 9.2. ....................................................................................... 132 9.3. ................................................................................................... 137 9.4. .................................................................... 138 9.4.1. fstab ............................................................................................... 138 9.4.2. mount umount ............................................................................ 139 9.5. NFS .............................................................................. 141 10. ....................................................... 143 10.1. : ls, cd pwd...................................................................... 143 10.1.1. ls .................................................................................................. 143 10.1.2. cd ................................................................................................. 145 10.1.3. pwd .............................................................................................. 146 10.2. : more, less most.............................................................. 146 10.2.1. more............................................................................................. 146 10.2.2. less............................................................................................... 147 10.2.3. most ............................................................................................. 148 10.3. : cat echo ................................................................. 148 10.3.1. cat................................................................................................ 148 10.3.2. echo ............................................................................................. 149 10.4. : touch mkdir ..................................................................... 149 10.4.1. touch ............................................................................................ 150 10.4.2. mkdir ........................................................................................... 150 10.5. ............................................................ 151 10.5.1. cp ................................................................................................. 151 10.5.2. mv ................................................................................................ 152 10.6. : rm rmdir.......................................................................... 152 10.6.1. rm ................................................................................................ 152 10.6.2. rmdir............................................................................................ 153 10.7. ln .................................................. 154

ix

11.

....................................................................... 157

11.1. ............................................................... 157 11.2. ..................................................... 158 11.3. ps ........................................................................................................... 160 11.4. kill.......................................................................................................... 164 11.5. top.......................................................................................................... 166 12. ....................................... 169 12.1. .................................................................... 169 12.1.1. ..................................................... 169 12.1.2. .................................................................. 176 12.1.3. ............................ 177 12.2. : ......................................... 178 12.3. ...................................................... 182 13. ................................................................ 187 13.1. ping........................................................................................................ 187 13.2. traceroute .............................................................................................. 188 13.3. DNS ............................................................. 188 13.3.1. host .............................................................................................. 189 13.3.2. nslookup ...................................................................................... 189 13.3.3. dig................................................................................................ 190 13.4. nger ..................................................................................................... 191 13.5. telnet...................................................................................................... 192 13.5.1. telnet ................................................ 193 13.6. (secure shell)......................................................... 194 13.7. (e-mail) .............................................................. 195 13.7.1. pine.............................................................................................. 195 13.7.2. elm ............................................................................................... 197 13.7.3. mutt.............................................................................................. 198 13.7.4. nail............................................................................................... 200 13.8. ............................................................................................. 201 13.8.1. lynx .............................................................................................. 202 13.8.2. links ............................................................................................. 203

x

13.8.3. wget ............................................................................................. 204 13.9. FTP- ....................................................................................... 205 13.9.1. ftp................................................................................................. 206 13.9.2. ncftp............................................................................................. 208 13.10. ........................................................... 209 13.10.1. wall............................................................................................ 209 13.10.2. talk............................................................................................. 209 13.10.3. ytalk ........................................................................................... 210 14. ............................................................................................. 213 14.1. ............................................................................ 213 14.1.1. , inetd ............................................... 213 14.1.2. , .......... 214 14.2. .......................................................... 215 14.2.1. iptables ........................................................................................ 215 14.2.2. tcpwrappers................................................................................. 218 14.3. .......................... 219 14.3.1. slackware-security .............................. 219 14.3.2. /patches ........................................................................ 219 15. ........................................................................ 221 15.1. gzip ........................................................................................................ 221 15.2. bzip2 ...................................................................................................... 222 15.3. tar .......................................................................................................... 223 15.4. zip .......................................................................................................... 226 16. Vi ................................................................................................ 229 16.1. vi .............................................................................................. 229 16.2. ............................................................................................... 231 16.2.1. ................................................................... 232 16.2.2. ......................................................................... 234 16.3. .............................................................................. 235 16.4. ........................................................................... 236 16.5. vi.......................................................................................... 237 16.6. vi ....................................................................................... 237

xi

16.7. vi.......................................................................................... 238 17. Emacs......................................................................................... 241 17.1. emacs ....................................................................................... 242 17.1.1. ............................................................... 243 17.2. ................................................................................................ 244 17.3. ............................................................................................... 245 17.3.1. .................................................................... 246 17.4. ................................................................... 247 17.5. ........................................................................... 248 17.5.1. Emacs ........................................................................ 250 18. Slackware......................................................... 251 18.1. .................................................................... 252 18.2. ..................................................... 253 18.2.1. pkgtool......................................................................................... 253 18.2.2. installpkg ..................................................................................... 254 18.2.3. removepkg ................................................................................... 255 18.2.4. upgradepkg .................................................................................. 257 18.2.5. rpm2tgz/rpm2targz ...................................................................... 258 18.3. ............................................................................... 258 18.3.1. explodepkg................................................................................... 258 18.3.2. makepkg....................................................................................... 259 18.3.3. SlackBuild.................................................................. 259 18.4. tag- ( setup) ................... 260 19. ZipSlack ......................................................................................................... 263 19.1. ZipSlack?............................................................................ 263 19.1.1. .......................................................................... 263 19.1.2. ................................................................................ 264 19.2. ZipSlack ............................................................................ 264 19.2.1. .................................................................................. 265 19.3. ZipSlack ............................................................................... 265

xii

......................................................................................................... 267A. The GNU General Public License................................................................. 285 A.1. Preamble................................................................................................. 285 A.2. TERMS AND CONDITIONS ............................................................... 286 A.3. How to Apply These Terms to Your New Programs.............................. 292 ............................................................................... 295

xiii

xiv

2-1. ..................................................................... 8 3-1. Slackware Linux, Inc........................................ 18 3-2. ................................................................................ 19 3-3. .................................................................................... 20 9-1. ............................................ 133 13-1. ftp ............................................................................................... 206 16-1. ............................................................................................. 238 16-2. ........................................................................................ 239 16-3. .......................................................................................................... 239 16-4. ................................................................................. 240 17-1. Emacs ...................................... 248 18-1. installpkg......................................................................................... 255 18-2. removepkg ....................................................................................... 256 18-3. tag-...................................................................... 260

4-1. .................................................................. 59 6-1. xorgcong: ........................................................................ 88 6-2. xorgcong: .............................................. 90 6-3. xorgcong: .................................................. 91 6-4. xorgcong: .................................................................................. 91 6-5. xorgcong .................................... 97 7-1. lilocong ........................................................................................................ 104 7-2. lilocong: expert.................................................................................. 107 11-1. ps....................................................... 160 13-1. - telnet.................................................. 194 13-2. pine .................................................................................... 196 13-3. elm ................................................................................... 197

xv

13-4. mutt.................................................................................. 199 13-5. lynx .............................................. 202 13-6. Links File .................................................................... 203 13-7. talk ............................................................... 209 13-8. ytalk ............................................................. 211 16-1. vi....................................................................................................... 230 18-1. pkgtool. .............................................................................. 253 18-2. pkgtool........................................................................ 254

8-1. set ......................... 124

xvi

Slackware Linux - Intel. , high-end, . - Slackware Linux. , . , . Slackware Linux , . , , Slackware Linux, . , . . , , , , - . , .

, xvii

Slackware . , : .

3 (): CD. 4 ( ): Linux 2.6.x.

.

.

5 ( ): Samba, NFS DHCP. . Slackware. - xdm.

. 6 ( X Window): Xorg. .

13 ( ): . 14 (): . , Slackware Linux. Emacs - Unix.

.

. 17 (Emacs): . .

18 ( ): SlackBuild.),

( Slackware .

xviii

. 1, Linux, Slackware, Open Source Free Software. . 2, , Slackware Linux . . 3, , . . 4, . . 5, , Slackware Linux . TCP/IP, PPP/dial-up, . . 6, X Window , Slackware X Window. . 7, , Slackware Linux. Microsoft Windows.

xix

. 8, () Linux. . 9, , , . . 10, , . . 11, Linux .

. 12, : , . . 13, , Slackware. . 14, , Slackware, , iptables tcpwrappers.

. 15, Linux .

xx

. 16, vi vi. . 17, Emacs Emacs. . 18, Slackware Slackware , tag-. . 19, ZipSlack ZipSlack- Linux, Windows . . A, GNU General Public License , Slackware Linux .

, , , .

, .

xxi

>=>H8@8==K9H@8DB >=>H8@8==K9 , ,

, , , , , , .

, .

, . , , + , :

Ctrl+Alt+F1 , Ctrl, Alt F1. , , : ,

Ctrl+X, Ctrl+S , Ctrl X, Ctrl S.

, E:\>, MS-DOS. , Microsoft Windows.D:\> rawrite a: bare.i

xxii

, #, , Slackware . root su(1) .# dd if=bare.i of=/dev/fd0

, %, , . , C-shell.% top

. . : (Keith Keller) ; (Joost Kremers) , emacs; (Simon Williams) ; (Jurgen Phillippaerts) ; Cibao Cu Ali G Colibri . , . : Jacob Anhoej, John Yast, Sally Welch, Morgan Landry Charlie Law. , (Carl Inglis) -. , , (Patrick J. Volkerding) Slackware

xxiii

Linux, (David Cantrell), (Logan Johnson) (Chris Lumens) Slackware Linux Essentials. . , ( ) , . , . (Alan Hicks), 2005

. , . , DeepStyle Linux. Alice Lafox (Lafox.Net1) , :) ( ). (http://deepstyle.org.ua) DeepStyle Linux, . Slackware Linux - . DeepStyle, Slackware Linux - Linux, ;) Lao Lafox.Net, . . , 2001- . , . . , - , 1 http://lafox.net

xxiv

. , , ... , from scratch . . , . Slackware Linux Essentials ( ), .. . Lafox.Net. : Mandriva Linux 2006 (Cooker), KDE 3.5.x, kate+ispell, qemu

(FreeBSD 6.0, docproj).: ([email protected]), - 2006.

xxv

xxvi

1. Slackware

Linux1.1.

Linux?

(Linus Torvalds) Linux - - 1991 . , Unix . 386- . Linux , General Public License ( . . 1.3 . A). Linux . , HP/Compaq Alpha, Sun SPARC UltraSPARC, PowerPC Motorola ( Apple Macintosh IBM RS/6000). , , Linux. Sendmail, Apache BIND, , -. , Linux - . , ,

1

1. Slackware Linux . , Linux : . . Linux.

GNU Linux 1991 - . , : , , . , (Free Software Foundation, FSF) . GNU - , GNUs Not Unix (GNU - Unix). GNU Linux . gcc. GNU gcc gnutar Linux. , , Linux. , Linux GNU/Linux. , vi emacs. , . GNU/Linux, . Linux, , . . GNU/Linux , .

2

1. Slackware Linux

1.2.

Slackware?

Slackware (Patrick Volkerding) 1992 17 1993 . Linux, . Linux, LISP. , , SLS Linux Soft Landing Systems. SLS Linux, . , . , Slackware . Slackware : , , , , . , Slackware Linux. Windows, Unix , . , point-and-click. , , . : , .

Slackware , , , . Slackware - ,

3

1. Slackware Linux

. Slackware , . Slackware, , . Slackware -, , . Slackware Linux.

1.3. Open Source

Free Software

Linux . (Free Software Movement FSF, ) , . , . (Open Source Movement) , . , , , . , . (Free Software Foundation) GNU. - . : Free as in speech, not free as in beer ( ,

4

1. Slackware Linux

). ( . free - , (. )). - , . : , , . , , GNU General Public License (GPL). , GPL , , , GPL, , , . , , , ( ) . Linux GPL. , GPL . , . free , , . , - , GPL, . BSD. BSD- GPL . , BSD, . . , . Slackware Linux

5

1. Slackware Linux

BSD. Open Source Open Source Initiative - , , , .. , . OSI , . , OSI, , , opensource- OSI. , GPL. GPL, . Free Software Foundation Open Source Initiative , , . FSF . OSI , FSF. , , , , , .

6

2. , , . , , , . . Slackware, F, FAQ HOWTO. , , .

2.1.man

man ( manual - , ) Unix Linux. , man pages (. . ) . man -_ () ; -_.

7

2. , , , . , , . , , , , . : man(1). , man 1- 1 ( ); , man man 1 man. , .

2-1. 1 2 3 4 5 6 7 8

( ) C (., hd, sd) (., wtmp, /etc/passwd,

nfs) ( ) , .. (., nroff, ascii) ( )

man(1) whatis(1) apropos(1), man.

8

2.

whatis ; - . :% whatis whatis

whatis (1)

- search the whatis database for complete words

apropos . :% apropos wav

,

cdda2wav netwave_cs oggdec wavelan wavelan_cs wvlan_cs

(1) (4) (1) (4) (4) (4)

-

a sampling utility that dumps CD audio data into wav sound files Xircom Creditcard Netwave device driver simple decoder, Ogg Vorbis file to PCM audio file (WAV or RAW) AT&T GIS WaveLAN ISA device driver AT&T GIS WaveLAN PCMCIA device driver Lucent WaveLAN/IEEE 802.11 device driver

, ;)

/usr/doc : README, , .. /usr/doc. () :/usr/doc/$?@>3@0

Slackware Linux Setup (version 9.1.0)

: setup . ( , , .) , Okay Cancel . , . , (.. [X]), . help setup, , .

HELP () Slackware,

29

3.

. setup ( , , ) .

Slackware Setup Help Slackware Linux Help ____________________First, a little help on help. Whenever you encounter a text viewer like this during the installation, you can move around with these commands:PGDN/SPACE PGUP/b ENTER/DOWN/j UP/k LEFT/h RIGHT/l 0 HOME/g END/G /

- Move down one page - Move up one page - Move down one line - Move up one line - Scroll left - Scroll right - Move to beginning of line - Move to beginning of file - Move to end of file - Forward search( 6%)

< OK >

KEYMAP ( ) , qwerty, . .

30

3.

You may select one of the following keyboard maps. If you do not select a keyboard map, us.map (the US keyboard map) is the default. Use the UP/DOWN arrow keys and PageUp/PageDown to scroll through the whole list of choices.

KEYBOARD MAP SELECTION

qwerty/us.map azerty/azerty.map azerty/be-latin1.map azerty/fr-latin1.map azerty/fr-latin9.map azerty/fr-pc.map azerty/fr.map azerty/wangbe.map azerty/wangbe2.map dvorak/ANSI-dvorak.map dvorak/dvorak-l.map< OK > < Cancel >

ADDSWAP ( )SWAP SPACE DETECTED Slackware Setup has detected a swap partition: Device Boot /dev/hda4 Start 4801 End Blocks 4865 Id System 82 Linux swap

522112+

Do you wish to install this as your swap partition?< Yes > < No >

(. . 3.3), . ,

31

3.

, .

TARGET ()Select Linux installation partition: Please select a partition from the following list to use for your root (/) Linux partition. /dev/hda2 /dev/hda3 /dev/hda4 ----Linux 5863725 Linux 5863725 Linux 104984775 (done adding partitions, continue with setup) (done adding partitions, continue with setup)< Select > < Continue >

( swap) . . . : reiserfs ( ), ext3, ext2, jfs xfs. reiserfs ext3.

reiserfs4. , (/). . (, , , /dev/hda3, . . , .)

32

3.

SOURCE () , Slackware. : CD-ROM, , NFS .SOURCE MEDIA SELECTION

Please select the media from which to install Slackware Linux: 1 2 3 4 Install from a Slackware CD or DVD Install from a hard drive partition Install from NFS (Network File System) Install from a pre-mounted directory< OK > < Cancel >

CD-ROM CD-ROM. CD-ROM , . , - Slackware , . NFS NFS. , . , : , NFS IP- ( setup ). network.dsk . . , Jaz-, NFS-, PLIP, FAT. setup, .

33

3.

SELECT () . . 3.2.1. , , A, . .

Now its time to select which general categories of software to install on your system. Use the spacebar to select or unselect the software you wish to install. You can use the up and down arrows to see all the possible choices. Recommended choices have been preselected. Press the ENTER key when you are finished. [X] [X] [X] [X] [X] [X] [X] [X] [ ]A AP D E F GNOME K KDE KDEI

PACKAGE SERIES SELECTION

Base Linux system Various Applications that do not need X Program Development (C, C++, Lisp, Perl, etc.) GNU Emacs FAQ lists, HOWTO documentation The GNOME desktop for X Linux kernel source Qt and the K Desktop Environment for X International language support for KDE< OK > < Cancel >

INSTALL () , target, source select, install . setup. : full, newbie, menu, expert, custom tag path.

34

3.

Now you must select the type of prompts youd like to see during the installation process. If you have the drive space, the full option is quick, easy, and by far the most foolproof choice. The newbie mode provides the most information but is much more time-consuming (presenting the packages one by one) than the menu-based choices. Otherwise, you can pick packages from menus using expert or menu mode. Which type of prompting would you like to use? full newbie menu expert custom tagpath help Install everything (almost 2 GB of software) Use verbose prompting (and follow tagfiles) Choose groups of packages from interactive menus Choose individual packages from interactive menus Use custom tagfiles in the package directories Use tagfiles in the subdirectories of a custom path Read the prompt mode help file< OK > < Cancel >

SELECT PROMPTING MODE

full , select. . , . . - newbie. . , Yes, No Skip (, , ). Yes No , Skip . , . , .. , . - .

35

3.

- . , , . .Menu

expert. . , , . , . , . , . custom tag path . , tag-, . , .. . . 18.4. . full menu, , . full, . newbie, . , . , . , . Slackware. . 18.

36

3.

CONFIGURE () . , , . :

. , , - Slackware ( , , ). . .

In order for your system to boot correctly, a kernel must be installed. If youve made it this far using the installation bootdisks kernel, you should probably install it as your system kernel (/boot/vmlinuz). If youre sure you know what youre doing, you can also install your choice of kernels from the Slackware CD, or a kernel from a floppy disk. You can also skip this menu, using whatever kernel has been installed already (such as a generic kernel from the A series). Which option would you like? bootdisk cdrom floppy skip Use the kernel from the installation bootdisk Use a kernel from the Slackware CD Install a zimage or bzimage from a DOS floppy Skip this menu (use the default /boot/vmlinuz)< OK > < Cancel >

INSTALL LINUX KERNEL

- . ,

37

3.

. - - (. ) . ( ) lilo, , , lilo. LILO . 7.1. continue (), .MAKE BOOTDISK It is highly recommended that you make a bootdisk (or two) for your system at this time. There are two types of bootdisks that you can make: a simple bootdisk (which is just a kernel image written directly to disk) or a LILO bootdisk (which is more flexible, but takes a little longer to load). Which option would you like? format simple lilo continue format floppy disk in /dev/fd0 make simple vmlinuz > /dev/fd0 bootdisk make lilo bootdisk leave bootdisk menu and continue with the configuration< OK > < Cancel >

. , , , , .

38

3.

MODEM CONFIGURATION This part of the configuration process will create a /dev/modem link pointing to the callout device (ttyS0, ttyS1, ttyS2, ttyS3) representing your default modem. You can change this link later if you move your modem to a different port. If your modem is a PCI card, it will probably use /dev/ttyS4 or higher. Please select the callout device which you would like to use for your modem: no modem do not set a /dev/modem link /dev/ttyS0 (COM1: under DOS) /dev/ttyS1 (COM2: under DOS) /dev/ttyS2 (COM3: under DOS) /dev/ttyS3 (COM4: under DOS) /dev/ttyS4 PCI modem /dev/ttyS5 PCI modem /dev/ttyS6 PCI modem /dev/ttyS7 PCI modem< OK > < Cancel >

, .

: . , , ( ) .

39

3.

TIMEZONE CONFIGURATION Please select one of the following timezones for your machine: US/Alaska US/Aleutian US/Arizona US/Central US/East-Indiana US/Eastern US/Hawaii US/Indiana-Starke US/Michigan US/Mountain US/Pacific US/Samoa Africa/Abidjan< OK > < Cancel >

, - gpm(8).

40

3.

This part of the configuration process will create a /dev/mouse link pointing to your default mouse device. You can change the /dev/mouse link later if the mouse doesnt work, or if you switch to a different type of pointing device. We will also use the information about the mouse to set the correct protocol for gpm, the Linux mouse server. Please select a mouse type from the list below: ps2 imps2 bare ms mman msc pnp usb PS/2 port mouse (most desktops and laptops) Microsoft PS/2 Intellimouse 2 button Microsoft compatible serial mouse 3 button Microsoft compatible serial mouse Logitech serial MouseMan and similar devices MouseSystems serial (most 3 button serial mice) Plug and Play (serial mice that do not work with ms) USB connected mouse< OK > < Cancel >

MOUSE CONFIGURATION

, (UTC GMT). , .HARDWARE CLOCK SET TO UTC? Is the hardware clock set to Coordinated Universal Time (UTC/GMT)? If it is, select YES here. If the hardware clock is set to the current local time (this is how most PCs are set up), then say NO here. If you are not sure what this is, you should answer NO here. NO Hardware clock is set to local time YES Hardware clock is set to UTC< OK > < Cancel >

41

3.

.SELECT A SCREEN FONT Select one of the following custom fonts. If you decide you like it, you can make it your new default screen font. Youll be able to try as many of these as you like. 161.cp.gz -16 162.cp.gz -16 163.cp.gz -16 164.cp.gz -16 165.cp.gz -16 737.cp.gz -16 880.cp.gz -16 928.cp.gz -16 972.cp.gz -16 Agafari-12.psfu.gz Agafari-14.psfu.gz Agafari-16.psfu.gz< OK > < Cancel >

LILO LILO ( LInux LOader, Linux; . . 7.1).

42

3.

INSTALL LILO LILO (Linux Loader) is a generic boot loader. Theres a simple installation which tries to automatically set up LILO to boot Linux (also DOS/Windows if found). For more advanced users, the expert option offers more control over the installation process. Since LILO does not work in all cases (and can damage partitions if incorrectly installed), theres the third (safe) option, which is to skip installing LILO for now. You can always install it later with the liloconfig command. Which option would you like? simple Try to install LILO automatically expert Use expert lilo.conf setup menu skip Do not install LILO< OK > < Cancel >

Slackware , simple. , expert. . 7.3. - do not install - , , , LILO. , LILO. MBR (Master Boot Record, ) , Linux .

netconfig. . 5.1.

43

3.

X Window X. X . 6.SELECT DEFAULT WINDOW MANAGER FOR X

Please select the default window manager to use with the X Window System. This will define the style of graphical user interface the computer uses. KDE and GNOME provide the most features. People with Windows or MacOS experience will find either one easy to use. Other window managers are easier on system resources, or provide other unique features. xinitrc.kde KDE: K Desktop Environment xinitrc.gnome GNU Network Object Model Environment xinitrc.xfce The Cholesterol Free Desktop Environment xinitrc.blackbox The blackbox window manager xinitrc.fluxbox The fluxbox window manager xinitrc.wmaker WindowMaker xinitrc.fvwm2 F(?) Virtual Window Manager (version 2.xx) xinitrc.fvwm95 FVWM2 with a Windows look and feel xinitrc.twm Tab Window Manager (very basic)< OK > < Cancel >

, , , root. , , , ( Slackware) .

44

4. , , , . , . . .

4.1.

, Linux , . Linux DOS, Windows Macintosh ( Mac OS Unix), , .

Slackware Linux DOS Windows . : . Linux . C: DOS.

45

4. . . (/). , , . , , , /home. Slackware . , , /home. . . , Slackware.bin

. , . (ls, cp ..). /bin . , , , .boot

, Linux (LILO). . , Slackware 8.1. / , .

46

4.

dev

Linux , , , . , . /dev. Unix- .etc

: X Window, , . .home

. . . /home .

Linux

lib

, . C, , ncurses .mnt

. CD-ROM .

47

4.

opt

. , /opt, , /opt/software-package, . Slackware /opt (, , KDE /opt/kde), , .proc

. , , . , ( ) , /proc. . cat/proc/cpuinfo.

root

root. root /root, /home/root. . , /home ( /) ? root . , .sbin

, root . .

48

4.

tmp

. .usr

Linux. : , , X Window. , .var

, . . , . hier(7). .

, , - - , . , , . Slackware .

which - which(1). which

49

4.

. PATH , . :% which bash

/bin/bash

, bash /bin. , .. PATH.

whereis whereis(1) which, . bash whereis :% whereis bash

bash: /bin/bash /usr/bin/bash /usr/man/man1/bash.1.gz

, , . . , ? which, whereis.

nd find(1) . , . , xinitrc, .

50

4.

%

find / -name xinitrc

/var/X11R6/lib/xinit/xinitrc

find , , . , , , root. find , . ...

slocate slocate(1) nd, , . , . updatedb(1) slocate ( root su). slocate:# root /var/X11R6/lib/xinit/xinitrc /var/X11R6/lib/xinit/xinitrc.fvwm2 /var/X11R6/lib/xinit/xinitrc.openwin /var/X11R6/lib/xinit/xinitrc.twm% slocate xinitrc

, , . Linux , .

/etc/rc.d /etc/rc.d . Slackware

51

4.

BSD, System V, , . init- BSD rc-. System V , . . : , , System V. .

, Slackware Linux - init(8). /etc/inittab(5), , . /etc/rc.d/rc.S, , . rc.S , , , Plug-and-Play, , PCMCIA, init- System V ( ). , rc.S , /etc/rc.d , rc.S :rc.S

.rc.modules

. , PPP . rc.netdevice, .

52

4.

rc.pcmcia

PCMCIA, . , PCMCIA.rc.serial

, setserial.rc.sysvinit

System V . .

, , init . , . ? , init, , : X Window System agetty(8).

Slackware Linux.rc.0

( 0). rc.6.

53

4.

rc.4

( 4), X11 KDM, GDM XDM .rc.6

( 6).rc.K

( 1).rc.M

( 2 3), . Slackware .

2, 3 4 . :rc.inet1

, netconfig, .rc.inet2

rc.inet1 .rc.atalk

AppleTalk.

54

4.

rc.httpd

- Apache. rc- . rc.httpd stop, start restart.rc.news

.

System V System V Slackware, 7.0. Linux BSD-. , BSD- . rc.sysvinit init- System V, /etc/rc.d, , . , System V.

. , , , , .rc.gpm

, Linux.

55

4.

gpm X Windows. X,

gpm.rc.font

.rc.local

. , .. . . , chmod. , . chmod . 9.2.

4.2.

, . , .

Slackware , . . ,

56

4.

.

/kernels CD-ROM Slackware Slackware /kernels - Slackware FTP- Slackware. , . /kernels . . :

System.map bzImage config

,

, System.map config /boot, /boot/vmlinuz. /sbin/lilo(8), LILO , . . . , .i, IDE. .. SCSI, . , .s, SCSI. IDE, .i-.

: ? .

57

4.

, . . , , Slackware, , , . SMP. . . . , . , K. , D, C, GNU make GNU binutils. D, - . http://www.

kernel.org/mirrors.

Linux 2.4.x% su -

Password:# cd /usr/src/linux

. ( , .config, ):

58

4.

# make mrproper

. . . , . , , - , . . , . :# make config # make menuconfig # make xconfig

( -) ( ; ) ( ; , X)

59

4.

4-1. Linux Kernel v2.2.16 ConfigurationArrow keys navigate the menu. selects submenus --->. Highlighted letters and hotkeys. Pressing includes, excludes, modularizes features. Press to exit, for help Legend: [ * ] built-in [ ] excluded module < > module capable Code maturity level options ---> Processor type and features ---> Loadable module support ---> General setup ---> Plug and Play support ---> Block devices ---> Networking options ---> Telephony Support ---> SCSI support ---> Network device support ---> Amateur Radio support --->< Select > < Exit > < Help >

Main Menu

menuconfig . , . -. . :# make dep # make clean

. bzImage, .# make bzImage

60

4.

. . , .# make modules

. Slackware, :# mv /boot/vmlinuz /boot/vmlinuz.old # cat arch/i386/boot/bzImage > /vmlinuz # mv /boot/System.map /boot/System.map.old # cp System.map /boot/System.map # make modules_install

/etc/lilo.conf , . /sbin/lilo, . .

Linux 2.6.x 2.6 2.4 2.2, , , . make dep make clean. 2.6 . , , . , . V=1 . , .

61

4.

# make bzImage V=1

- , . , , . , . . , , ! /lib/modules/25@A8O_O4@0. rc.modules. . , lsmod(1):# lsmod

Module parport_pc parport

Size 7220 7844

Used by 0 0 [parport_pc]

, . , rmmod(1). modprobe(1) insmod(1). modprobe , , , . .

62

4.

. Slackware kmod. kmod - , . kmod , , /usr/src/linux/Documentation/kmod.txt. http://kernel.org. , rc.modules.

63

4.

64

5. 5.1.

: netcong - .

Slackware setup netconfig. netconfig : .

IP-, , ; , :

Static-IP DHCP Loopback

. netconfig

80% , . , :

65

5.

1. setup . , . 2. Slackware Linux, . , . , .

5.2.

, Slackware - , Linux- . , , Linux ( , , Linux Documentation Project / ). , . , , , (, The GNU/Linux Beginners Group Hardware Compatibility Links1 The Linux Documentation Project Hardware HOWTO2), . , , , , Linux. , Linux, , , , 1 http://www.eskimo.com/%7Elo/linux/hardwarelinks.html 2 http://www.linux.org/docs/ldp/howto/Hardware-HOWTO/

66

5.

, .

, , rc.modules /etc/rc.d , /etc/rc.d/rc.hotplug. rc.modules . , , rc.netdevice /etc/rc.d/. , setup . if modprobe. , modprobe . rc.modules root ( , ). , (, ne2000) ; , .

(10/100/1000Base-T Base-2) PCI- ISA-. , . /sbin/netconfig rc.netdevice. , ( ,

67

5.

). , , , , , , .

, . 8 16- ISA-. Intel , ISA, , - , USB-, PCI-. , Linux, , , PCI-. , , PCI-, , .. win-. : , Windows. , , PPPD, -. , Linux, , . , .

68

5.

-, win-. win- Lucent, Conexant Rockwell. Slackware , .

PCMCIA Slackware pcmcia ( A). , PCMCIA- Slackware. : pcmcia , PCMCIA- Slackware. . /lib/modules/`uname-r`/pcmcia. , , . /etc/pcmcia/network.opts ( Ethetnet-) /etc/pcmcia/wireless.opts ( ). Slackware, , .

5.3.

TCP/IP69

5.

, . , ifconfig -a.# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:A0:CC:3C:60:A4 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:110081 errors:1 dropped:0 overruns:0 frame:0 TX packets:84931 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:114824506 (109.5 Mb) TX bytes:9337924 (8.9 Mb) Interrupt:5 Base address:0x8400 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2234 errors:0 dropped:0 overruns:0 frame:0 TX packets:2234 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:168758 (164.8 Kb) TX bytes:168758 (164.8 Kb)

/sbin/ifconfig -a, eth0, IP- . , : . ( , , IP-) IP-. IP- , DHCP-.

DHCPDHCP (Dynamic Host Conguration Protocol, ) , IP-

70

5.

. DHCP- DHCP- , IP-. DHCP- ( ) IP- IP- . IP- , IP-. IP- . , DHCP- IP-. , IP-. , , . , : : DHCP? : , . . : IP-. : 192.168.10.10 19200 . : . : DHCP? : , . . : IP-. 192.168.10.10. : , ( , : 192.168.10.12). : .

DHCP- Linux /sbin/dhcpcd. /etc/rc.d/rc.inet1 , , /sbin/dhcpcd . , . dhcpcd

71

5.

, IP-, DHCP . DHCP : ntp, .. DHCP Slackware . netconfig DHCP, . , eth0 DHCP, /etc/rc.d/rc.inet1.conf YES.

IP IP- , . , , IP , , , , . IP-, , . , IP- , .

/etc/rc.d/rc.inet1.conf IP- Slackware, netconfig /etc/rc.d/rc.inet1.conf. /etc/rc.d/rc.inet1.conf :# Primary network interface card (eth0) IPADDR[0]="" NETMASK[0]="" USE_DHCP[0]=""

72

5.

DHCP_HOSTNAME[0]=""

:GATEWAY=""

, . /etc/rc.d/rc.inet1 . IP YES USE_DHCP. Slackware . DEFAULT_GW Slackware. , . DHCP, -, DHCP , .

/etc/resolv.conf, IP-, , ( ), , IP-? 72.9.234.112 , www.slackbook.org. IP-? DNS, ? /etc/resolv.conf. , /etc/resolv.conf. , DHCP, DHCP . ( ,

73

5.

DHCP- dhcpcd, , .) DNS, /etc/resolv.conf. :# cat /etc/resolv.conf

nameserver 192.168.1.254 search lizella.net

. nameserver , DNS- . IP-. . Slackware , . . search , DNS-. , FQDN (Fully Qualied Domain Name, ). , search slackware.com, http://store.slackware.com, - http://store.# ping -c 1 store

PING store.slackware.com (69.50.233.153): 56 data bytes 64 bytes from 69.50.233.153 : icmp_seq=0 ttl=64 time=0.251 ms 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 0.251/0.251/0.251 ms

/etc/hosts, DNS , DNS DNS- , DNS? Slackware

74

5.

/etc/hosts, IP-.# cat /etc/hosts

127.0.0.1 192.168.1.101 172.14.66.32

localhost locahost.localdomain redtail foobar.slackware.com

, localhost IP- 127.0.0.1 ( localhost), redtail 192.168.1.101, foobar.slackware.com 172.14.66.32.

5.4. PPP . PPP, SLIP. PPP . , .

pppsetupSlackware pppsetup . netconfig. , root. pppsetup, . : , . , . , .

75

5.

ppp-go ppp-off. , , PPP-. /usr/sbin root.

/etc/ppp pppsetup. , , PPP. /etc/ppp. :ip-down

pppd PPP-. pppd PPP-. , . pppd. pppd . . , pppsetup.

ip-up

options options.demandpppscript

pppsetup.txt

: , pppsetup.

76

5.

5.5.

, - . , . Linux, . Ethernet- 802.11 :

1. . 2. . 3. .

: , . Ethernet- , /etc/rc.d/rc.modules. netconfig , , , .

http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/.

iwconfig,

77

5.

, . (access point). , , . : ( iwconfig

ESSID). ,

WAP.

, (

).

WAP. WAP , , . ,

VPN IPSec, . WAP , ID /ESSID. , Google , .

, modprobe , rc.wireless.conf . rc.wireless.conf . generic: ESSID KEY, CHANNEL, . ( CHANNEL, - ; .) , ,

78

5.

. rc.wireless.conf iwconfig rc.wireless iwconfig. , , , WAP iwconfig . , , WAP , ( WAP hex-). , rc.wireless.conf, rc.wireless root, - rc.inet1 ( root). , ping, iwconfig. , ifconfig, , , , . . , , /etc/rc.d/rc.wireless , iwcong, . wi , -, - . , . , eth0 , , mynetwork ESSID, . ( ), . , , ( ).

79

5.

# iwconfig eth0 essid "mynetwork " # iwconfig eth0 keyXXXXXXXXXXXXXXXXXXXXXXXXXXX

# iwconfig eth0 channel n

, .

, . .

5.6.

TCP/IP- . , , . , , . , . . Slackware TCP/IP , ; , TCP/IP, . , , FTP SCP. Slackware Windows-. Unix-.

80

5.

, . , , , . , , . , . - SMB ( Samba) NFS.

SMB/Samba/CIFSSMB (Server Message Block, ) - NetBIOS, IBM LAN Manager. Microsoft NetBIOS (NetBEUI, SMB CIFS). Samba 1991 , IBM PC Unix. SMB , Windows. Samba /etc/samba/smb.conf , . , . , smb.conf. Samba , . .smb.conf :

,

81

5.

. , . , . . smb.conf, . :[global] # workgroup = NT , : LINUX2 workgroup = MYGROUP

workgroup .

/

,

# server string Description NT server string = Samba Server

Slackware, ( ).# . # user. security_level.txt. # : Samba-1.9.18, # "security = share". security = user

Slackware user.# . , # ENCRYPTION.txt, Win95.txt WinNT.txt # Samba. # , . encrypt passwords = yes

82

5.

, Samba NT4.0, Win2k, WinXP Win2003. Windows .

SMB , .. , . samba , , smbpasswd. smbpasswd , - ( SMB , NETBIOS- -, , ). /etc/samba/private/smbpasswd.# smbpasswd -a user

/etc/samba/private/smbpasswd.# smbpasswd -a -m machine

, /etc/passwd. adduser. , adduser ($). smbpasswd. smbpasswd . adduser samba.# adduser machine$

(NFS)NFS (Network File System) Sun 83

5.

Solaris - Unix. SMB, NFS . . NFS . , NFS , . NFS /etc/exports. /etc/exports , . exports , , , . , /home/foo Bar, /etc/exports :/home/foo Bar(rw)

exports :# /etc/exports / master(rw) trusty(rw,no_root_squash) /projects proj*.local.domain(rw) /usr *.local.domain(ro) @trusted(rw) /home/joe pc001(rw,all_squash,anonuid=150,anongid=100) /pub (ro,insecure,all_squash)

, , .

NFS , . NFS- NFS-, UID /. UID

84

5.

, . , - UID , . , , root_squash. UID , root, UID, root . , root_squash , /etc/exports. , exportfs, :# exportfs -o rw,no_root_squash Bar:/home/foo

/home/foo Bar /. NFS root_squash, , Bar UID 0 (UID root) , root. (, computer:/directory/file, ). exports .

85

5.

86

6. X Slackware-10.0, X Window Slackware Xorg. X (. ) . , Windows MacOS. X Window , . . . . . X . , PC- , . VESA, , X startx . , , 3D-, X.

87

6. X X /etc/X11/xorg.conf. , . , , . .

6.1. xorgcong , , Slackware. X-, , , , , . /etc/X11/xorg.conf ( ).

- X , . xorgconfig. :xorgconfig# xorgconfig

xorgconfig. ENTER. xorgconfig , PATH. , , ENTER.

88

6. X

6-1. xorgcong: First specify a mouse protocol type. Choose one from the following list: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Auto SysMouse MouseSystems PS/2 Microsoft Busmouse IMPS/2 ExplorerPS/2 GlidePointPS/2 MouseManPlusPS/2 NetMousePS/2 NetScrollPS/2 ThinkingMousePS/2 AceCad

The recommended protocol is Auto. If you have a very old mouse or dont want OS support or auto detection, and you have a two-button or three-button serial mouse, it is most likely of type Microsoft. Enter a protocol number:

. , Microsoft protocol - . xorgconfig , ChordMiddle Emulate3Buttons. . , X , (Emulate3Buttons ). . (/dev/mouse) , Slackware . GPM ( Linux ) ,

89

6. X

/dev/gpmdata, X gpm. ( bus-) , .xorgconfig .

, y. n - , .

6-2. xorgcong: You must indicate the horizontal sync range of your monitor. You can either select one of the predefined ranges below that correspond to industrystandard monitor types, or give a specific range. It is VERY IMPORTANT that you do not specify a monitor type with a horizontal sync range that is beyond the capabilities of your monitor. If in doubt, choose a conservative setting. 1 2 3 4 5 6 7 8 9 10 11 hsync in kHz; monitor type with characteristic modes 31.5; Standard VGA, 640x480 @ 60 Hz 31.5 - 35.1; Super VGA, 800x600 @ 56 Hz 31.5, 35.5; 8514 Compatible, 1024x768 @ 87 Hz interlaced (no 800x600) 31.5, 35.15, 35.5; Super VGA, 1024x768 @ 87 Hz interlaced, 800x600 @ 56 Hz 31.5 - 37.9; Extended Super VGA, 800x600 @ 60 Hz, 640x480 @ 72 Hz 31.5 - 48.5; Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72 Hz 31.5 - 57.0; High Frequency SVGA, 1024x768 @ 70 Hz 31.5 - 64.3; Monitor that can do 1280x1024 @ 60 Hz 31.5 - 79.0; Monitor that can do 1280x1024 @ 74 Hz 31.5 - 82.0; Monitor that can do 1280x1024 @ 76 Hz Enter your own horizontal sync range

Enter your choice (1-11):

. , ENTER. - . , .

90

6. X

.

6-3. xorgcong: You must indicate the vertical sync range of your monitor. You can either select one of the predefined ranges below that correspond to industrystandard monitor types, or give a specific range. For interlaced modes, the number that counts is the high one (e.g. 87 Hz rather than 43 Hz). 1 2 3 4 5 50-70 50-90 50-100 40-150 Enter your own vertical sync range

Enter your choice:

( ). xorgcong , xorg.conf. 3 , ( ).

91

6. X

6-4. xorgcong: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 * Generic VESA compatible * Generic VGA compatible * Unsupported VGA compatible ** 3DLabs, TI (generic) ** 3Dfx (generic) ** ATI (generic) ** ATI Radeon (generic) ** ATI Rage 128 based (generic) ** Alliance Pro Motion (generic) ** Ark Logic (generic) ** Chips and Technologies (generic) ** Cirrus Logic (generic) ** Cyrix MediaGX (generic) ** DEC TGA (generic) ** Intel i740 (generic) ** Intel i810 (generic) ** Linux framebuffer (generic) ** Matrox Graphics (generic) [glint] [tdfx] [ati] [radeon] [r128] [apm] [ark] [chips] [cirrus] [cyrix] [tgz] [i740] [i810] [fbdev] [mga] -

Enter a number to choose the corresponding card definition. Press enter for the next page, q to continue configuration.

. , y . , , , . xorgconfig, . xorgconfig , - . , . .

92

6. X

. /etc/X11/xorg.conf , 1024x768 ( , ). xorgconfig , . yes X , . X startx.

6.2. xorgsetup X xorgsetup , Slackware. xorgsetup, root :# xorgsetup

/etc/X11/xorg.conf (.. X), , . /etc/X11/xorg.conf.backup.

6.3. xinitrc- , X. startx(1), X Window. xinit (, ). , ( ) X. xinit .xinitrc. xinit(1)

93

6. X

, , /var/X11R6/lib/xinit/xinitrc ( ). xinitrc:#!/bin/sh # $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $ userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap sysresources=/usr/X11R6/lib/X11/xinit/.Xresources sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap # if [ -f $sysresources ]; then xrdb -merge $sysresources fi if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi if [ -f $userresources ]; then xrdb -merge $userresources fi if [ -f $usermodmap ]; then xmodmap $usermodmap fi # twm & xclock -geometry 50x50-1+1 & xterm -geometry 80x50+494+51 & xterm -geometry 80x20+494-0 & exec xterm -geometry 80x66+0+0 -name login

if .

94

6. X

, . twm(1), . exec xterm. (, xinitrc) xterm(1). xterm, X . X, /var/X11R6/lib/xinit/xinitrc ~/.xinitrc , , . :# : exec startkde

, /var/X11R6/lib/xinit xinitrc.*, . , .

6.4. xwmcong Unix . Unix- , . (GUI) , CAD- . . (Sun Microsystems, Silicon Graphics

95

6. X

.) , , GUI, , . - . . . . , , . Unix- X . Microsoft Windows Apple MacOS; X- . : K Desktop Environment KDE GNU Network Object Model Environment, GNOME. : , , . KDE GNOME . , GUI. KDE Qt Troll Tech AS, GNOME GTK - , GNU Image Manipulation Program ( GIMP). KDE GNOME, ,

96

6. X

. : , . , KDE, GNOME , . . , , (, , ). . GNOME KDE Slackware . , , . . , , , . , Slackware xwmconfig, . :% xwmconfig

97

6. X

6-5. xorgcongPlease select the default window manager to use with the X Window System. This will define the style of graphical user interface the computer uses. KDE and GNOME provide the most features. People with Windows or MacOS experience will find either one easy to use. Other window managers are easier on system resources, or provide other unique features. xinitrc.kde KDE: K Desktop Environment xinitrc.gnome GNU Network Object Model Environment xinitrc.xfce The Cholesterol Free Desktop Environment xinitrc.blackbox The blackbox window manager xinitrc.fluxbox The fluxbox window manager xinitrc.wmaker WindowMaker xinitrc.fvwm2 F(?) Virtual Window Manager (version 2.xx) xinitrc.fvwm95 FVWM2 with a Windows look and feel xinitrc.twm Tab Window Manager (very basic)< OK > < Cancel > SELECT DEFAULT WINDOW MANAGER FOR X

. , . , .. , , . X, .

6.5. xdm Linux , , . Slackware

98

6. X

X . Slackware : xdm(1), kdm gdm(1). - , X.org. , , . kdm - , KDE (K Desktop Environment). , , gdm - , GNOME. , .xdm

Slackware xwmconfig , , , , . . , X , 4- . (runlevel) - init(8) - , . init - /etc/inittab.# Slackware: # 0 = # 1 = # 2 = ( , 3- ) # 3 = ( Slackware) # 4 = X11 KDM/GDM/XDM ( ) # 5 = ( , 3- ) # 6 = # ( 0 6) id:3:initdefault:

99

6. X

, Slackware , 3 4.# ( 0 6) id:4:initdefault:

Slackware 4 /etc/rc.d/rc.4. X . , ? , , rc.4.# gdm - GNOME: if [ -x /usr/bin/gdm ]; then exec /usr/bin/gdm -nodaemon fi # ? , kdm - KDE: if [ -x /opt/kde/bin/kdm ]; then exec /opt/kde/bin/kdm -nodaemon fi # XDM - , , , : if [ -x /usr/X11R6/bin/xdm ]; then exec /usr/X11R6/bin/xdm -nodaemon fi

, rc.4 , gdm , - . kdm, - xdm. , , removepkg. removepkg . 18. , . chmod . 9.# chmod -x /usr/bin/gdm

100

6. X

, , .# gdm - GNOME: # if [ -x /usr/bin/gdm ]; then # exec /usr/bin/gdm -nodaemon # fi # ? , kdm - KDE: if [ -x /opt/kde/bin/kdm ]; then exec /opt/kde/bin/kdm -nodaemon fi # XDM - , , , : if [ -x /usr/X11R6/bin/xdm ]; then exec /usr/X11R6/bin/xdm -nodaemon fi

, (#), , . , gdm , ( bash) .

101

6. X

102

7. Linux , - . Slackware . , . . LILO. Slackware LILO Loadlin. LILO , , , . Loadlin DOS, DOS Linux. Linux GRUB. GRUB Slackware. Slackware - , . GRUB , LILO, LILO . GRUB, , . Slackware, . GRUB (, Linux, ), . LILO Loadlin - , Slackware. .

103

7.

7.1. LILO Linux (Linux Loader LILO) , Linux. . Slackware Linux LILO liloconfig. , , liloconfig.

LILO /etc/lilo.conf(5). , . , LILO, . LILO - lilo.conf, lilo . liloconfig , LILO . /etc/lilo.conf , , LILO, /sbin/lilo ( root). liloconfig , :

104

7.

7-1. lilocongINSTALL LILO LILO (Linux Loader) is a generic boot loader. Theres a simple installation which tries to automatically set up LILO to boot Linux (also DOS/Windows if found). For more advanced users, the expert option offers more control over the installation process. Since LILO does not work in all cases (and can damage partitions if incorrectly installed), theres the third (safe) option, which is to skip installing LILO for now. You can always install it later with the liloconfig command. Which option would you like? simple Try to install LILO automatically expert Use expert lilo.conf setup menu skip Do not install LILO< OK > < Cancel >

LILO, simple. expert, LILO Linux. simple LILO. , liloconfig , . , XFree86. , , normal 80x25. LILO . , , . :Root

LILO Linux. , .

105

7.

. , LILO , Linux . /boot . , LILO , LILO . LILO , 1024 cylinder limit ( 1024- ). LILO , 1024- . LILO .Floppy

, . , Linux. , , Slackware, . . -, . -, . , , .MBR

, Slackware , LILO . LILO .

,

MBR.

106

7.

liloconfig LILO. . expert, . /etc/lilo.conf, LILO . expert :

7-2. lilocong: expertEXPERT LILO INSTALLATION This menu directs the creation of the LILO config file, lilo.conf. To install, you make a new LILO configuration file by creating a new header and then adding one or more bootable partitions to the file. Once youve done this, you can select the install option. Alternately, if you already have an /etc/lilo.conf, you may reinstall using that. If you make a mistake, you can always start over by choosing Begin. Which option would you like? Begin Start LILO configuration with a new LILO header Linux Add a Linux partition to the LILO config DOS Add a DOS/Windows FAT partition to the LILO config Install Install LILO Recycle Reinstall LILO using the existing lilo.conf Skip Skip LILO installation and exit this menu View View your current /etc/lilo.conf Help Read the Linux Loader HELP file< OK > < Cancel >

, . liloconfig .

107

7.

7.2. LOADLIN Slackware Linux LOADLIN. LOADLIN - DOS-, Linux DOS. , Linux DOS, LOADLIN . LOADLIN root ZIP-. LOADLIN . Linux ( /boot/vmlinuz) LOADLIN root DOS.

LOADLIN , DOS. AUTOEXEC.BAT, Linux DOS. Linux LOADLIN, Slackware. AUTOEXEC.BAT Windows 95 :@ECHO OFF SET PROMPT=$P$G SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\ CLS ECHO Please Select Your Operating System: ECHO. ECHO [1] Slackware Linux ECHO [2] Windows 95 ECHO. CHOICE /C:12 "Selection? -> " IF ERRORLEVEL 2 GOTO WIN IF ERRORLEVEL 1 GOTO LINUX :WIN CLS ECHO Starting Windows 95... WIN GOTO END

108

7.

:LINUX ECHO Starting Slackware Linux... CD \LINUX LOADLIN C:\LINUX\VMLINUZ ROOT= RO GOTO END :END

Linux, , /dev/hda2 - . LOADLIN . . , LOADLIN, .

7.3.

Slackware Linux . , .

Windows MS Windows Linux , , . , . , , . , , . Linux ,

109

7.

. Linux . Windows, MBR, , Linux .

LILO LILO Linux Windows. , Windows, - Linux. , IDE- 40. , Windows, - Linux. Linux.20GB 1GB 19GB Windows boot (C:) Linux root (/) Linux /usr (/usr)

Linux . . 64 128 .. IRC Usenet. - , ( 512 .). Windows. Linux. LILO. LILO

expert.

110

7.

LILO. (MBR) , . , Linux Windows ( DOS). LILO. . LILO, , . ( LILO) Enter.

LILO . Linux DOS. , . lilo(8) lilo.conf(5) . , LILO ? , LILO . Linux Windows.

LOADLIN , LILO , LILO. , Windows. Windows MBR, LILO. LOADLIN . , LOADLIN Linux. LOADLIN, . - MBR, . LOADLIN Windows. Slackware

111

7.

LILO. loadlinX.zip ( X - 16a) root Windows. . Linux. , :# mkdir /win # mount -t vfat /dev/hda1 /win # mkdir /win/linux # cd /root # cp loadlin* /win/linux # cp /boot/vmlinuz /win/linux # cd /win/linuz # unzip loadlin16a.zip

Windows C:\LINUX (, /dev/hda1). LOADLIN. Windows, . Windows . , .C:\> C:\> C:\>cd \ attrib -r -a -s -h MSDOS.SYS edit MSDOS.SYS

:BootGUI=0

. C:\AUTOEXEC.BAT, . AUTOEXEC.BAT, :cls

112

7.

echo System Boot Menu echo. echo 1 - Linux echo 2 - Windows echo. choice /c:12 "Selection? -> " if errorlevel 2 goto WIN if errorlevel 1 goto LINUX :LINUX cls echo "Starting Linux..." cd \linux loadlin c:\linux\vmlinuz root=/dev/hda2 ro goto END :WIN cls echo "Starting Windows..." win goto END :END

, LOADLIN. , Linux , . Slackware Linux. , .

Windows NT . LILO Windows NT. Linux NTLDR, , Windows 9x Linux. , . LILO Windows

113

7.

NT/2000/XP/2003 . , , . 1. Windows NT. 2. Linux, , LILO Linux. 3. 512 Linux Windows NT. 4. C:\BOOT.INI Windows NT, Linux. Windows NT Linux. . 512 Linux , . Linux. , Linux /dev/hda2, :# dd if=/dev/hda2 of=/tmp/bootsect.lnx bs=1 count=512

. bootsect.lnx Windows NT. . Linux NTFS. Windows NT NTFS, FAT, Windows NT. Windows NT FAT, Linux . /tmp/bootsect.lnx Linux C:\BOOTSECT.LNX Windows NT. Windows NT. Windows NT .C:\WINNT>cd \

114

7.

C:\> C:\>

attrib -r -a -s -h boot.ini edit boot.ini

:C:\bootsect.lnx="Slackware Linux"

. Windows NT c Linux. , Linux.

Linux, . . LILO /etc/lilo.conf. , .

115

7.

116

8. (shell) , : , , .. (shell, ), . ( ) . - , , Linux - Bourne Again Shell (bash). , , bash(1).

8.1.

- :Welcome to Linux 2.4.18 Last login: Wed Jan 1 15:59:14 -0500 2005 on tty6. darkstar login:

... . darkstar? . (

117

8. (shell) , Linux. 2.8 .) Darkstar ( ) - , . , darkstar . ... , root. . , . Enter. !

Root: , root? ? Unix (, Linux), . , , root . root , . . root , . , root - . , ? : , . , root . root (. ), . 12.1.1, , , . , root , , ,

118

8. (shell)

. , , root, , - . su(1). root, root , exit logout. su, , : su jack, , ( ).

:

root

su

.

8.2.

, . , , - , , - . . , , - , , . , , Linux ? . , ( ), ,

119

8. (shell)

- . , . , su ? /bin: /bin/su . su? , /bin. /usr/local/share, ? ? PATH (). PATH - . , . , su, , su, . . , . Command not found ( ), , , , PATH. (, , ...) . 8.3.1. , . () , , /bin, ./su , .

, . (wildcard); * () ?. ?

120

8. (shell)

. , , : ex1.txt, ex2.txt ex3.txt. ( cp, . 10.5.1) , , /tmp. cp ex1.txt ex2.txt ex3.txt /tmp . cp ex?.txt /tmp; ? 1, 2 3, . ? ? . . , . (*). , * , 0. , , cp * /tmp, . , ex.txt hejaz.txt. ex.txt; cp ex* /tmp . cp ex?.txt /tmp , , ; ex.txt , ?, . [ ]. , , . ? . , , : a1, a2, a3, a4, aA, aB, aC aD. , ; [ ].% ls a[1-4]

a1 a2 a3 a4

, a1, a2 a4? ,

121

8. (shell)

1 4. .% ls a[1,2,4]

a1 a2 a4

, : ? Linux , .. a A - , . , A B a b. . a1 A1, [ ].% ls [A,a]1

A1 a1

, , .% ls [A-a]1

A1 B1 C1 D1 a1

.% ls [A,a-d]

A1 a1 b1 c1 d1

/ ( - .) , :) (. ).% ps > blargh

122

8. (shell)

, ? ps, ; ps . 11.3. . > blargh, , , : ps blargh. , .% ps | less

ps (pipe) less, .% ps >> blargh

; , >, , >> ps blargh, . > (> blargh.) unixfile.txt

, :% ps | tac >> blargh

ps, , blargh. , , . bash(1) .

123

8. (shell)

8.3. Bourne Again Shell (bash)

Linux - , , ( ). , , , .. . , , ; . ( ). bash, . set , . bash set ( ); bash(1). . 8-1 set, . PATH, . , , .% unset

unset ,

124

8. (shell)

8-1. set% set

PATH=/usr/local/lib/qt/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin: /usr/openwin/bin:/usr/games:.:/usr/local/ssh2/bin:/usr/local/ssh1/bin: /usr/share/texmf/bin:/usr/local/sbin:/usr/sbin:/home/logan/bin PIPESTATUS=([0]="0") PPID=4978 PS1=\h:\w\$ PS2=> PS4=+ PWD=/home/logan QTDIR=/usr/local/lib/qt REMOTEHOST=ninja.tdn SHELL=/bin/bash

, . bash , . ( . - , .)% export =

export . . , . - , . , , , PATH. - :% export PATH=$PATH:///

$PATH: , bash (.. ), $. , echo $PATH PATH; :

125

8. (shell)

% echo $PATH

/usr/local/lib/qt/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin: /usr/openwin/bin:/usr/games:.:/usr/local/ssh2/bin:/usr/local/ssh1/bin: /usr/share/texmf/bin:/usr/local/sbin:/usr/sbin:/home/logan/bin

( - .) 1. . 2. - . 3. . 3 2 , (4) . bash (5) ( ). : bash ? , , bash (tab completion). : . PATH, . , - , . Tab. bash , ! . /usr/src : /usr/ src/linux /usr/src/sendmail. , /usr/src/ linux. ls /usr/src/l, TAB, bash ls /usr/src/linux.

126

8. (shell)

, : /usr/src/linux /usr/src/linux-old. /usr/src/l TAB, bash , , /usr/src/linux. TAB, bash , , . , (, , ).

8.4.

, - , - . , , ? , ? ? . , . . , . , Linux , . Alt , ; . Slackware (login) 6- . Alt+F2 , Alt+F3 .. X-.

127

8. (shell)

X- , (Alt+F7) . X Alt+ . Ctrl+Alt+ . . X ( X-), Ctrl+Alt+F3 . (Alt+F7 X , X-.)

screen , ? ? Slackware - screen. screen - , . screen , . screen . screen Crtl+A. , Ctrl+A+C . Ctrl+A+N . Ctrl+A+P .screen

screen, ssh telnet ( ). Ctrl+A+D . screen -r screen, .% screen -r

There are several suitable screens on: 1212.pts-1.redtail (Detached) 1195.pts-1.redtail (Detached) 1225.pts-1.redtail (Detached) 17146.pts-1.sanctuary (Dead ???) Remove dead screens with screen -wipe.

128

8. (shell)

Type "screen [-d] -r [pid.]tty.host" to resume one of them.

screen -r 1212 . , . Slackware ssh, - (, ), , . screen . . screen .

129

8. (shell)

130

9. Slackware Linux. . , .

Linux . , . , . , , NFS. , .

9.1.

. , . ls:% ls -l /usr/bin/wc

-rwxr-xr-x

1 root

bin

7368 Jul 30

1999 /usr/bin/wc

. , . ,

131

9. root bin. chown(1) ( . change owner) chgrp(1) ( . change group). daemon, chown:# chown daemon /usr/bin/wc

, chgrp:# chgrp root /usr/bin/wc

,

root,

chown , , :# chown daemon:root /usr/bin/wc

. , . chown. Windows Exchange, , : [email protected]. Slackware Linux , , . chmod mr.jones mr jones. Linux, . .

132

9.

9.2.

. , , , . , . : , . : (UID), (GID) sticky-. , ( , ls chmod):

9-1. 1 4 2 4 2 1 t s s r w x

sticky- ID ID

. , , 6 , .

133

9.

bash :% ls -l /bin/bash

-rwxr-xr-x

1 root

bin

477692 Mar 21 19:57 /bin/bash

d. (, ). , , (rwx). (r-x). (r-x). , bash? :% touch /tmp/example % ls -l /tmp/example

-rw-rw-r---

1 david

users

0 Apr 19 11:21 /tmp/example

example chmod(1) ( . change mode). , . , , 7. - 5. ( !) chmod:% chmod 755 /tmp/example % ls -l /tmp/example

-rwxr-xr-x

1 david

users

0 Apr 19 11:21 /tmp/example

: ? . bash umask. Unix , . bash . 8.3.1. umask chmod, .

134

9.

, . umask 0022.% umask

0022% umask 0077 % touch tempfile % ls -l tempfile

-rw--------

1 david

users

0 Apr 19 11:21 tempfile

bash. chmod, . , ID ID , 6:% chmod 6755 /tmp/example % ls -l /tmp/example

-rwsr-sr-x

1 david

users

0 Apr 19 11:21 /tmp/example

, chmod . :

u g o a

:% chmod a+rx /tmp/example % chmod u+w /tmp/example % chmod ug+s /tmp/example

, .

135

9.

. , shell-. . , , . - .% ls -l /tmp/

-rwxr-xr-x -rwxr-x------r-xr-x -rwx---r-x -rwx------------r-x

1 alan 1 alan 1 alan 1 alan 1 alan 1 alan

users users users users users users

0 Apr 19 11:21 /tmp/example0 0 Apr 19 11:21 /tmp/example1 0 Apr 19 11:21 /tmp/example2 0 Apr 19 11:21 /tmp/example0 0 Apr 19 11:21 /tmp/example1 0 Apr 19 11:21 /tmp/example2

% chmod g-rwx /tmp/example?

, ID (SIUD, set user ID) ID (SGID, set group ID). , . , , . , . . , . , , ( root). , . . SUID- SGID- . SUID- , root, root. , ,

136

9.

. , ID , .

9.3.

. , . : . - . , . , . ( ) , . , . , , . , . , /var/tmp /tmp. , , . :% ls -l /bin/sh

lrwxrwxrwx

1 root

root

4 Apr

6 12:34 /bin/sh -> bash

137

9.

sh Slackware - bash. rm. ln. . 10. . , . , , . , . , .

9.4.

. 4.1.1, . , CD-ROM . , , , mount(1) umount(1). . /etc/fstab. , , . .

fstab /etc/fstab:

138

9.

% cat /etc/fstab

/dev/sda1 /dev/sda2 /dev/sda4 /dev/sdb1 /dev/sdb3 none none /dev/fd0 /dev/cdrom

/ /usr/local /home swap /export /dev/pts /proc /mnt /mnt/cdrom

ext2 ext2 ext2 swap ext2 devpts proc ext2 iso9660

defaults defaults defaults defaults defaults gid=5,mode=620 defaults defaults ro

1 1 1 0 1 0 0 0 0

1 1 1 0 1 0 0 0 0

. - , SCSI-, , , CD-ROM. . . . Linux ext2 (), ext3, reiserfs, xfs jfs. CD-ROM DVD iso9660 auto, Windows msdos, vfat ntfs. , . defaults . , , ro. . , fstab(5). fsck , . . Slackware Linux setup fstab.

139

9.

mount

umount

. , - mount . mount , /etc/fstab . , , CD-ROM, fstab , . mount :% mount /cdrom

fstab , mount , . , mount :% mount -t iso9660 -o ro /dev/cdrom /cdrom

, fstab,