You are on page 1of 77

Nh ng cu h i th ng g p v Linux

Nguy n Thi Ng c Duy


pclouds@users.sourceforge.net

L Tr ng Vn
zow82@yahoo.co.uk

y l danh sch Cc cu h i th ng g p (Frequently Asked Questions) c a Linux, m t h i u hnh t o ch y trn nhi u h th ng my tnh khc nhau. Ti li u ny c t ng h p t Linux-FAQ (http://www.tldp.org/FAQ/Linux-FAQ/index.html). Ti li u ny trong ang trong giai o n d ch phc th o. R t mong nh n cc ki n ng gp, ph bnh.. v ti li u ny. M i ki n xin g i n <pclouds@users.sourceforge.net>.

M cl c
Gi i thi u v thng tin chung ...................................................................................................................1 Ngu n v ti nguyn m ng .......................................................................................................................9 Tnh tng thch v i cc h i u hnh khc .........................................................................................19 H th ng t p tin, a, v a ................................................................................................................25 Porting, bin d ch v l y chng trnh ..................................................................................................32 Gi i php cho cc v n linh tinh thng th ng ................................................................................37 Lm i u ny nh th no ho c tm hi u ci kia ra sao......................................................................45 Thng tin linh tinh v cc cu h i c tr l i ....................................................................................58 Cc thng bo l i th ng g p.................................................................................................................63 X Window System....................................................................................................................................70 Tm tr gip su hn nh th no .........................................................................................................73

Nh ng cu h i th ng g p v Linux

Gi i thi u v thng tin chung


H: Linux l g? : Linux l m t h i u hnh tng t nh h i u hnh UNIX c a AT&T Bell Labs. Linux c m i c tnh c a m t h i u hnh hi n i: h th ng a nhi m, a tuy n o n, b nh o, th vi n ng, chng trnh dng chung, t i theo nhu c u, qu n l b nh , cc mun driver thi t b , video frame buffering, v m ng TCP/IP. Tuy nhin, h u h t m i ng i xem h i u hnh, cc ph n m m h th ng v ph n m m ng d ng l Linux, v quy c ny cng c dng trong FAQ ny. Linux Torvalds v nhm l p trnh vin tnh nguy n t kh p ni trn Internet vi t (v v n ti p t c vi t) Linux t con s khng. H t nhn Linux (Linux kernel) c phn ph i theo nh ng i u kho n c a Gi y php GNU GPL (GNU General Public License). (Gi y php m ngu n m Linux l g?) Cc phin b n c a h t nhn Linux t t i http://ps.cus.umist.ac.uk/~rhw/kernel.versions.html. Hy xem thm cc bi vi t Wikipedia t i Linux kernel (http://www.wikipedia.com/wiki.phtml?title=Linux+kernel) v Linux operating system (http://www.wikipedia.com/wiki.phtml?title=Linux+operating system).

H: Linux h tr h my no? : Linux ban u c vi t cho my PC dng b vi x l c a Intel, dng cc tnh nng ph n c ng c a b vi x l 80386 v nh ng b vi x l th h sau c a 80386. H my 80386 bao g m 80486, v t t c cc chip Pentium. Tuy nhin, ngy nay Linux c th c dng trn nhi u h my khc nhau (Chuy n qua cc h my khc) C nhi u b n phn ph i Linux (Linux distribution) c bi t dnh ring cho cc my c m tay v my di ng. c t API b cng c pht tri n cho B vi x l Crusoe Smart c pht tri n b i Transmeta Corporation t t i http://www.transmeta.com. Thng tin v b n phn ph6i Linux cho Compaq iPAQ t t i http://www.handhelds.org. Ngoi ra hy tham kh o Linux INFO-SHEET (http://www.tldp.org/HOWTO/INFO-SHEET.html) bi t thm chi ti t cng nh cc cu tr l i cho Ti li u u?, Ph n c ng no c h tr ?, v Chuy n qua cc h my khc, bn d i.

H: Cc phin b n Linux ho t ng nh th no? : T i th i i m ny, c vi phin b n Linux n nh1, v m t phin b n pht tri n2. Khng gi ng nh cc ph n m m c quy n, nh ng phin b n n nh c v n ti p t c c h tr ch ng no cn c dng. l l do t i sao c nhi u phin b n cng t n t i. S hi u phin b n Linux tun theo chu n truy n th ng. M i phin b n g m ba ch s , v.d. X.Y.Z. S X ch tng khi x y ra nh ng thay i r t quan tr ng, nh ng thay i lm cho ph n m m khng th ho t ng ng n v i nh ng ph n m m khc. i u ny r t hi m khi x y ra - trong l ch s Linux ch x y ra ng m t l n.

Nh ng cu h i th ng g p v Linux S Y cho bi t s series pht tri n b n ang dng. M t h t nhn n nh lun c s Y l s ch n, trong khi m t h t nhn ang pht tri n s dng s l S Z xc nh chnh xc phin b n c a h t nhn b n dng, n c tng m i phin b n S hi u phin b n hi n th i l 2.4.x, v phin b n ang pht tri n l 2.5.x. Tuy nhin nhi u ng i ti p t c dng h t nhn 2.2.x v th m ch c 2.0.x, v nh ng phin b n ny v n ti p t c c s a ch a. Series ang pht tri n ni cc nh pht tri n Linux ang ho t ng tch c c. Series ny lun c cng b r ng ri xem, ki m tra, v th m ch s d ng, m c d khng nn dng series ny! Cu i cng, series 2.5.x s tr thnh h t nhn 2.6.0 v phin b n n nh m i c t o ra, v series pht tri n 2.7.x s ti p t c. Ho c n u c nh ng thay i th t s quan tr ng, c th n s tr thnh 3.0.0, v series 3.1.x s ti p t c.

H: Ti nn b t u t u? : N u b n cha bi t Linux, b n nn b t u b ng cch mua ho c t i v m t b n phn ph i Linux ph d ng. M t b n phn ph i l m t h i u hnh hon ch nh, bao g n h t nhn Linux v cc ti n ch, cc ph n m m c n thi t, s n sng ci t v s d ng. H u h t cc b n phn ph i ch a hng ngn gi ph n m m (software package), bao g m cc giao di n ho , b ph n m m vn phng, v cc tr chi C m t nhm cc b n phn ph i chnh, v b n nn dng chng. bi t thm thng tin v cc b n phn ph i ny v cch ci t chng, hy xem CD-Distributions-EN-HOWTO (http://www.tldp.org/HOWTO/CD-Distributions-EN-HOWTO/index.html) thu c Linux Documentation Project. Ngoi ra, danh sch cc b n phn ph i c c p nh t hng tu n c t i http://old.lwn.net/Distributions. Tr c khi b n ch n b n phn ph i mu n dng, hy c cc m t c n th n v so snh v i nhu c u c a b n. M i b n phn ph i c thi t k cho m t lo i ng i dng ring bi t. Vi b n c t i u ho t ng nh server, vi b n khc c dng chi game, vi b n khc l i c dng cho my bn v cc ng d ng vn phng. C m t s t b n phn ph i c xem l s l a ch n cho ng i dng m i:

Red Hat c bi t t t cho server Mandrake l h th ng bn xu t s c SuSE cng l h th ng bn xu t s c

Ngoi ra cn c m t s l n cc phin b n c phn ph i t ph d ng hn v thch h p v i cc nhu c u n i b ho c dnh cho qu c gia. Ph n l n trong s n m t i ftp://ftp.tux.org.

H: C th l y m t b n phn ph i nh th no? : N u b n c kh nng, hy mua m t b n phn ph i. Cc b n phn ph i Linux c c k r - th ng vo kho ng 30$ cho m t h th ng hon ch nh, v u trong kho ng 70$ n 150$ cho m t h th ng l n hn v i nhi u ph n m m server hn ho c nhi u cng c pht tri n hn. Th m ch v i b n phn ph i c b n 30$ cng tng ng v i hng ngn la cc cng c c quy n, v chng r t c gi tr . Cc nh phn ph i dng ti n c a b n u t pht tri n, v th ng n m ngoi cc d n m ngu n m (open source). V i cc b n phn ph i thng m i, b n c th t mua thng qua web site c a cng ty .

Nh ng cu h i th ng g p v Linux N u b n dng Debian GNU/Linux, m t b n phn ph i phi l i nhu n, do ng i tnh nguy n t o ra, b n c th ng h b ng ti n cho h .

: C vi website bn cc a CD Linux r t r . Hy th :

http://www.cheapbytes.com

: Cc b n phn ph i c th c t i v t trang ch c a cc b n phn ph i . y l yu c u trong cc i u kho n gi y php c a ph n m m, v th n u b n khng th mua m t b n phn ph i, b n c th l y chng theo cch ny. Vi ng i dung ha gi a tr ti n v t i v t m ng, v d , mua m i phin b n chnh (nh 6.0) nhng t i v cc phin b n ph (nh 6.1 v 6.2). Ngoi ra, nhi u b n phn ph i c lu t i: ftp://ftp.tux.org v http://planetmirror.com/pub/linux.

: Vi nh s n xu t ph n c ng km theo b n Linux ci t s n trn h th ng c a h . Tuy nhin, i khi r t kh mua chng - h cung c p Linux ch trn m t s t h th ng, th ng l server, ho c h yu c u b n t i ph n "Linux" trn website c a h . H: Ci t Linux nh th no? : Khi c m t b n phn ph i, n s ch a cc ch d n ci t. M i b n phn ph i c chng trnh ci t ring. : C m t ti li u ci t r t hon ch nh t i http://heather.cs.ucdavis.edu/~matloff/linux.html : Vi b n phn ph i (v.d. Debian GNU/Linux) c th c ci t qua FTP v danh trn m ng. Nhng, tr khi b n c cp, DSL, ho c c kh nng truy c p Internet v i bng thng r ng, cn n u khng th cch ci t ny khng th c t l m v kch th c cc b n phn ph i r t l n ("FTP c a Linux u?") Cc b n tin trn Usenet, bao g m FAQ, c lu http://groups.google.com/ . Hy tm ch comp.os.linux.*, alt.uu.comp.os.linux.*, ho c b t c th g ph h p, b n s nh n c cc bi vi t trn Usenet. ("C nh ng Nhm Tin (newsgroup) no cho Linux?")

H: Linux h tr ph n m m no? : Linux ch y c t t c cc ti n ch m ngu n m chu n, nh GCC, (X)Emacs, X Window System, m i ti n ch Unix chu n, TCP/IP (bao g m SLIP v PPP), v hng trm chng trnh c m i ng i hi u ch nh ch y trn Linux. C m t trnh m ph ng DOS, g i l DOSEMU, cho php Linux ch y cc chng trnh c vi t trn DOS. Phin b n n nh m i nh t l 0.98.3. FTP t t i ftp://ftp.dosemu.org/dosemu. Web site t i http://www.dosemu.org.

Nh ng cu h i th ng g p v Linux Trnh m ph ng c th ch y chnh DOS v m t vi (nhng khng ph i t t c ) cc ng d ng DOS. Hy xem t p tin README xc nh nn l y phin b n no. Ngoi ra nn xem DOSEMU-HOWTO (http://www.tldp.org/HOWTO/DOSEMU-HOWTO.html) (tuy nhin, n khng c p n nh ng phin b n m i nh t), t i ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. WINE, trnh m ph ng Microsoft Windows, v n ang trong giai o n pht tri n. ("Linux c th ch y cc chng trnh trn Microsoft Windows khng?") Trnh m ph ng Chu n Tng thch Nh phn Intel (Intel Binary Compatibility Standard - iBCS2) cho SVR4 ELF v SVR3.2 COFF c th c ch n lc bin d ch. Thng tin v iBCS2 c t i ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/README. bi t thm thng tin, hy xem INFO-SHEET (http://www.tldp.org/HOWTO/INFO-SHEET.html). Vi cng ty a ra cc ph n m m thng m i. H th ng cng b trn comp.os.linux.announce. Hy th tm trong kho lu. ("News Groups c cn c lu ch no khc khng?").

H: Tm cc ph n m m c bi t nh th no? : Tr c h t hy tm trong Linux Software Map, t i: ftp://metalab.unc.edu/pub/Linux/docs/linux-software-map/, v trn cc a ch FTP khc. C m t my tm ki m t i http://www.boutell.com/lsm/ . Ngoi ra hy tm t i Freshmeat (http://www.freshmeat.net). y l ni cng b cc ph m m m m i. Freshmeat l ni lin t c c p nh t cc thng bo v ph n m m m i, c p nh t cc ph n m m c trong Linux, lin k t t i URL c a cc ph n m m . Cc a ch FTP ("FTP c a Linux u?") th ng c t p tin ls-lR ho c th m c INDEX li t k danh sch t p tin. B n c th tm b ng cch dng l nh grep ho c m t b so n th o vn b n. Cc t p tin li t k lo i ny c th r t l n nn r t kh dng chng tm ki m nhanh. Ngoi ra hy tm t i Linux Projects Map: ftp://ftp.ix.de/pub/ix/Linux/docs/Projects-Map.gz. C m t my tm ki m Linux FTP archive t i: http://lfw.linuxhq.com. Tm t Linux trn Web cung c p m t l ng tham chi u d i do. ("Nh ng th khc v Linux trn Web u?") N u b n khng tm c th g, b n c th t i m ngu n c a chng trnh v v t bin d ch chng. Hy xem ("Lm sao chuy n XXX sang Linux?"). N u l m t gi ph m m m l n v c n m t vi hi u ch nh ch y, hy g i thng bo ln comp.os.linux.development.apps. i u ny r t hi m khi x y ra v Linux r t ph d ng. M t l ng l n cc ph n m m quan tr ng trn cc h th ng h Unix c chuy n sang Linux t lu. N u b n bin d ch m t chng trnh ln, vui lng upload n ln m t ho c nhi u FTP, v thng bo trn comp.os.linux.announce (g i thng bo c a b n t i linux-announce@news.ornl.gov (mailto:linux-announce@news.ornl.gov)). N u b n ang tm m t chng trnh, r t c kh nng m t ng i no vi t chng trnh r i. FAQ comp.sources.wanted c nh ng ch d n tm m ngu n c a cc chng trnh .

Nh ng cu h i th ng g p v Linux H: Ph n c ng no c h tr ? : M t b n ci t Linux t i thi u yu c u m t h my c h tr , v i t nh t 2Mb RAM, v m t a m m. Nhng t n d ng s c m nh Linux, b n ph i c n nhi u RAM v a c ng hn. Hy xem: "Chuy n qua cc h my khc", "Yu c u a cho ci t t i thi u, ci t server, v ci t tr n lm vi c l g?", v "Yu c u b nh t i thi u v t i a l bao nhiu?" Cc my tnh tng thch PC, CPU Intel, c n t nh t l b vi x l 80386 ch y h t nhn Linux chu n. Linux, g m X Window System, ch y trn h u h t laptop. Hy tham kh o cu tr l i c a "Lm th no bi t Notebook c ang ch y Linux hay khng?". C m t l ng l n thng tin v cc my PC c bi t, v card mn hnh, b i u khi n a, v cc lo i ph n c ng khc. Hy tham kh o INFO-SHEET (http://www.tldp.org/HOWTO/INFO-SHEET.html), Laptop-HOWTO (http://www.tldp.org/HOWTO/Laptop-HOWTO.html), v Unix-Hardware-Buyer-HOWTO (http://www.tldp.org/HOWTO/Unix-Hardware-Buyer-HOWTO/index.html). ("Ti li u u?")

H: Chuy n qua cc h my khc : Web site, T ng quan v Linux Ports: http://www.itp.uni-hannover.de/~kreutzm/de/lin_plattforms.html cung c p danh sch known ports. M t a ch khc ch a danh sch port l: http://lodda.igo.uni-hannover.de/ports/linux_ports.html Ngoi ra, cc thng tin sau bn v ports xc nh: Trn h my Intel, VESA Local Bus v PCI bus c h tr . MCA (bus c quy n c a IBM) v c ng ESDI h u h t ng h tr . Nh ng thng tin su hn v bus MCA v card no c Linux h tr c t i trang web Micro Channel Linux, http://www.dgmicro.com/mca. Ngoi ra hy tham kh o cu tr l i: "Nh ng th khc v Linux trn Web u?" Linux cng c th ch y trn 8086, c bi t nh l Embeddable Linux Kernel Subset (ELKS). y l h t nhn Linux 16 bit c dng ch y u trong cc h th ng nhng, t t i: http://www.linux.org.uk/Linux8086.html. Linux chu n khng ch y trn 8086 v 80286 v c n tnh nng qu n l task v b nh ch c trn 80386 v cc th h sau. Linux h tr ki n trc a x l Intel MP. Hy xem t p tin Documentation/smp.tex trong b n phn ph i m ngu n Linux. M t d n ang c tri n khai cho php Linux ho t ng v i h my d a trn 68000 nh Amigas v Ataris. Linux/m68K FAQ t t i http://www.clark.net/pub/lawrencc/linux/faq/faq.html. a ch trang ch c a Linux/m68k t i http://www.linux-m68k.org/faq/faq.html. Jes Sorensen chuy n Linux qua m68k cho Amiga, t t i ftp://sunsite.auc.dk/pub/os/linux/680x0/redhat/. FAQ Ci t (Ron Flory) cho gi ny t t i http://www.feist.com/~rjflory/linux/rh/ . Ngoi ra cn c mailing list linux-680x0. ("Mailing List u?")

C FTP cho d n Linux-m68k t i ftp.phil.uni-sb.de/pub/atari/linux-68k, nhng a ch ny khng cn t n t i n a. Debian GNU/Linux ang c chuy n qua h my Alpha, Sparc, PowerPC, v ARM. C cc mailing lists cho cc cng vi c ny. Hy xem http://www.debian.org/MailingLists/subscribe

Nh ng cu h i th ng g p v Linux One of the Linux-PPC project pages has moved recently. Its location is http://www.linuxppc.org, and the archive site is ftp://ftp.linuxppc.org/linuxppc. Trang h tr Linux-PPC t t i http://www.cs.nmt.edu/~linuxppc/ . phn ph i v i Linux. b n s tm th y kernel c

C hai a ch cho Linux iMac port: http://w3.one.net/~johnb/imaclinux, and http://www.imaclinux.net:8080/content/index.html. 64-bit DEC Alpha/AXP port t t i http://www.azstarnet.com/~axplinux/ . Mailing list t i vger.redhat.com: ("Mailing List u?") Ralf Baechle ang port sang MIPS, ban u cho R4600 trn my Deskstation Tyne. FTP cho Linux-MIPS t t i ftp://ftp.fnet.fr/linux-mips v ftp://ftp.linux.sgi.com/pub/mips-linux. Nh ng ng i quan tm c th g i nh ng cu h i ho c h tr h b ng cch g i th t i linux@waldorf-gmbh.de (mailto:linux@waldorf-gmbh.de). Ngoi ra ( t ng) c m t knh MIPS t i Linux Activists mail server v linux-mips mailing list. ("Mailing List u?") Ngoi ra hi n th i Linux ang c chuy n sang h my ARM. M t trong s ny l dnh cho ARM3, fitted to the Acorn A5000, v bao g m driver I/O cho 82710/11. Ci cn l i l ARM610 c a Acorn RISC PC. RISC PC port hi n ang giai o n gi a, c n vi t l i ph n x l b nh . A5000 port ch c dng th nghi m. B n chnh th c s c cng b trong th i gian g n y. bi t thm thng tin c p nh t, hy c nhm tin comp.sys.acorn.misc. FAQ t t i http://www.arm.uk.linux.org. D n Linux SPARC is a hotbed of activity. There is a FAQ and plenty of other information available from the UltraLinux page, http://www.ultralinux.org. Trang ch c a UltraSPARC port ("UltraPenguin") t t i http://sunsite.mff.cuni.cz/linux/ultrapenguin-1.0/ , m c d URL ny c th khng cn t n t i. Ngoi ra cn c b n Linux cho my SGI/Indy ("Hardhat"). URL l http://www.linux.sgi.com.

H: Yu c u a cho ci t t i thi u, ci t server, v ci t tr n lm vi c l g? : Linux c n kho n 10Mb cho b n ci t t i thi u, thch h p th Linux, v khng g khc. B n c th ci t b n server, bao g m X Window System GUI, v i kho ng 80Mb. Ci t Debian GNU/Linux kho ng 500Mb1GB, bao g m m ngu n h t nhn, ch cho cc t p tin ng i dng, v vng spool. Ci t b n phn ph i thng m i c mi tr ng h a GUI, word processor thng m i, v b ph n m m vn phng, s chi m kho ng 15.1 GB.

H: Yu c u b nh t i thi u v t i a l bao nhiu? : Linux c n t nh t 4MB, v b n s c n dng ti n trnh ci t c bi t cho t i khi ci t disk swap space. Linux s ch y tho i mi v i 4MB RAM, m c d ch y cc ng d ng h a GUI th khng th c t v r t ch m (v ph i lin t c dng swap). Vi ng d ng, nh StarOffice, c n 32 MB b nh v t l, v bin d ch m C++ c th ng n 100MB vng nh v t l v vng nh o m t cch d dng.

Nh ng cu h i th ng g p v Linux C m t b n phn ph i, "Small Linux", s ch y trn my v i 2MB RAM. Hy tham kh o: "FTP c a Linux u?" M t s ng i h i lm th no dng nhi u hn 64MB, gi i h n trn m c nh c a h u h t h t nhn. Ho c l nh p vo t i d u nh c BOOT lilo::
mem=XXM

Ho c t dng sau vo t p tin /etc/lilo.conf:


append="mem=XXM"

Tham s "XXM" l kho ng b nh , tnh theo megabyte; v d , "128M." N u c ch th "append=" trong /etc/lilo.conf, hy thm vo ch th mem= t i cu i i s c, v cch i s cu i cng b ng kho ng tr ng; v.d.:
# Ch l v d ; ng s d ng. append="parport=0x3bc,none serial=0x3f8,4 mem=XXM"

Nh ch y l nh "lilo" ci t c u hnh m i. N u Linux v n khng nh n ra vng nh m i, c th c n vi tham s b sung cho h t nhn. Hay tham kh o t p tin /usr/src/linux/Documentation/memory.txt trong m ngu n h t nhn. bi t thm thng tin v LILO, hy tham kh o ti li u h ng d n c a lilo v lilo.conf, ti li u t t i /usr/doc/lilo, the LILO-HOWTO (), v cu tr l i cho: "Lm th no t c u hnh lc kh i ng?", bn d i.

H: Linux c h tr cc thi t b USB? : T i th i i m ny Linux h tr kho ng vi ch c thi t b USB, v cng vi c v n ang ti p t c h tr cc driver thi t b b sung. C m t trang web chuyn v ch ny, t i http://www.linux-usb.org. Ngoi ra cn c m t ti li u LDP, t i: ("Nh ng th khc v Linux trn Web u?") H tr USB phin b n 2.0 c thm vo g n y trong h t nhn ang pht tri n, nhng v n cha c trong h t nhn 2.4.

H: Gi y php m ngu n m Linux l g? : Nhn hi u thng m i Linux thu c v Linus Torvalds. ng ta quy t nh dng Gi y php Cng c ng GNU (GNU General Public License) cho Linux. Ni chung, gi y php ny cho php b n t o sao chp, thay i, phn ph i Linux, nhng b n khng th n nh b t k rng bu c no trn cc b n phn ph i , v b n ph i cng khai m ngu n. FAQ cho GPL t t i: http://www.gnu.org/copyleft/gnu-faq.html.

Nh ng cu h i th ng g p v Linux Gi y php ny khng gi ng nh Vng cng c ng3. Hy xem Copyright FAQ, ftp://rtfm.mit.edu/pub/usenet/news.answers/law/copyright, bi t thm chi ti t. Chi ti t y n m trong t p tin COPYING trong m ngu n h t nhn Linux (c l n m trong /usr/src/linux trn h th ng c a b n). Gi y php c a nh ng ti n ch v ch ng trnh trong b phn ph i r t khc nhau. Nhi u o n m thu c d n GNU t i Free Software Foundation, v s d ng gi y php GPL. Vi chng trnh quan tr ng khc dng gi y php BSD v cc lo i gi y php khc. Ch r ng vi c th o lu n v gi tr v nh ng th khc c a GPL nn c g i ln gnu.misc.discuss, ng g i ln nhm comp.os.linux. V i nh ng legal question, hy tham kh o cu tr l i: (Where Are Linux Legal Issues Discussed?)

H: Linux c ph i l *nix? : M t cch chnh th c, m t h i u hnh khng th c g i l UNIX cho t i khi n v t qua cu c ki m tra ch ng nh n c a Open Group, v h tr cc API c n thi t. R t t h i u hnh thng m i v t qua c cc bi ki m tra c a Open Group. bi t thm thng tin, hy xem http://www.unix-systems.org/what_is_unix.html. : M t cch khng chnh th c, Linux r t gi ng v i nh ng h th ng th ng c g i l Unix, v trong nhi u tr ng h p th chng tng ng nhau.

Ngu n v ti nguyn m ng
H: Phin b n h t nhn m i nh t u trn Internet? : Cch c p nh t h t nhn d nh t l c p nh t tr c ti p t b n phn ph i b n ang dng. : N u b n mu n ho c c n c u hnh v bin d ch kernel cho ring b n, trang web http://www.kernel.org/ li t k cc phin b n h t nhn n nh v ang pht tri n. N u b n mu n t i m ngu n v , hy FTP t i ftp.xx.kernel.org, trong xx l k hi u tn mi n qu c gia c a b n; v.d us l Hoa K, ca l Canada, de l c, v vi l Vi t Nam. H t nhn phin b n 2.2.x c lu t i th m c pub/linux/kernel/v2.2, as are patches for the prerelease versions. M ngu n c a h t nhn c lu b ng cc t p tin .tar.gz, v .tar.bz2. Hy lm theo nh ng ch d n trong b t k tham kh o chu n no bin d ch h t nhn, nh b n lm v i cc h t nhn t t o khc c a b n. Th m c Documentation ch a thng tin v tc gi c a cc h th ng con khc nhau v cc driver, v r t nhi u thng tin khng tm th y nh ng ni khc. N u b n mu n tham gia pht tri n h t nhn, hy ng k mailing list linux-kernel bi t ai ang lm g. Hy xem cu tr l i: Mailing List u? C m t cu truy n v nh ng c tnh c a h t nhn 2.4.x t i http://features.linuxtoday.com/stories/8191.html.

Nh ng cu h i th ng g p v Linux H: Ti li u u?

: Hy tm nh ng ni sau, v cc a ch mirror c a n.

D n Ti li u Linux (The Linux Documentation Project) t i http://www.tldp.org xu t b n hng trm ti li u v cch s d ng Linux. ftp://ftp.funet.fi/pub/OS/Linux/doc/HOWTO/ ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO/ ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/ u?

c danh sch cc FTP cho Linux, hy xem cu tr l i: FTP c a Linux N u b n khng th truy c p FTP, hy th cc server FTP-qua-th:

ftpmail@decwrl.dec.com (mailto:ftpmail@decwrl.dec.com) ftpmail@doc.ic.ac.uk (mailto:ftpmail@doc.ic.ac.uk) ftp-mailer@informatik.tu-muenchen.de (mailto:ftp-mailer@informatik.tu-muenchen.de)

Danh sch hon chnh cc HOWTO hi n c n m trong t p tin HOWTO-INDEX t i http://www.tldp.org/HOWTO/HOWTO-INDEX/howtos.html. Danh sch cc HOWTO mini t i http://www.tldp.org/HOWTO/HOWTO-INDEX/mini.html. Ngoi ra, cc b n d ch cn c t i ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/ v cc mirror trn ton c u. HOWTO v nh ng ti li u khc c d ch ra cc ngn ng sau:

Trung Hoa (zh) Croatia (hr) Php (fr) c (de) Hellenic (el) Indonesia (id) (it) Nh t (ja) Hn Qu c (ko) Ba Lan (pl) Slovenia (sl) Ty Ban Nha (es) Th y i n (sv) Th Nh K (tr)

Cc ti li u b sung v n ang c vi t. Vui lng lin l c v i coordinator n u b n mu n vi t ti li u. Thng tin lin l c v g i bi vi t t i http://www.tldp.org/mailinfo.html. Ngoi ra cn c trang LDP HOWTO t i http://howto.tucows.org/ .

10

Nh ng cu h i th ng g p v Linux Danh sch C m nang h ng d n c a The Linux Documentation Project t i http://www.tldp.org. Vui lng c chng n u b n cha t ng bi t Unix v Linux. V d nhin v n c m t s ng i vi t cc ti li u c l p v i LDP:

Linux Administrators Security Guide, b i Kurt Seifried. http://www.freek.com/lasg/ . Newbies Linux Manual. http://www.tldp.org/nlm/ . One-Page Linux Manual. http://www.powerup.com.au/~squadron/ . Rute Users Tutorial and Exposition. http://rute.sourceforge.net Short beginners manual for Linux. Ngoi ra cn c b n ti ng H Lan. http://www.stuwww.kub.nl/people/b.vannunen/linux-man.php3. Virtual Frame buffer HOWTO, b i Alex Buell. http://www.tahallah.demon.co.uk/programming/prog.html X11 & TrueType Fonts, b i Peter Kleiweg. http://www.let.rug.nl/~kleiweg/ .

Ti li u cho nh pht tri n h t nhn c tr c tuy n t i http://kernelbook.sourceforge.net. tm hi u v h th ng qu n l b nh c a Linux, bao g m cc hi u ch nh c i thi n hi u su t, hy xem trang Web c a Rik van Riel t i http://humbolt.geo.uu.nl/Linux-MM/ . Linux Consultants-Guide c m t th m c cc nh t v n Linux. Bck khoa ton th c a Gary li t k trn 4,000 lin k t c lin quan. URL c a n l http://members.aa.net/~swear/pedia/index.html. Ngoi ra cn c FAQ cho b n phn ph i Red Hat t i http://www.best.com/~aturner/RedHat-FAQ/faq_index.html.

H: Nh ng th khc v Linux trn Web

u?

: Ngoi trang ch c a Linux Document Project: http://www.tldp.org, cn c nhi u trang cung c p thng tin nng cao v Linux. Hai trang sau l i m kh i u t t cho cc thng tin chung v Linux: Trang ch c a Linux International, t i http://www.li.org, v trang ch c a Linux Online http://www.linux.org. C hai trang ny cung c p cc lin k t n cc a ch khc, cc thng tin chung, thng tin v cc b n phn ph i, cc ph n m m m i, ti li u, v tin t c. Ti li u cho nh pht tri n h t nhn t i: http://kernelbook.sourceforge.net. Tutorial, Unix is a Four Letter Word..., t i http://www.linuxbox.com/~taylor/4ltrwrd/ . Ti li u ny gi i thi u chung v h i u hnh Unix, khng ch ring cho Linux. Thm n a, cn c m t danh sch cha hon ch nh cc trang Web dnh cho Linux:

AboutLinux.com: http://www.aboutlinux.com Thm hi m l p trnh Linux: http://members.tripod.com/rpragana/ Kho ph n m m Linux Dave Central: http://linux.davecentral.com Tr gip Debian http://www.debianhelp.org

11

Nh ng cu h i th ng g p v Linux

Erlug Webzine (ti ng ): http://www.erlug.linux.it Free Unix Giveaway List: http://visar.csustan.edu/giveaway.html Cung c p danh sch cc CD mi n ph. Ngoi ra cn c qua mail: axel@visar.csustan.edu (mailto:axel@visar.csustan.edu), v i Subject: "send giveaway_list" Thng tin v Linux trong mi tr ng c ng tc: http://www.smartstocks.com/linux.html Thng tin cho ng i m i bi t Linux c a Jeanette Russo: http://www.stormloader.com/jrusso2/index.html JustLinux.com: http://www.justlinux.com Linux Cartoons: http://www.cse.unsw.edu.au/~conradp/linux/cartoons/ LinuxArtist.org: http://www.linuxartist.org Linuxinfor.com - Ti nguyn Linux tr c tuy n: http://www.linuxinfor.com linuXChiX.org: http://www.linuxchix.org LinuxDevices.com: Linux Nhng Portal: http://www.linuxdevices.com Linux Educational Needs Posting Page: http://www.slip.net/~brk/linuxedpp.htm Linux trong kinh doanh: Case Studies: http://www.bynari.com/collateral/case_studies.html Linux Hardware Database Laptop Superguide: http://lhd.zdnet.com/db/superguide.php3?catid=18 Bn trong Linux: http://linuxinside.org Linux Links: http://www.linuxlinks.com Trang ch Qu n l b nh trong Linux: http://humbolt.geo.uu.nl/Linux-MM/ D n Linux Newbie: http://kusma.hypermart.net/ Linux trn Thinkpad 760ED: http://www.e-oasis.com/linux-tp.html LinuxOrbit: http://www.linuxorbit.com Linux Parallel Port Home Page: http://www.torque.net/linux-pp.html ng d ng m thanh v MIDI Linux: http://sound.condorow.net Linux Start: http://www.linuxstart.com Linux Tips and Tricks Page: http://www.patoche.org/LTT/ Linux Today PR: http://www.linuxpr.com Mandrakeuser.Org: http://mandrakeuser.org Nh ng ng gp Linux c a ti b i Richard Gooch: http://www.atnf.csiro.au/~rgooch/linux/ Micro Channel Linux Web Page: http://www.dgmicro.com/mca/ Parallel port scanners and SANE: http://www2.prestel.co.uk/hex/scanners.html Pascal Central: http://www.pascal-central.com PegaSoft Portal: http://www.vaxxine.com/pegasoft/portal/ PocketLinux. http://www.pocketlinux.com Red Hat and ISDN4Linux: http://www.webideal.de

12

Nh ng cu h i th ng g p v Linux

SearchLinux: http://www.searchlinux.com/ The Free Linux CD Project: http://www.freelinuxcd.org The Site for People Learning Perl: http://learn.perl.org USB Linux Home Page: http://peloncho.fis.ucm.es/~inaky/uusbd-www/ VLUG: The Virtual Linux Users Group: http://www.vlug.com

Tm ch Linux trn Web s cung c p lng tham chi u d i do n cc trang Web v Linux. Hy th :

Yahoo! http://www.yahoo.com/ Altavista http://www.altavista.com/ Google http://www.google.com/

Google c ph n chuyn v Linux t i http://www.google.com/linux/ . Cc thng tin chi ti t hn v my tm ki m Web n m trong Web and Internet Search Engine Faq: http://www.infobasic.com/pagefaq.html. Ngoi ra nn tham kh o cu tr l i: Cn c nh ng FAQ v ti li u no khc cho Linux?

H: C nh ng Nhm Tin (newsgroup) no cho Linux? : Comp.os.linux.announce l nhm tin thng bo (moderated). B n nn xem nhm tin ny n u nh dng Linux. N ch a thng tin v cc l n c p nh t ph n m m, cc chng trnh c chuy n qua Linux, cc cu c h p c a cc nhm ng i dng, v cc s n ph m thng m i. N l nhm tin duy nh t ch a cc thng tin thng m i. G i tin ln nhm tin ny qua a ch linux-announce@news.ornl.gov (mailto:linux-announce@news.ornl.gov). Comp.os.linux.announce c lu t i: http://www.iki.fi/mjr/linux/cola.html, v ftp://src.doc.ic.ac.uk/usenet/comp.os.linux.announce/. Ngoi ra cc nhm tin sau cng r t ng c: comp.os.linux.* v alt.uu.comp.os.linux.*. B n c th tm th y nhi u v n thng th ng qu m i so v i ti li u, nhng l i c tr l i trn nhm tin.

alt.uu.comp.os.linux alt.uu.comp.os.linux.questions alt.os.linux alt.os.linux.mandrake comp.os.linux.admin comp.os.linux.advocacy comp.os.linux.alpha comp.os.linux.answers comp.os.linux.development comp.os.linux.development.apps comp.os.linux.development.system

13

Nh ng cu h i th ng g p v Linux

comp.os.linux.embedded comp.os.linux.hardware comp.os.linux.help comp.os.linux.m68k comp.os.linux.misc comp.os.linux.network comp.os.linux.networking comp.os.linux.portable comp.os.linux.powerpc comp.os.linux.questions comp.os.linux.redhat comp.os.linux.security comp.os.linux.setup comp.os.linux.test comp.os.linux.x comp.os.linux.x.video

Hy nh r ng Linux tng thch POSIX, v h u h t cc nhm tin trong comp.unix.* v comp.windows.x.* cng thch h p, ngo i tr cc v n lin quan ph n c ng, v vi v n c p th p. Thng tin v e-mail clients (MUA), mail transfer agents (MTA), v cc ph n m m lin quan khc c t i nhm comp.mail.*, c bi t l:

comp.mail.misc comp.mail.pine comp.mail.sendmail

Cu h i v thng tin v ph n m m c tin c t i:

news.software.readers.

Vui lng c N u ti li u ny v n cha tr l i cu h i c a b n.... tr c khi g i. G i cng lc nhi u nhm tin trong comp.os.linux.* hi m khi l m t t ng hay. C th c nh ng nhm ng i dng Linux (LUG) trong khu v c c a b n. Hy ki m tra xem. Xem thm Lm th no l y thng tin khi khng th truy c p Usenet? Cng c cc nhm tin c c b khc. B n c th tm th y nhi u thng tin h u d ng

fr.comp.os.linux (France). de.comp.os.linux.* (Germany). aus.computers.linux (Australia). hr.comp.linux (Croatia).

14

Nh ng cu h i th ng g p v Linux

it.comp.linux (Italy).

Tm ki m trn http://groups.google.com/ c th cung c p danh sch c p nh t cc nhm tin.

H: Cn c nh ng FAQ v ti li u no khc cho Linux? : C m t s FAQ th v v nh ng ch khc nhau lin quan n vi c qu n tr h th ng, s d ng Linux, v nh ng ch khc nh Flying Saucer Attacks (nh c) v h tr ph c h i cho qu n tr h th ng. Kho lu tr Usenet FAQ chnh th c : ftp://rtfm.mit.edu/pub/usenet/. Internet FAQ Consortium cung c p m t kho lu c th tm ki m t i: http://www.faqs.org/. a ch ny cn qu n l m t kho lu cc ti li u Internet Request For Comment (RFC), Best Current Practices (BCP), v For Your Information (FYI). Ngoi ra cn c vi FAQ v ti li u c bi t h u ch:

FAQ cho ng i dng m i: http://homes.arealcity.com/swietanowski/LinuxFAQ/ Linux FAQ ti ng Ty Ban Nha t t i: http://www.abierta.org/faq.htm http://www.abierta.org/faq.htm AfterStep FAQ: http://www.linuxinfor.com/en/astepfaq/AfterStep-FAQ.html Nh ng cu h i th ng g p v BASH: ftp://ftp.cwru.edu/pug/bash/FAQ/ http://www.dcoul.de/

de.comp.os.unix.linux.infos - FAQ:

Nh ng cu h i th ng g p v M ngu n m : http://www.opensource.org/faq.html Ftape-FAQ: http://www.linuxinfor.com/en/ftapefaq/Ftape-FAQ.html GNU Emacs: http://www.lerner.co.il/emacs/faq-body.shtml GNU Linux trong Khoa h c v K thu t: http://www.comsoc.org/vancouver/scieng.html GNU Troff (groff ) Info: http://www.cs.pdx.edu/~trent/gnu/groff/ Gnus 5.x: http://www.ccs.neu.edu/software/contrib/gnus/ KDE FAQ: http://www.kde.org/faq.html GNU General Public License FAQ: http://www.gnu.org/copyleft/gpl-faq.html Linux PPP FAQ: http://www.linuxinfor.com/en/pppfaq/PPP-FAQ.html Linux-Raid FAQ: http://www.linuxinfor.com/en/raidfaq/index.html List of Periodic Information Postings: ftp://rtfm.mit.edu/pub/usenet/news.answers/periodic-postings/ News.newusers.announce FAQ http://web.presby.edu/~nnqadmin/nan/ Ti nguyn Linux tr c tuy n: http://www.linuxinfor.com/en/docfaq.htm OReilly & Associates Openbook Project: http://www.oreilly.com/openbook/ Sendmail: http://www.sendmail.org/faq/ Sendmail: C m nang ci t v i u hnh:: http://www.sendmail.org/ FAQ K thu t cho ng i dng Linux: http://www-106.ibm.com/developerworks/library/l-faq/?n-l-7261 My tm ki m Web: http://www.infobasic.com/pagefaq.html

15

Nh ng cu h i th ng g p v Linux

Wu-ftpd: http://www.wu-ftpd.org/man/ (th t s l m t t p h p cc man pages), v i HOWTO t i: http://www.wu-ftpd.org/HOWTO/ Nh ng cu h i th ng g p v XTERM. http://dickey.his.com/xterm/xterm.faq.html

H: FTP c a Linux

u?

: C ba kho lu chnh cho Linux:


ftp://ftp.funet.fi/pub/OS/Linux/ (Ph n Lan). http://ibiblio.org/pub/linux/ (M ), v i m t giao di n WWW p. ftp://tsx-11.mit.edu//pub/linux/ (M ).

Ni t t nh t l y h t nhn Linux l ftp://ftp.kernel.org/pub/linux/kernel/. Linus Torvalds upload cc phin b n c p nh t nh t ln a ch ny. Trong cc b n phn ph i c a M , Debian GNU/Linux t t i ftp://ftp.debian.org/pub/debian/. Red Hat Linux t t i ftp://ftp.redhat.com/, v Linux Slackware t i ftp://ftp.freesoftware.com/. B n phn ph i Small Linux, c th ch y ch v i 2 MB RAM, t i http://smalllinux.netpedia.net/ . N i dung c a nh ng a ch ny c sao chp (mirror - c th l h ng ngy) b i nhi u a ch khc nhau. Vui lng dng a ch g n b n nh t t c t t nhanh.

ftp://ftp.sun.ac.za/pub/linux/sunsite/ (Nam Phi) ftp://ftp.is.co.za/linux/sunsite/ (Nam Phi) ftp://ftp.cs.cuhk.hk/pub/Linux/ (H ng Kng) ftp://sunsite.ust.hk/pub/Linux/ (H ng Kng) ftp://ftp.spin.ad.jp/pub/linux/ (Nh t B n) ftp://ftp.nuri.net/pub/Linux/ (Hn Qu c) ftp://ftp.jaring.my/pub/Linux/ (Malaysia) ftp://ftp.nus.sg/pub/unix/Linux/ (Singapore) ftp://ftp.nectec.or.th/pub/mirrors/linux/ (Thi Lan) ftp://planetmirror.com/pub/linux (c) (Ngoi ra hy xem t i http://planetmirror.com/archives.php.) ftp://ftp.monash.edu.au/pub/linux/ (c) ftp://ftp.univie.ac.at/systems/linux/sunsite/ (o) ftp://ftp.fi.muni.cz/pub/UNIX/linux/ (C ng ha Sc) ftp://ftp.funet.fi/pub/Linux/sunsite/ (Ph n Lan) ftp://ftp.univ-angers.fr/pub/Linux/ (Php) ftp://ftp.iut-bm.univ-fcomte.fr/ (Php) ftp://ftp.ibp.fr/pub/linux/sunsite/ (Php) ftp://ftp.loria.fr/pub/linux/sunsite/ (Php) ftp://ftp.dfv.rwth-aachen.de/pub/linux/sunsite/ ( c)

16

Nh ng cu h i th ng g p v Linux

ftp://ftp.germany.eu.net/pub/os/Linux/Mirror.SunSITE/ ( c) ftp://ftp.tu-dresden.de/pub/Linux/sunsite/ ( c) ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.sunsite/ ( c) ftp://ftp.gwdg.de/pub/linux/mirrors/sunsite/ ( c) ( c)

ftp.rz.uni-karlsruhe.de/pub/linux/mirror.sunsite/

ftp://ftp.ba-mannheim.de/pub/linux/mirror.sunsite/ ( c) ftp://ftp.uni-paderborn.de/pub/Mirrors/sunsite.unc.edu/ ( c) ftp://ftp.uni-rostock.de/Linux/sunsite/ ( c) ( c)

ftp.rus.uni-stuttgart.de/pub/unix/systems/linux/MIRROR.sunsite/

ftp://ftp.uni-tuebingen.de/pub/linux/Mirror.sunsite/ ( c) ftp://ftp.kfki.hu/pub/linux/ (Hungary) ftp://linux.italnet.it/pub/Linux/ () ftp://ftp.unina.it/pub/linux/sunsite/ () ftp://giotto.unipd.it/pub/unix/Linux/ () ftp://cnuce-arch.cnr.it/pub/Linux/ () ftp://ftp.flashnet.it/mirror2/metalab.unc.edu/ () ftp://ftp.nijenrode.nl/pub/linux/ (H Lan) ftp://ftp.LeidenUniv.nl/pub/linux/sunsite/ (H Lan) ftp://ftp.nvg.unit.no/pub/linux/sunsite/ (Na Uy) ftp://sunsite.icm.edu.pl/pub/Linux/metalab.unc.edu/ (Ba Lan) ftp://ftp.rediris.es/software/os/linux/sunsite/ (Ty Ban Nha) ftp://sunsite.rediris.es/software/linux/ (Ty Ban Nha) ftp://ftp.cs.us.es/pub/Linux/sunsite-mirror/ (Ty Ban Nha) ftp://ftp.etse.urv.es/pub/mirror/linux/ (Ty Ban Nha) ftp://ftp.etsimo.uniovi.es/pub/linux/ (Ty Ban Nha) ftp://ftp.luna.gui.es/pub/linux.new/ (Ty Ban Nha) ftp://ftp.metu.edu.tr/pub/linux/sunsite/ (Turkey) ftp://unix.hensa.ac.uk/mirrors/sunsite/pub/Linux/ (Anh) (Anh)

ftp.maths.warwick.ac.uk/mirrors/linux/sunsite.unc-mirror/

ftp://ftp.idiscover.co.uk/pub/Linux/sunsite.unc-mirror/ (Anh) ftp://sunsite.doc.ic.ac.uk/packages/linux/sunsite.unc-mirror/ (Anh) ftp://ftp.io.org/pub/mirrors/linux/sunsite/ (Canada) ftp://ftp.cc.gatech.edu/pub/linux/ (M ) ftp://ftp.freesoftware.com/pub/linux/sunsite/ (M ) ftp://ftp.siriuscc.com/pub/Linux/Sunsite/ (M )

17

Nh ng cu h i th ng g p v Linux

ftp://ftp.engr.uark.edu/pub/linux/sunsite/ (M ) ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ (M ) ftp://linux.if.usp.br/pub/mirror/metalab.unc.edu/pub/Linux/ (Brazil) ftp://farofa.ime.usp.br/pub/linux/ (Brazil)

Vui lng g i c p nh t v ch nh s a v danh sch ny cho Linux pclouds@users.sourceforge.net (mailto:pclouds@users.sourceforge.net) Khng ph i m i a ch trn lu ton b source trn a ch g c, v vi ni c nh ng th m a ch g c khng c.

H: Lm th no l y Linux khi khng th truy c p FTP? : Cch d nh t c l l tm m t ng i b n c truy c p FTP. N u c m t Nhm ng i dng Linux (Linux User Group) g n b n, h c th gip b n. N u b n c m t k t n i email t t, b n c th th dng cc server FTP-qua-mail t i ftpmail@ftp.sunet.se (mailto:ftpmail@ftp.sunet.se), ho c ftpmail@ftp.uni-stuttgart.de (mailto:ftpmail@ftp.uni-stuttgart.de). Linux cn c trn CD, thng qua th tn truy n th ng. T p tin Installation-HOWTO (ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/Installation-HOWTO), v t p tin Distribution-HOWTO (ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/Distribution-HOWTO) ch a cc thng tin v nh ng b n phn ph i ny.

H: Lm th no l y thng tin khi khng th truy c p Usenet? : C th nh n b n tm t t c a comp.os.linux.announce b ng cch ang k mailing list (g i th v i n i dung l t subscribe khng c d u nhy t i linux-announce-REQUEST@news-digests.mit.edu (mailto:linux-announce-REQUEST@news-digests.mit.edu). ng k mailing list ny l m t ki n hay, n mang n cho b n nh ng thng tin v ti li u quan tr ng v Linux. Hy nh r ng dng nh ng a ch *-request ng k ho c h y ng k cc thng bo; g i th t i a ch khc s c g i t i news group.

H: Mailing List

u?

: Nh ng nh pht tri n Linux hi n nay ch y u s d ng Majordomo server t i majordomo@vger.redhat.com (mailto:majordomo@vger.redhat.com). Hy g i m t thng i p v i n i dung l t lists (khng c d u nhy) t i a ch c li t k y. Thm m t dng v i t help c t p tin tr gip chu n c a Majordomo, hi n th danh sch cc l nh ng k v h y ng k cc danh sch. Hi n th i, kernel list c lu t i: http://www.uwsg.indiana.edu/hypermail/linux/kernel/ , v http://www.lib.uaa.alaska.edu/linux-kernel/archive/ Vui lng ng g i nh ng thng i p l c ln mailing list. H u h t cc mailing list ny c dng b i cc nh pht tri n Linux ni chuy n v cc v n k thu t v k ho ch pht tri n trong tng lai. Chng khng c dng tr l i cc cu h i c a ng i m i dng Linux, qu ng co ho c cc thng bo cng c ng khng tr c ti p lin quan n ch c a mailing list. Comp.os.linux.announce l ni g i cc thng bo cng c ng. y l quy t c chung c a Internet. N u b n khng theo nh ng h ng d n ny, r t c kh nng b n s b flamed.

18

Nh ng cu h i th ng g p v Linux linux-newbie l ni m khng c cu h i no l ng ng n. Khng may l d ng nh khng c nhi u ng i dng c kinh nghi m trn . C m t s lng l n cc mailing list lin quan n Linux t i http://www.onelist.com/ . T i trang phn lo i v ch n Linux. Ngoi ra cn c lin k t ng k mailing list t i: http://oslab.snu.ac.kr/~djshin/linux/mail-list/ Trang Mailing Lists Available in Usenet t i: http://paml.net/ . Thng tin v danh sch c t i: ftp://rtfm.mit.edu/, v c g i ln nhm: news.announce.newgroups, news.lists, v news.groups.

H: Where Are Linux Legal Issues Discussed? : On the linux-legal mailing list, of course. You can subscribe to it, as with many of the other Linux related lists, b i sending a message with the word "help" in the body of the message to majordomo@vger.redhat.com (mailto:majordomo@vger.redhat.com). H: Thng tin v cc d n khng c qu n l u?

: C cc trang web t i: http://unmaintained.sourceforge.net, v: http://www.orphansource.org/ . Vui lng lin l c v i nh ng tc gi ban u c a cc d n thng qua email, ho c nh ng ng i li t k cc ph n m m khng c qu n l, tr c khi ngh n vi c dng gi y php m i cho gi ph n m m .

H: News Groups c cn c lu

ch no khc khng?

: Usenet Linux news groups c lu t i http://groups.google.com/ . ftp://metalab.unc.edu/pub/Linux/docs/linux-announce.archive lu cc thng bo c a comp.os.linux.announce. Ngoi ra cn c cc mirror t i ftp://src.doc.ic.ac.uk/usenet/, lu tr comp.os.linux, comp.os.linux.development.apps, v comp.os.linux.development.system.

H: Tm cc thng tin v v n b o m t

u?

: C m t trang web chuyn v b o m t trong Linux t i: http://www.linuxsecurity.com/ . M t a ch khc l: http://www.rootshell.com/ , ch a cc thng tin v b o m t Internet v privacy issue. c thng tin v Weekly Linux Security Digest email newsletter v cc c s d li u lin quan n b o m t khc, hy xem t i http://securityportal.com/ .

H: Tm t t h th ng Linux

u?

: Tr c tin, hy xem t i The Linux Standards Base, http://www.linuxbase.org. a ch ny ch a cc thng tin v ph n m m ki m tra, t ch c h th ng t p tin, quy c t tn th vi n ng.

19

Nh ng cu h i th ng g p v Linux

Tnh tng thch v i cc h i u hnh khc


H: C th dng Linux trn cng a c ng c ch a MS-DOS? OS/2? 386BSD? Win95? : C. Linux h tr r t nhi u h th ng t p tin khc nhau, bao g m m hnh phn partition chu n c a MS-DOS, v th n c th chia s a c ng v i cc h i u hnh khc. Linux h tr m i phin b n c cng b c a h th ng t p tin Microsoft FAT v VFAT, bao g m nh ng ci c dng b i Windows 95, Windows 98, Windows NT, Windows 2000 v Windows ME thng qua cc mun h t nhn n p ng. V i m t h th ng c u hnh ng, chng c th t ng n p khi partition c g n k t (mount). Tuy nhin, ch r ng nhi u h i u hnh khc c th khng hon ton tng thch. V d , FDISK.EXE v FORMAT.EXE c a DOS, c th ghi d li u trong partition Linux, v i khi n dng sai d li u partition t boot sector c a partition hn l t b ng partition. trnh nh ng tr ng h p , t t nh t nn xa tr ng ph n partition b n t o, tr c khi MS-DOS ho c ci g khc nh d ng n. Hy g:
$ dd if=/dev/zero of=/dev/hdXY bs=512 count=1

trong hdXY l partition tng ng; e.g., /dev/hda1 l partition u tin c a a (IDE) th nh t. Linux c th c v ghi t p tin ln cc partition FAT c a DOS v OS/2 v a m m nh h th ng t p tin DOS trong h t nhn ho c nh mtools. M t driver thi t b OS/2 (GPL) c bo co c th c v vi t cc partition Ext2. bi t thm thng tin v h tr partition FAT32, hy xem http://bmrc.berkeley.edu/people/chaffee/fat32.html. Hy xem, (Linux h tr ph n m m no?) bi t chi ti t v tnh tr ng hi n th i c a cc b m ph ng DOS, MS Windows, v cc chng trnh System V. Ngoi ra hy xem, Linux c th truy c p h th ng t p tin Amiga khng?, Linux c th truy c p h th ng t p tin Macintosh khng?, Linux c th truy c p BSD, SysV, ... UFS khng? v Linux c th truy c p h th ng t p tin SMB khng?. Driver NTFS v n ang c pht tri n. Driver ny s h tr nn nh l c tnh chu n.

H: Lm th no truy c p t p tin trn a m m ho c trn partition MS-DOS? : V d , dng h th ng t p tin DOS, hy nh p vo:
$ mkdir /dos $ mount -t msdos -o conv=text,umask=022,uid=100,gid=100 /dev/hda3 /dos

N u l a m m, ng qun umount a m m tr c khi l y n ra! B n c th dng ty ch n conv=text/binary/auto, umask=nnn, uid=nnn, v gid=nnn i u khi n s chuy n i k t dng t ng, i u khi n quy n truy c p v quy n s h u t p tin trong h th ng

20

Nh ng cu h i th ng g p v Linux t p tin DOS nh trong Linux. N u b n g n k t (mount) h th ng t p tin DOS b ng cch t n vo /etc/fstab c a b n, b n c th t cc thu c tnh (cch nhau b ng d u ph y) thay v thu c tnh m c nh. Ngoi ra b n c th dng mtools, c c d i d ng nh phn v m ngu n t cc a ch FTP. (FTP c a Linux u?)

H: Linux c h tr h th ng t p tin Ext2 nn khng? : D n ext2compr cung c p kernel patch. Thng tin v d n ny t t i http://e2ompr.memalpha.cx/e2compr/ . Cn c m t trang Web ch a cc e2compr patch. o n m v n cn ang c th nghi m v bao g m patch cho h t nhn 2.0 v 2.1. bi t thm thng tin v d n, bao g m cc b n patch m i nh t, v a ch c a mailing list, hy xem t i URL http://debs.fuller.edu/e2compr/ .

: zlibc l m t chng trnh cho php cc ng d ng c cc t p tin nn (b ng GNU gzip) nh th khng b nn. Hy xem t i ftp://metalab.unc.edu/pub/Linux/libs/. Tc gi chng trnh ny l Alain Knaff. : Ngoi ra cn c thi t b kh i nn, "DouBle", c vi t b i Jean-Marc Verbavatz, c th cung c p nn a trong khi ch y trong h t nhn. B n phn ph i ch c m ngu n t t i ftp://metalab.unc.edu/pub/Linux/patches/diskdrives/. Driver ny nn cc inode v th m c cng nh t p tin, v th m i h h ng c a h th ng t p tin nhi u kh nng s tr nn nghim tr ng. : Cn c m t gi g i l tcx (Transparently Compressed Executables), gip b n gi cc chng trnh t khi dng d ng nn, ch gi i nn t m th i khi c dng. TCX t t i ftp://metalab.unc.edu/pub/Linux/utils/compress/. H: C th dng Linux v i cc a DOS dng Stacked/DBLSPC/... hay khng?

: Cho t i g n y th i u khng d dng l m. B n c th truy xy t cc volume DOS 6.X thng qua b m ph ng DOS (xem Linux h tr ph n m m no?), nhng lm th kh hn so v i truy c p DOS volume th ng thng qua mun DOS trong h t nhn, ho c thng qua mtools. G n y c m t gi ph n m m, g i l dmsdos, cho php c/ghi cc h th ng t p tin nn nh DoubleSpace/DriveSpace trong MS-DOS 6.x v Win95, cng nh Stacker phin b n 3 v 4. N l mun h t nhn. Hy xem t i ftp://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/.

H: Linux c th truy c p partition OS/2 HFPS khng? : c, nhng ch c th c, khng th ghi. Xem t p tin Documentation/filesystems/hpfs.txt trong m ngu n c a h t nhn. (Lm th no nng c p/bin d ch l i h t nhn) B n c th g n k t partition HPFS nh v d sau:
$ mkdir /hpfs $ mount -t hpfs /dev/hda5 /hpfs

21

Nh ng cu h i th ng g p v Linux

H: Linux c th truy c p h th ng t p tin Amiga khng? : H t nhn Linux h tr h th ng t p tin nhanh Amiga (Amiga Fast File System - AFFS) phin b n 1.3 tr ln, c th c ci s n trong h t nhn ho c tch lm m t mun h t nhn. T p tin Documentation/filesystems/affs.txt trong m ngu n h t nhn Linux cho bi t cc thng tin chi ti t hn. Xem (Lm th no nng c p/bin d ch l i h t nhn) Linux ch h tr partition AFFS trn c ng, khng h tr trn m m v tnh khng tng thch gi a b i u khi n a m m c a Amiga v c a PC. Driver AFFS cn c th g n k t partition a c a Un*x Amiga Emulator, vi t b i Bernd Schmidt.

H: Linux c th truy c p BSD, SysV, ... UFS khng? : Cc h t nhn gn y c th g n k t (ch c) h th ng t p tin UFS c a System V; Coherent; Xenix; BSD; v derivatives nh SunOS, FreeBSD, NetBSD, v NeXTStep. H tr UFS c th c ci vo h t nhn ho c t trong mun h t nhn. Xem, (Lm th no nng c p/bin d ch l i h t nhn)

H: Linux c th truy c p h th ng t p tin SMB khng? : Linux h tr c/ghi cc volume SMB c a Windows for Workgroups v Windows NT. Xem t p tin Documentation/filesystems/smbfs.txt trong m ngu n Linux v(Lm th no nng c p/bin d ch l i h t nhn) bi t thm. Ngoi ra cn c m t b chng trnh tn l Samba cung c p h tr cho h th ng t p tin m ng c a Windows for Workgroups (provided theyre for TCP/IP). Xem thm thng tin trong t p tin README t i metalab.unc.edu/pub/Linux/system/network/samba/. Trang web c a SMB l http://www.samba.org, v cn c m t trang web t i samba.anu.edu.au/samba.

H: Linux c th truy c p h th ng t p tin Macintosh khng? : C m t t p chng trnh c p ng i dng c v ghi Macintosh Hierarchical File System (HFS). Chng trnh t t i metalab.unc.edu/pub/Linux/utils/disk-management/ (http://metalab.unc.edu/pub/Linux/utils/disk-management). H tr truy c p h th ng t p tin HFS+ v n ang c pht tri n.

H: Linux c th ch y cc chng trnh trn Microsoft Windows khng? : WINE, m t b m ph ng Windows trong Linux, v n cha s n sng s d ng. N u b n mu n tham gia pht tri n, hy xem bo co tnh hnh t i nhm tin comp.emulators.ms-windows.wine. Ngoi ra cn c m t FAQ, c bin so n b i P. David Gardner, t i ftp://metalab.unc.edu/pub/Linux/docs/faqs/Wine-FAQ/.

22

Nh ng cu h i th ng g p v Linux

: Hi n th i, n u b n mu n ch y cc chng trnh c a MS Windows, cch an ton nh t l boot-kp (dual-boot). LILO, the Linux boot loader, c th kh i ng m t h i u hnh c ch n t menu. Hy xem ti li u LILO bi t thm. Ngoi ra, LOADLIN.EXE (m t chng trnh trong DOS cho php n p h t nhn Linux, ho c h t nhn cc h i u hnh khc, l m t cch c th dng c Linux v DOS. LOADLIN.EXE c bi t h u d ng khi b n mu n ci t Linux trn a th ba ho c th t (ho c khi b n thm m t a SCSI vo h th ng c a IDE). Trong tr ng h p ny, LILO th ng khng th tm ra ho c n p h t nhn trn a "khc". V th b n ch c n t o th m c C:LINUX (ho c m t tn khc), t LOADLIN.EXE vo km theo m t b n sao c a h t nhn b n dng, v ch y LOADLIN.EXE. LOADLIN.EXE l chng trnh tng thch VCPI. Win95 s yu c u b n "shutdown into DOS mode," ch y chng trnh (nh cc chng trnh DOS dng protected-mode khc).

: Ngoi ra cn c m t chng trnh thng m i tn l VMWare cho php ch y Windows trong Linux. Hy xem t i trang web c a cng ty t i http://www.vmware.com. H: Thng tin v tnh tng thch NFS u?

: Hy xem NFS-HOWTO (http://www.tldp.org/HOWTO/NFS-HOWTO/index.html) c cc thng tin c p nh t. : Nh ng thng tin d i y c trch t NFS HOWTO c a Nicolai Langfeldt vo th i i m 10/1/1999: H u h t h t nhn phin b n 2.2.x c n set of patches ci t h th ng con knfsd, c qu n l b i H.J. Lu, c th lin l c m t cch hi u qu (if at all) v i Sparc, IBM RS, v cc my Alpha, v c l c nh ng my khc. Gi ph n m m ny th t s l m t t p cc patch cho m ngu n kernel. H tr t t hn cho ki n trc phi-Intel c g p trong h t nhn 2.4. Ngoi ra cn c user-space server. M c d n thi u tnh nng kha t p tin t xa (remote file locking), nhng n d ci t hn. C hai c hi u su t tng ng. Trong t p tin Documentation/Changes trong cc h t nhn g n y, c m t danh sch cc URL cho c knfsd server v user-space server. C m t CVS server cho kernel-space NFS, cng nh trang ch t i http://www.linuxnfs.sourceforge.org, m c d c n m t kh u truy c p. URL lin quan c li t k trong t p tin README.nfs t i ftp://ftp.us.kernel.org Patches c t i ftp://ftp.varesearch.com/pub/kernel/latest/patches/. User-space server v cc ti n ch c t i ftp://linux.mathematik.tu-darmstadt.de:/pub/linux/people/okir/. Mailing list linux-kernel c vi cu c th o lu n v NFS subsystem.

H: Linux c th dng font True Type khng? : C. C m t s font server cho X Window System. M t trong s l xfsft. Trang ch c a n t t i http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/ . Ngoi ra cn c cc ch d n c u hnh.

23

Nh ng cu h i th ng g p v Linux : M t font server khc h tr True Type l xfstt : Cn c cc font server khc h tr True Type. Trn trang ch c a xfsft c cc lin k t t i cc server ny. : B n cn c th bin d ch tnh nng h tr True Type vo th ng trong X Window. Vui lng xem trang ch xfsft bi t thng tin chi ti t. : Ng i dng Debian nn tham v n TT-Debian-HOWTO (http://failed.com). H: C th kh i ng Linux t MS-DOS khng? : N u LILO khng ch y, v n u my b n c MS-DOS ho c Microsoft Windows, my c a b n c th s khng kh i ng c. i u ny c th x y ra khi nng c p Linux. Ci t l i LILO l i u cu i cng m ph n ci t lm. i u c c k quan tr ng khi ci t ho c nng c p Linux trn my dual-boot l ph i c a m m kh i ng MS-DOS ho c Windows, nh b n c th dng l nh FDISK -MBR ph c h i Master Boot Record. Sau b n c th dng LOADLIN.EXE kh i ng Linux thay v dng LILO. T p tin config.sys ny l m t cch g i LOADLIN.EXE v kh i ng MS-DOS ho c Linux.
[menu] menuitem=DOS, Dos Boot menuitem=LINUX, Linux Boot [LINUX] shell=c:\loadlin.exe c:\vmlinuz vga=5 root=/dev [DOS] STACKS = 0,0 rem all the other DOS drivers get loaded here.

Nh ng dng l nh ny t o m t menu b n c th ch y LOADLIN.EXE tr c khi DOS kh i ng xong. ng d n v ty ch n ph thu c vo t ng my. Xem ti li u LOADLIN.EXE bi t v ty ch n. Chng cng gi ng nh LILO, v ty ch n ch n gi n c chuy n cho kernel.

H: Kh i ng Linux t OS/2 Boot Manager nh th no? : 1. T o m t partition dng FDISK.EXE c a OS/2 (Khng Ph i fdisk c a Linux). 2. nh d ng partition trong OS/2, ho c l FAT, ho c l HPFS. Lm nh v y OS/2 bi t partition c nh d ng. (B c ny khng c n thi t v i OS/2 warp 3.0.) 3. Thm partition vo Boot Manager.

24

Nh ng cu h i th ng g p v Linux 4. Kh i ng Linux, v t o m t h th ng t p tin trn partition b ng l nh mkfs -t ext2 ho c mke2fs. Vo lc ny, n u b n thch, hy dng l nh fdisk c a Linux thay i m c a partition sang lo i 83 (type 83 - Linux Native). Vi c ny c th gip cho cc script t ng c th tm ra u l partition ng c n dng. 5. Ci t Linux trn partition. 6. Ci LILO trn partition Linux, KHNG ph i trn Master Boot Record (MBR) c a c ng. Nh LILO ch y nh l boot loader th hai, c dng n p Linux trn chnh partition . lm th , h y t dng:
boot = /dev/hda2

(trong /dev/hda2 l partition dng kh i ng) trong t p tin /etc/lilo/config ho c /etc/lilo.config.

7. Hy ki m tra ch c r ng partition ch a Boot Manager c nh d u active, b n c th dng Boot Manager ch n h i u hnh. C nhi u HOWTO v ch multi-boot ny. Hy tm trn trang ch c a LDP, http://www.tldp.org.

H th ng t p tin, a, v
H: Lm th no Linux lm vi c v i : N u

a
a c a ti?

a c a b n thu c chu n IDE hay EIDE, b n nn xem t p tin

/usr/src/linux/drivers/block/README.ide (m t ph n trong m ngu n c a Linux kernel). Ph n README ny ch a nhi u ch d n h u ch v cc a IDE. Nhi u IDE controller m i th c hi n chuy n

i t ng gi a cylinders/heads/sectors v t l v logic. Cc a SCSI c truy xu t b ng cc s block tuy n tnh. BIOS gi l p cc gi tr cylinders/heads/sectors logic h tr DOS. Cc BIOS c a h my IBM PC-compatible c s khng th truy xu t cc phn vng m r ng qu 1024 logical cylinder v s g p tr c tr c n u kh i ng Linux kernel t cc phn vng ny. Tuy nhin b n v n c th s d ng cc phn vng ny trn Linux ho c trn cc h i u hnh truy xu t tr c ti p vo controller. T t hn l b n t o t nh t m t phn vng n m hon ton d i gi i h n 1024 logical cylinder v kh i ng t phn vng ny. Cc phn vng khc v n s d ng bnh th ng. Ngoi ra, d ng nh c m t cht tr c tr c v i cc a Ultra-DMA m i. Ti khng c r l m v v n ny, nhng chng r t th ng th y trong cc bu i installfest c a SVLUG (installfest l m t hnh th c cc thnh vin h i h p v ti n hnh ci t Linux tr c cc thnh vin m i). N u m b n c trong tay lo i a 8-12GB v i gi $200-$300 th khng c g ph i lo l ng.

25

Nh ng cu h i th ng g p v Linux H: Lm th no ph c h i cc t p tin xa? : Thng th ng, r t kh th c hi n i u ny trn cc h i u hnh Unix b i v tnh a nhi m c a b n thn n. Ch c nng ph c h i trong h th ng t p tin ext2 v n lm vi c, nhng t t nh t l b n ng trng ch qu nhi u vo n. C kh nhi u gi ph n m m4 cung c p l nh chp v xa m i, cc l nh ny s chuy n cc t p tin b xa vo m t ci gi rc. T p tin c th c ph c h i cho t i khi b xa t ng b i m t ti n trnh ch y n n. Chng trnh qu n l t p tin Midnight Commander cung c p m t c ch ph c h i s dung cc hm th vi n h th ng t p tin Ext2 v m t th m c ch a file v a xa cho m i h th ng file. Cc gi ph n m m MC phn ph i thng m i c th c ho c khng tnh nng ny, v th hy th nhn vo m ngu n c a b n phn ph i xem lm th no b t tnh nng ph c h i t p tin xa. Ho c l, b n c th d tm tr c ti p trn a c ng. y l m t cng vi c n ng nh c, v b n s c n ph i ng nh p v i t cch l root lm i u ny. Nhng b l i n cng kh c vi c. Ch c n ch y grep trn thi t b th, v d :
grep -b bookmarks /dev/hda

N u d li u cha b ghi ln, b n s c th tm th y v ph c h i t p tin xa b ng m t chng trnh so n th o vn b n.

H: Lm th no sao lu d li u? : B n c th sao lu c m t cy th m c ho c ton b h th ng t p tin vo b t k phng ti n no b ng cch s d ng GNU tar ho c cpio, nh ng cng c c thi t k cho m c ch ny. tar c v thng d ng hn, v bao g m m t s ty ch n trn dng l nh cho php t o b n sao lu c nn, c th b sung v c th t o multi-volume (b n sao c chia lm nhi u ph n c th lu vo cc thi t b lu tr c dung l ng nh nh a m m, CD). Thng tin y c trong cc ti li u, chng c lu d i d ng GNU Texinfo. : Chng trnh mi n ph Amanda nh n c r t nhi u l i khen trn Usenet. Trang ch c a n http://www.amanda.org. : Cng c kh nhi u ti n ch sao lu thng m i. Chng th ng c km theo trong nh ng b n phn ph i thng m i. H: C th thay i kch th c partition m khng ph h y d li u khng? : Hy dng chng trnh FIPS.EXE c trong h u h t cc b n phn ph i. Chng trnh ny ch y d i n n MS-DOS. : GNU parted, m t trnh hi u ch nh partition, lm vi c kh n nh, cho nh ng ng i dng thng th ng 5. M ngu n c a phin b n m i nh t ftp://ftp.gnu.org/pub/gnu/parted/. Ngoi ra cng c t p tin image t o a kh i ng c ch a chng trnh parted c th ch y trn cc h th ng khng c s n

26

Nh ng cu h i th ng g p v Linux Linux. Dng t p tin image ny tng i d i v i nh ng ng i m i. Xy d ng l i t m ngu n c n ph i c u hnh thm m t cht. Parted cng c ti li u h ng d n t ng b c, d ng plain-text cho h th ng t p tin Linux v FAT (MS-DOS).

: Ngoi ra m t vi b n phn ph i thng m i c km theo ph n m m phn vng ring, ch ng h n nh Partition Magic. H: C trnh d n a cho Ext2fs khng? : C. l defrag, l m t trnh d n a cho m t s h th ng t p tin Linux nh ext2, Minix, v ext ki u c. Chng trnh c ftp://metalab.unc.edu/pub/Linux/system/filesystems/defrag-0.70.tar.gz. i v i h th ng t p tin ext2 c th khng c n defrag, b i v ext2 c kh nng gi m thi u s phn m nh nhi u nh t c th c (k c khi a y). H: Lm th no nh d ng a m m theo m t h th ng t p tin no ? : N u b n ang ch y Gnome ho c KDE phin b n g n y, b n c trong tay m t cng c nh d ng a m m d dng v i giao di n h a. : Cn nh d ng a m m 3.5 inch HD 6 b ng dng l nh, b n c th g vo l nh sau y:
$ fdformat /dev/fd0H1440 $ mkfs -t ext2 -m 0 /dev/fd0H1440 1440

i v i a 5.25 inch, hy t l i cc gi tr fd0h1200 v 1200 cho thch h p. i v i a B: hy dng


fd1 thay v fd0.

Ty ch n -m 0 bo cho mkfs.ext2 bi t l khng dnh khng gian a cho superuser (ng i dng c p cao), th ng l 10% dnh cho root. L nh u tin th c hi n nh d ng c p th p. L nh th hai t o vng khng gian tr ng cho a. B n c th mount a m m nh l v i phn vng c ng v s d ng cc l nh cp v mv,v.v... Quy c g i tn thi t b thng th ng gi ng nh cc h i u hnh Unix khc. Chng c th c tm th y trong t p h ng d n Installation v Getting Started c a Matt Welsh. Hy tham kh o ph n (Ti li u u?). Bi miu t chi ti t hn Linux Allocated Devices c a H. Peter Anvin, hpa@zytor.com (mailto:hpa@zytor.com), c lu c 2 d ng Latex v ASCII, c trong b n phn ph i m ngu n c a kernel (c th n m trong /usr/src/kernel/Documentation/), d i tn devices.tex v devices.txt.

H: Linux c h tr h th ng t p tin o nh RAID khng? : H u h t cc kernel Linux g n y u h tr ph n m m RAID, v chng ng nhin s h tr cc b i u khi n a RAID.

27

Nh ng cu h i th ng g p v Linux M t trnh t ng g n k t 7 cc phn vng NFS 8 l m t ph n khng th thi u i v i h u h t cc b n phn ph i. Hn n a, hi n c kh nhi u cc d n v h th ng t p tin o. M t trong s l Linux Logical Volume Manager c http://linux.msede.com/lvm/ .

H: Linux c h tr m ha h th ng t p tin khng? : C ch . V d nh ppdd c http://pweb.de.uu.net/flexsys.mtk/ .

H: Nh ng thng i p rc v Inode, Block, v nh ng th tng t l g? : H th ng c a b n b l i h th ng t p tin. Nguyn nhn c th l khng shutdown Linux tr c khi t t my hay kh i ng l i my. B n c th dng trnh shutdown lm vi c ny. Trnh ny c trong cc gi ci t util-linux, th ng km s n trn sunsite v tsx-11. N u b n may m n, chng trnh fsck (ho c e2fsck ho c xfsck ty n u fsck khng c trn my tnh c a b n) s s a l i cc l i trong h th ng t p tin. N u b n km may m n, h th ng t p tin s tr nn v gi tr , v b n s ph i ti nh d ng l i a b ng mkfs (ho c mke2fs, mkxfs, v.v...), v khi ph c l i t b n sao lu d phng tr c .
Ghi ch: ng c ki m tra h th ng t p tin c g n li n v i phn vng root trong ch c/ghi, n u b n khng th y:
VFS: mounted root ... read-only

lc kh i ng.

H: T i sao vng nh

o c a ti khng ho t ng? o), b n s

: Khi b n kh i ng (hay khi cho b t ch swapping - t c l cho php s d ng vng nh th y:


Adding Swap: NNNNk swap-space

N u b n khng th y b t k thng i p no h t, c th b n thi u


swapon -av

(l nh cho php s d ng vng nh o) trong t p tin /etc/rc.local ho c /etc/rc.d/* (cc t p tin scripts ch a cc l nh c thi hnh khi h th ng kh i ng), ho c qun thm vo m t dng trong /etc/fstab g n k t phn vng c s d ng lm vng nh o lc kh i ng, v d nh:

28

Nh ng cu h i th ng g p v Linux
/dev/hda2 none swap sw

N u b n th y:
Unable to find swap-space signature9

t c l b n qun ch y mkswap cho phn vng . Hy xem thm cc cu n h ng d n (manual) bi t chi ti t. N ho t ng kh gi ng v i mkfs. Hy ch y th l nh free xem dung l ng vng nh cn tr ng, trn mn hnh s c m t dng tng t v i dng sau:
total used free Swap: 10188 2960 7228
10

N u g vo l nh cat /proc/swaps ch cho th y tn t p tin hay phn vng, ch khng c thng tin v vng nh o, khi t p tin hay phn vng dng lm vng nh o c n ph i thi t l p l i. B n c th s d ng fdisk (d i quy n root) xc nh phn vng no trn a c ng c chu n b lm vng nh o. Phn vng ny c n ph i nh d ng v i mkswap tr c khi s d ng n b ng l nh swapon.

H: Lm sao thm vng nh

o?

: Ngoi cc vng nh s d ng phn vng a c ng, Linux cn cho php s d ng t p tin lm vng nh o (t p tin hon i - swap file). M t vi chng trnh, nh g++, c th s d ng m t l ng l n b nh , c n ph i t o thm vng nh o b sung t m th i trong lc ch y. V d t o thm m t vng nh o kho ng 64MB, b n ch y l n l t cc l nh sau:
# dd if=/dev/zero of=/swap bs=1024 count=65535 # mkswap /swap # swapon /swap

i s count= c a l nh dd xc nh dung l ng c a t p tin hon i. Trong v d ny, tn t p tin hon i l /swap, nhng tn v v tr trn th c t l ty , th ng ch ph thu c vo dung l ng c n thi t v b n c quy n c ghi vo th m c no. Khi b n khng c n vng nh
# swapoff /swap # rm /swap

o n a, hy h y n b ng cc l nh sau:

29

Nh ng cu h i th ng g p v Linux B n cng nn xem qua Installation HOWTO (http://www.tldp.org/HOWTO/Installation-HOWTO/index.html) v Installation & Getting Started c h ng d n chi ti t. N u v n khng c vng nh o c n thi t, hy tham kh o (Lm th no dng trn 128Mb Swap)

H: C th lo i b LILO h th ng kh i ng DOS l i khng? : Trnh lilo (khng ph i ton b gi ph n m m LILO) s d ng ty ch n -u trn dng l nh g b LILO. B n ph i cung c p tn thi t b m b n ci t LILO, v d :
lilo -u /dev/hda

N s ghi l i b n g c tr c khi ci LILO vo master boot record c a a c ng th nh t, c lu gi trong /boot/boot.0300. N u b n ci LILO ln phn vng nh l m t boot loader ph , v d /dev/hda1, lilo s dng b n g c lu /boot/boot.0301. Tham kh o thm ph n h ng d n (manual) c a lilo bi t chi ti t. C m n Villy Krush nh c ti c p nh t cu tr l i ny. N u b n s d ng phin b n LILO c hn, b n s ph i dng l nh c a DOS (MS-DOS 5.0 ho c m i hn, hay OS/2) FDISK /MBR (khng c thng tin chnh th c v l nh ny). N s ghi ln lilo boot loader b ng Master Boot Record chu n c a MS-DOS. N u b n c DR-DOS 6.0, ch y FDISK.EXE theo cch thng th ng v ch n Re-write Master Boot Record . N u b n t o a kh i ng trong qu trnh ci t Windows, ch c ch n l n c ch a cc chng trnh FDISK.EXE, FORMAT.COM, v SYS.COM. Hy s d ng chng ci t l i MS-DOS trn a c ng. N u b n khng c MS-DOS hay DR-DOS, b n c n c b n sao lu c a boot sector m LILO lu l i khi l n u b n ci n. B n v n cn gi t p tin ny ch ? N c th mang tn boot.0301 hay ci g tng t . Hy g vo:
dd if=boot.0301 of=/dev/hda bs=445 count=1

(hay /dev/sda n u b n s d ng a lo i SCSI). N cng c th d n s ch partition table c a b n, t c l cc phn vng c a b n trn da s khng cn, v th hy c n th n! N u b n thu c lo i li u lnh, b n c th dng:
dd if=/dev/zero of=/dev/hda bs=512 count=1

N s xa s ch partition table v boot sector. Sau b n c th nh d ng l i a b ng chng trnh m b n thch. Nhng n s lm cho n i dung trn a c a b n tr nn khng th truy xu t c, v b n s m t s ch tr khi b n l m t chuyn gia. Ch l DOS MBR s kh i ng b t c phn vng no (ch m t m thi) c nh d u "active". B n c n dng fdisk t v xa d u "active" trn cc phn vng.

30

Nh ng cu h i th ng g p v Linux H: T i sao fdformat c n quy n root? : nh d ng a m m b n c n ph i th c hi n d i quy n root, ngay c khi n c quy n i v i /dev/fd0*. N u b n mu n b t k ng i dng no cng c th nh d ng a m m, hy th fdformat2. N s trnh c v n v n c setuid cho root. H: T i sao h th ng ki m tra partition Ext2fs m i khi kh i ng l i? : Tham kh o (EXT2-fs: warning: mounting unchecked file system) H: T i sao h th ng t p tin g c c a ti l ch - c? : hi u c lm th no m b n l i b nh v y, hy xem ph n (EXT2-fs: warning: mounting unchecked file system) Hy g n k t l i (remount) n. N u /etc/fstab l chnh xc, b n ch c n g:
mount -n -o remount /

N u etc/fstab b sai, b n ph i a thm tn thi t b v c th c ki u c a n n a, v d nh:


mount -n -o remount -t ext2 /dev/hda2 /

H: /proc/kcore l g? : Khng c m t t p tin no trong /proc th c s t n t i c , nh ng t p tin c t o b i kernel, cho b n cc thng tin v h th ng v khng chi m dung l ng c a a.
/proc/kcore gi ng nh m t b danh t i b nh trong my tnh c a b n. Kch th c c a chng b ng

v i dung l ng RAM m b n c, v n u b n c n nh l m t t p tin, kernel s th c hi n vi c c trn b nh .

H: T i sao card AHA1542C khng ho t ng trong Linux? : Ty ch n cho php card AHA1542C c th nh n ra c a c ng hn 1024 cylinders ch c n thi t cho cc BIOS c dng trong cc my bn, v nn t t i trong Linux. V i cc kernel c hn b n c n ph i t t h u h t cc ty ch n nng cao trong BIOS tr ty ch n v qut tm cc thi t b c th kh i ng c 11. H: Journalling File System u trn m ng?

: Linux hi n h tr kh nhi u journalling file systems. Ext3 hi n c g p vo trong dng kernel phin b n 2.4.x. : M t journalling file system c tn Reiserfs v a c pht hnh th nghi m. N c gi i thi u l lm cho Linux nhanh hn h n khi dng Linux v i h th ng t p tin Ext2, c bi t khi truy xu t t i nhi u t p tin nh .

31

Nh ng cu h i th ng g p v Linux Ton b thng tin c http://devlinux.org/namesys/ .

: JFS v n ang c pht tri n

Porting, bin d ch v l y chng trnh


H: Bin d ch chng trnh nh th no? : H u h t cc ph n m m trong Linux c vi t b ng C v c bin d ch b ng trnh bin d ch GNU (GNU C Compiler). GCC l m t ph n c a cc b n phn ph i Linux. Phin b n m i nh t c a GCC, cc ti li u, v patch t t i ftp://ftp.gnu.org/pub/gnu/. Nh ng chng trnh vi t b ng C++ ph i c bin d ch b ng trnh bin d ch GNU G++, cng c trong cc b n phn ph i v c t cng ch v i GCC. bin d ch h t nhn 2.0.x, b n c n GCC phin b n 2.7.2.x. Bin d ch cc h t nhn c v i trnh bin d ch khc, nh GCC 2.8.x, EGCS, ho c PGCC, c th gy ra l i v GCC related code dependencies. H t nhn phin b n 2.2, 2.4, v 2.5 c th c bin d ch b ng cc trnh bin d ch m i. Thng tin v trnh bin d ch EGCS t t i http://www.gnu.org/software/gcc/gcc.html. Ch r ng t i th i i m hi n nay, kernel developers khng s a l i cho cc phin b n c m t p trung pht tri n phin b n 2.5 cng nh b o tr cc phin b n 2.2.x v 2.4.x.

H: Lm th no ci t ph n m m GNU? : Trn h th ng c c u hnh ng, ci t cc ph n m m GNU c n cc b c sau: 1. Gi i nn m ngu n source.tar.gz:


tar zxvf package-name.tar.gz

2. Ch y script ./configure trong th m c m ngu n v a gi i nn. C th thm vo cc tham s n u c n. Cc tham s c ch p nh th ng c ghi trong t p tin INSTALL ho c README. 3. Ch y make. Chng trnh ny s bin d ch m ngu n v t o chng trnh. Cng o n ny c th m t vi pht ho c c khi l vi gi , ty thu c vo t c my tnh v kch th c c a chng trnh c n bin d ch. 4. Ch y make install. ci t chng trnh, cc t p tin c u hnh, v cc t p tin khc vo th m c thch h p.

H: L y Java

u?

: Sun Microsystems Java runtime environments v developers kits t t i http://java.sun.com/java/ B n c th l y m ngu n, v i gi y php c a Sun Microsystems.

32

Nh ng cu h i th ng g p v Linux

: Trang ch c a trnh bin d ch Java c a IBM Jikes l http://www10.software.ibm.com/developerworks/opensource/jikes. : C m t phin b n c a trnh duy t HotJava c a Sun cho Linux t i: http://www.java.sun.com/products/hotjava/ . : Kaffee, m t b n sao Java, c t i: http://www.kaffe.org. : C m t trang v cc gi java t do v thng m i t i: http://www.blackdown.org/java-linux.html. : Netscape Communicator dng m t phin b n Java Runtime Environment ring, v th n u b n ch c n Java xem Web, b n c l c phin b n r i. B n c th t i Communicator v t http://www.netscape.com. H: Lm sao chuy n XXX sang Linux? : Ni chung, cc chng trnh *nix c n r t t thay i. n gi n l theo cc h ng d n ci t. N u b n khng bi t v khng bi t lm sao tm cu tr l i cho vi cu h i trong qu trnh ci t, b n th on, nhng i u ny d ng nh d lm cho chng trnh g p l i. Trong tr ng h p ny, b n nn h i ai chuy n qua Linux. N u b n c m t chng trnh c a BSD, b n nn th dng -I/usr/include/bsd v -lbsd trn nh ng ph n thch h p c a qu trnh bin d ch.

H: ld.so l g v lm sao l y n? : ld.so l b n p th vi n ng 12. M i chng trnh dng th vi n dng chung13 th ng c n kho ng 3K m kh i ng tm v n p th vi n. By gi o n m c t trong m t th vi n c bi t, /lib/ld.so, nh ph a, v c th c nng c p d dng.
ld.so c th l y t http://tsx-11.mit.edu/pub/linux/packages/GCC/ v cc mirror . Phin b n m i nh t t i th i i m vi t bi ny l ld.so.1.9.5.tar.gz. /lib/ld-linux.so.1 cng nh v y, cho ELF (ELF l g? glibc l g?) v n m trong cng gi ph n

m m nh b n p a.out.

H: Lm sao c p nh t th vi n m khng lm h ng h th ng? :

C nh bo
B n nn t o s n a c p c u s n sng th c hi n nh ng thao tc ny, trong tr ng h p c ci g khng n!

33

Nh ng cu h i th ng g p v Linux

Cng vi c ny c bi t kh n u b n nn c p cc phin b n r t c nh libc4. Nhng b n nn gi l i libc4 trn cng h th ng v i libc5 cho nh ng chng trnh c n n n. i u cng ng i v i vi c c p nh t t libc5 sang b n glibc2 m i hn. V n v i nng c p th vi n ng l vo lc b n lo i b nh ng th vi n c, cc ti n ch b n c n nng c p s khng ho t ng. y l cch trnh i u . M t l t t m th i m t b n sao thu nh c a cc th vi n runtime, t /lib/, /usr/lib/, ho c /usr/local/lib/, ho c m t th m c khc c li t k trong t p tin /etc/ld.so.conf. V d , khi nng c p th vi n libc5, cc t p tin trong /lib/ c th trng gi ng th ny:
libc.so.5 libc.so.5.4.33 libm.so.5 libm.so.5.0.9

y l nh ng th vi n C v th vi n ton h c. Chp chng vo m t th m c khc c li t k trong /etc/ld.so.conf, nh /usr/lib/:


$ cp -df /lib/libc.so.5* /usr/lib/ $ cp -df /lib/libm.so.5* /usr/lib/ $ ldconfig

Hy ch c ch n ch y ldconfig c p nh t c u hnh th vi n. Cc t p tin libc.so.5 v libm.so.5 l cc lin k t bi u t ng14 tr n cc t p tin th c s . Khi nng c p, khng c n t o lin k t m i n u lin k t c v n cn, tr khi b ng dng c -f v i l nh cp. C -d v i l nh cp s chp chnh lin k t bi u t ng, khng ph i t p tin n tr t i. N u b n c n tr lin k t tr c ti p t i th vi n, hy dng c -f v i l nh ln. V d , chp th vi n m i ln ci c, hy th nh sau. T o lin k t bi u t ng n th vi n m i tr c, sau chp c hai th vi n v cc lin k t vo /lib/, b ng cc l nh sau.
$ $ $ $ ln ln cp cp -sf -sf -df -df ./libm.so.5.0.48 libm.so.5 ./libc.so.5.0.48 libc.so.5 libm.so.5* /lib libc.so.5* /lib

M t l n n a, nh ch y ldconfig sau khi chp th vi n. N u b n th a mn, b n c th lo i b cc t p tin t m c a th vi n c a ra kh i /usr/lib/ ho c ni no khc m b n chp vo.

H: C th dng m ho c trnh bin d ch c t o cho 486 dng trn 386 khng? : C, tr khi bin d ch kernel.

34

Nh ng cu h i th ng g p v Linux Ty ch n -m486 c a GCC, c dng bin d ch chng trnh x486, ch y u t i u vi i m. Chng lm cho chng trnh l n hn m t cht v nhanh hn m t t trn my 486. Chng v n ch y trn 386, m c d hi u su t km hn. Tuy nhin, t phin b n 1.3.35, kernel dng ch th ring c a 486 ho c Pentium n u c c u hnh cho 486 ho c Pentium, v th nn khng th ch y trn 386. GCC c th c c u hnh cho 385 ho c 486: khc bi t duy nh t l c u hnh cho 386 dng ty ch n -m386 lm m c nh cn 486 dng -m486 lm m c nh. Trong c hai tr ng h p, nh ng ty ch n ny c th b ghi b ng cch s a /usr/lib/gcc-lib/i*-linux/n.n.n/specs. M t b n alpha cho GCC bi t t i u cho 586 nh th no, nhng n khng ng tin c y l m, c bi t v i cc thi t l p t i u. Pentium GCC c ftp://tsx-11.mit.edu/pub/linux/ALPHA/pentium-gcc/. GCC 486 nguyn th y t o m t t hn cho Pentium b ng cch dng -m386, or t nh t cng nh hn.

H: L nh gcc -O6 lm ci g? : Hi n th i th cng nh -O2 (GCC 2.5) ho c -O3 (GCC 2.6, 2.7). B t k s no l n hn s ny i u lm nh nhau. T p tin Makefiles c a cc kernel m i dng -O2, v b n cng nn lm nh v y. H: linux/*.h v asm/*.h u?

: Cc th m c /usr/include/linux/ v /usr/include/asm/ th ng l cc lin k t tr t i th m c ch a kernel header, th ng n m t i /usr/src/kernel*/. N u b n khng c m ngu n kernel, hy t i chng v . Hy tham kh o cu tr l i: (Lm th no nng c p/bin d ch l i h t nhn) Sau khi t i, dng rm xa nh ng t p tin c, v ln t o lin k t:
$ rm -rf /usr/include/linux /usr/include/asm $ ln -sf /usr/src/linux/include/linux /usr/include/linux $ ln -sf /usr/src/linux/include/asm-<architecture> /usr/include/asm

Cc t p tin assembly n m trong cc th m c ring bi c cho t ng h my, v th b n c n lin k t /usr/src/include/asm t i /usr/src/linux/include/asm-i386 trn my PC, t i /usr/src/linux/include/asm-sparc trn my Sun Sparc, t i /usr/src/linux/include/asm-ppc trn PPC, v tng t th . B n cng s nh n ra c n make config nh trong m ngu n kernel m i, t o linux/autoconf.h.

H: Ph i lm g v i l i khi bin d ch h t nhn? : Xem cu h ilinux/*.h v asm/*.h u?.

Hy nh r ng khi b n patch kernel, b n ph i dng ty ch n -p0 ho c -p1. N u khng, c th s patch sai. Xem ti li u patch bi t chi ti t. ld: unrecognized option -qmagic ngha l b n c n c b lin k t m i hn, t ftp://tsx-11.mit.edu/pub/linux/packages/GCC/, trong t p tin binutils-2.8.1.0.1.bin.tar.gz.

35

Nh ng cu h i th ng g p v Linux H: Lm th no t o th vi n dng chung? : V i ELF,


$ gcc -fPIC -c *.c $ gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o

V i a.out, l y tools-n.nn.tar.gz t tsx-11.mit.edu/pub/linux/packages/GCC/src/. N c ti li u i km, s cho b n bi t c n lm g. Ch r ng th vi n dng chung a.out r t ph c t p, r c r i. Hy xem xt nng c p th vi n c a b n ln ELF. Xem ELF HOWTO, t i ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/.

H: T i sao chng trnh c a ti qu l n? : V i trnh bin d ch ELF (ELF l g? glibc l g?), nguyn nhn th ng nh t l thi u lin k t th vi n .so v i m i th vi n b n dng. Nn c m t lin k t nh libc.so v i m i th vi n nh libc.so.5.2.18. V i trnh bin d ch a.out nguyn nhn th ng nh t l ty ch n lin k t -g. Ty ch n ny t o ra m t chng trnh c lin k t tnh, ch a m i th vi n n c n thay v lin k t v i cc th vi n . Nh ng ty ch n khc ng quan tm l -O v -O2, cho php t i u (xem ti li u GCC), v -s (ho c l nh strip) lo i b nh ng thng tin symbol ra kh i chng trnh (v cng c ngha l hon ton khng th debug). B n c th s mu n dng ty ch n -N trn nhng chng trnh r t nh (nh hn 8K v i -N), nhng b n khng nn lm th tr khi b n hi u tc ng v hi u su t c a ty ch n ny, v hon ton khng nn lm v i daemon.

H: Linux c h tr tuy n o n (thread) v ti n trnh nh cn (lightweight process) khng? : Cng nh m hnh a ti n trnh Unix, bao g m n cc ti n trnh nh cn, l m t ph n c a Linux kernel chu n, c vi phin b n ti n trnh ho c thread nh cn. Cc kernel g n y dng m hnh thread l kthreads. Ngoi ra, cng c th dng nh ng gi ph n m m sau.

GNU glibc2 cho Linux c ty ch n h tr thread: ftp://ftp.gnu.org/pub/gnu/ Trong sipb.mit.edu:/pub/pthread/ ho c ftp.ibp.fr:/pub/unix/threads/pthreads. Ti li u khng n m trong gi ny, nhng c t i http://www.mit.edu:8001/people/proven/home_page.html. Cc phin b n libc m i hn ch a m ngu n pthreads. Trnh bin d ch GNU Ada trn ftp://metalab.unc.edu/pub/Linux/devel/lang/ada/gnat-3.01-linux+elf.tar.gz ch a chng trnh c t o t m ngu n . QuickThreads ftp://ftp.cs.washington.edu:/pub/qt-001.tar.Z. Thng tin chi ti t n m trong cc bo co k thu t, n m cng a ch , /tr/1993/05/UW-CSE-93-05-06.PS.Z. lwp gummo.doc.ic.ac.uk/rex/ (gummo.doc.ic.ac.uk/rex) , m t phin b n r t nh .

M t phin b n c a Ada ftp://ftp.cs.fsu.edu:/pub/PART/. C nhi u ti li u PostScript m b n c th h c c nhi u thng tin b ch v thread. Khng th s d ng tr c ti p trong Linux.

Vui lng lin l c tc gi cc gi ph n m m trn bi t chi ti t.

36

Nh ng cu h i th ng g p v Linux

H: C th tm lint cho Linux

: Tnh nng g n tng ng c ci s n trong GCC. Hy dng ty ch n -Wall b t h u h t cc c nh bo b sung r t h u d ng. Xem ti li u GCC bi t chi ti t (g F1-i trong Emacs v ch n m c GCC). C m t phin b n khc g i l lclint th c hi n nh lint. M ngu n t t i ftp://larch.lcs.mit.edu/pub/Larch/lclint/ ho c http://lclint.cs.virginia.edu/ .

H: C th tm Kermit cho Linux

u?

: M ngu n v chng trnh c t i ftp://kermit.columbia.edu. Trang ch c a d n Kermit i h c Columbia l http://www.columbia.edu/kermit/ .

H: Lm th no dng Cable Modem trong Linux? : www.CablemodemInfo.com v trang web xDSL t i http://www.cablemodeminfo.com c m t ph n dnh cho Linux. Ngoi ra hy xem Cable-Modem-HOWTO (http://www.tldp.org/HOWTO/Cable-Modem/index.html) t i LDP.

H: C chng trnh ICQ no ch y trong Linux khng? : Vi ICQ client c trn metalab.unc.edu (ftp://metalab.unc.edu). (Hy tham kh o: FTP c a Linux u?) ICQ g c khng c Linux client, nhng c m t b n Java client t i http://www.mirabilis.com/download/ .

Gi i php cho cc v n linh tinh thng th ng


H: T i sao FTP d ng nh b treo? : FTP b ch t t ng t th ng do trn vng m. Trn cc h Linux, v n ny d ng nh xu t hi n th ng xuyn nh t v i cc ph n m m server trong cc b n phn ph i. N u b n nh n c l i ftp: connection refused, th ng l do thi u xc th c (authentication). Hy tham kh o T i sao FTP ho c Telnet server c a ti khng cho php ng nh p?. M t gi i php l thay th cc server FTP trong cc b n phn ph i b ng server FTP c a OpenBSD. Trang ch c a chng trnh l: http://www.eleves.ens.fr:8080/home/madore/programs/ . ci t server ny, hy theo cc ch d n ci t, v tham kh o man page c a inetd v [inetd.conf]. (N u b n cha quen xinetd, hy xem bn d i.) Hy ki m tra ch c ch n cho [inetd] bi t c n ch y BSD daemon c l p, khng ph i l m t ti n trnh con, v d nh l ti n trnh con c a [tcpd]. Comment nh ng dng b t u b ng ftp trong t p tin [/etc/inetd.conf] v thay b ng m t dng tng t nh sau (n u b n ci t b n [ftpd] m i trong [/usr/local/sbin/]):

37

Nh ng cu h i th ng g p v Linux
# Original entry, commented out. #ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.ftpd # Replacement entry: ftp stream tcp nowait root /usr/local/sbin/ftpd -l

Daemon thay th s ho t ng sau khi kh i ng l i inetd ho c g i tn hi u (v i quy n root) SIGHUP cho inetd, v.d.:
# kill -HUP inetd

c u hnh [xinetd], hy t o m t m c trong [/etc/xinetd.d] per the instructions in the [xinetd.conf] manual page. Hy ki m tra ch c ch n cc tham s cho [ftpd] l ng, v b n ci t p tin /etc/ftpusers v [/etc/pam.d/ftp]. Sau hy kh i ng l i [xinetd] b ng l nh: /etc/rc.d/init.d/xinetd restart. L nh ny s bo "OK", system message log s lu thng bo ny.

H: T i sao free t o core? : V i Linux 1.3.57 tr i, d ng th c c a /proc/meminfo b thay i nn free khng hi u. Hy l y phin b n free m i nh t, t metalab.unc.edu, trong [/pub/Linux/system/Status/ps/procps-0.99.tgz].

H: T i sao Netscape b h ng th ng xuyn? : Netscape kh b crash n u n c c u hnh ng, v c u hnh m ng cng ng. Vi th c n ki m tra l:

Hy ki m tra bi n mi tr ng MOZILLA_HOME xem c ng khng. N u b n ci Netscape trong /usr/local/netscape/, v d , v y th cng l gi tr c a MOZILLA_HOME. Hy t bi n mi tr ng b ng dng l nh (v.d, "export MOZILLA_HOME="/usr/local/netscape"" trong bash ho c thm dng vo t p tin kh i ng h th ng ho c t p tin kh i ng c a ng i dng. Hy tham kh o man page c a shell bi t cch dng l nh. N u b n dng phin b n brand-new, hy th v i cc phin b n c hn, phng tr ng h p khng tng thch th vi n run-time. V d , Netscape 4.75 c ci (g "netscape --version" t i d u nh c shell), hy th ci b n 4.7. M i phin b n c lu t i ftp://ftp.netscape.com/. Netscape dng th vi n Motif v Java Runtime Environment (JRE) ring. N u c m t phin b n khc c a cc th vi n ny c ci trn my b n tr c , hy m b o r ng chng khng interfer with Netscapes libraries; v.d., b ng cch g b chng. Hy ch c ch n r ng Netscape c th k t n i t i name server m c nh c a n. N u chng trnh c v ng ng ho t ng trong vi pht th c l l n khng k t n i c t i name server m c nh c a n, ngha l h th ng khng th k t n i t i cc my khc.

38

Nh ng cu h i th ng g p v Linux H: T i sao FTP ho c Telnet server c a ti khng cho php ng nh p? : Nh ng i u sau y ch p d ng cho cc server c tr l i cho client, nhng l i khng cho php ng nh p. Trn cc h th ng m i c ci Pluggable Authentication Module (PAM), hy xem cc t p tin tn l [ftp] ho c [telnet] trong th m c /etc/pam/ ho c trong [/etc/pam.d/]. N u t p tin tng ng khng t n t i, hy xem ch d n c u hnh xc th c FTP v Telnet v cc c u hnh PAM khc, t /usr/doc/pam-<version>]. Ngoi ra hy tham kh o cu tr l i cho "FTP ku r ng: 421 service not available, remote server has closed connection.." N u FTP server t trn m t h th ng c, hy ki m tra xem ti kho n c dng c t n t i trong t p tin /etc/passwd hay khng, c bi t l ti kho n anonymous. Lo i l i ny c th do l i phn gi i a ch my, t bi t n u b n dng Reverse Address Resolution Protocol (RARP). Cu tr l i n gi n l li t k ton b tn my c lin quan v a ch IP c a my vo trong t p tin /etc/hosts trn m i my. (Hy xem v d v t p tin /etc/hosts v [/etc/resolv.conf] t i: "Sendmail d ng t i m t pht v i m i l nh.") N u m ng c DNS n i b , hy ki m tra ch c ch n m i my c th phn gi i a ch m ng b ng DNS . N u my hon ton khng tr l i FTP ho c Telnet client th c l daemon c a server c ci t khng ng, ho c cha ci t. Hy tham kh o man page: inetd v inetd.conf trn cc h th ng c, or xinetd v xinetd.conf, cng nh ftpd, v telnetd.

H: Lm sao theo di Bookmark trong Netscape? : i u ny c l p d ng cho h u h t cc trnh duy t khc lun. Trong menu Preferences/Navigator, t trang ch c a Netscape l bookmarks.html, n m trong th m c .netscape (c d u ch m u). V d , n u tn ng nh p c a b n l smith, hy t trang ch l:
file://home/smith/.netscape/bookmarks.html

Thi t l p trang ch nh trn s th hi n m t trang bookmark p khi Netscape kh i ng, v c t ng c p nh t b t c khi no b n thm, xa ho c thm m t site no c bookmark.

H: Tai sao my tnh lu sai gi ? : C hai ng h trong my tnh. ng h ph n c ng (CMOS) lun ch y k c khi t t my. ng h ny c dng khi h th ng kh i ng v c dng b i DOS (n u b n dng DOS). Th i gian h th ng, c hi n th v s a i b ng l nh date, c h t nhn qu n l trong khi Linux ang ch y. B n c th hi n th th i gian c a ng h CMOS, ho c t gi c a ng h ny nh ci cn l i, b ng /sbin/clock (by gi c g i l hwclock trong nhi u b n phn ph i). Hy tham kh o: man 8 clock ho c man 8 hwclock. C nhi u chng trnh khc nhau c th s a m t trong hai ho c c hai ng h for system drift ho c truy n th i gian xuyn m ng. Vi chng trnh trong s c th c ci trn h th ng c a b n. Hy th tm adjtimex (corrects for drift), cc client Giao th c Th i gian M ng (Network Time Protocol - NTP) nh netdate, getdate, v xntp, ho c b client server NTP nh chrony. Hy tham kh o: Tm cc ph n m m c bi t nh th no?.

39

Nh ng cu h i th ng g p v Linux H: T i sao script c setuid khng ho t ng? : Chng khng c thi t k ho t ng c. Tnh nng ny c v hi u ha trong h t nhn Linux, v cc script c setuid r t d t o ra l h ng b o m t. Sudo v SuidPerl c th cung c p m t c ch an ton hn so v i cc script ho c chng trnh c setuid, c bi u trong tr ng h p quy n th c thi c gi i h n cho m t ng i dng ho c m t nhm ng i dng. N u b n mu n bi t t i sao script c setuid t o ra l h ng b o m t, hy c FAQ c a comp.unix.questions.

H: T i sao l ng b nh tr ng (Free Memory) c bo co b i free ngy cng t? : L ng b nh tr ng in b i free khng tnh l ng b nh c dng l vng m a, c hi n th trong c t buffers. N u b n mu n bi t th c s cn tr ng bao nhiu b nh , hy c ng ph n b nh trong buffers vo kho ng free. Cc phin b n free m i hn in dng thng tin m r ng ch a thng tin ny. Vng m a c khuynh h ng tng nhanh sau khi Linux kh i ng. Khi b n n p chng trnh v c t p tin, chng s c cache. Tuy nhin l ng cache s tr nn n nh sau m t kho ng th i gian.

H: T i sao h th ng ch m i khi thm b nh ? : y l tri u ch ng thng th ng khi g p l i cch b nh b sung. V n chnh xc ph thu c vo motherboard c a b n. i khi b n b t cache trn m t s vng nh t nh trong thi t l p BIOS. Hy xem l i thi t l p CMOS xem c ty ch n no cache vng nh m i, m hi n cha c b t khng. i u ny x y ra th ng xuyn v i 486. i khi RAM ph i c c m vo ng socket m i c th c cache. i khi b n ph i t jumper b t cache. i khi motherboards khng cache ton b RAM n u b n c nhi u RAM trn m i l ng cache hn d on. Th ng full cache 256K s x l v n ny. N u nghi ng , hy xem l i ti li u. N u b n v n khng th s a l i v ti li u khng thch h p, b n c th g i thng bo ln comp.os.linux.hardware, cung c p y thng tin chi ti t, s model, date code, ..., nh ng i khc c th trnh dng n.

H: T i sao vi chng trnh (v.d. xdm) khng cho php ng nh p? : C l b n dng chng trnh dng m t kh u non-shadow trong khi b n l i ang dng m t kh u shadow. N u th , b n c n ph i l y m t phin b n m i dng m t kh u shadow v bin d ch l i. B chng trnh m t kh u shadow t t i ftp://tsx-11.mit.edu:/pub/linux/sources/usr.bin/shadow/. l m ngu n. M nh phn c l trong [linux/binaries/usr.bin/].

40

Nh ng cu h i th ng g p v Linux H: T i sao vi chng trnh cho php ng nh p khng c n m t kh u? : C l b n g p v n nh (T i sao vi chng trnh (v.d. xdm) khng cho php ng nh p?), c ng thm vi th khc. N u b n dng m t kh u shadow, b n nn thm k t x ho c m t d u sao vo tr ng m t kh u c a m i ti kho n trong t p tin /etc/passwd, nh n u m t chng trnh no khng bi t m t kh u shadow, n s khng ngh r ng l ti kho n khng c m t kh u r i cho php ng nh p t do.

H: T i sao my ch y r t ch m v i GCC / X / ...? : C l do b n c qu t b nh . N u b n c t RAM hn l ng c n thi t cho cc chng trnh b n ang ch y, Linux s swap a c ng c a b n v ch y ch m kinh kh ng. Gi i php trong tr ng h p ny l ng ch y cng lc qu nhi u chng trnh ho c mua thm RAM. B n cng c th tng b nh b ng cch bin d ch h t nhn v i t ty ch n hn. Hy xem (Lm th no nng c p/bin d ch l i h t nhn) B n c th bi t ang dng bao nhiu b nh v vng hon i b ng l nh free, ho c b ng cch g:
$ cat /proc/meminfo

N u h t nhn c a b n c c u hnh v i RAM disk, c th i u lm ph ph m b nh v lm cho h th ng ch m i. Hy dng LILO ho c rdev b o h t nhn ng t o RAM disk (hy xem ti li u LILO ho c g man rdev).

H: T i sao h th ng ch cho php ng nh p root? : C th b n ang g p v n v quy n truy c p, ho c b n c t p tin /etc/nologin. Trong tr ng h p sau, hy t dng rm -f /etc/nologin vo t p tin [/etc/rc.local] ho c [/etc/rc.d/*] c a b n. Trong tr ng h p khc, hy ki m tra l i quy n truy c p c a shell c a b n v b t k t p tin no xu t hi n trong thng bo l i, v c cc th m c ch a nh ng t p tin cho t i th m c g c.

H: T i sao mn hnh y nh ng k t k l ? : C l do b n l g i d li u nh phn ra mn hnh. Hy g echo -e \ec s a l i. Nhi u b n phn ph i c l nh reset lm cng vi c tng t . N u v n khng c, hy th g i l nh escape tr c ti p ra mn hnh.
$ echo Ctrl-V Ctrl-O

Vi c ny ph c h i font m c nh c a console. Nh gi phm Control v g k t thay v n phm Control, bung ra, r i m i g k t . Chu i l nh

41

Nh ng cu h i th ng g p v Linux
$ echo Ctrl-V Esc C

reset ton mn hnh. If theres data left on the shell command line after typing a binary file, nh n Ctrl-C vi l n ph c h i d u nh c shell. L nh khc c th dng l m t b danh15, sane, c th lm vi c v i cc terminal thng th ng:
$ alias sane=echo -e " c";tput is2; > stty sane line 1 rows $LINES columns $COLUMNS

L nh trn dng d u nhy ng c (k bn phm s 1), khng ph i nhy n. Xu ng hng ch cho r rng, khng c n thi t ph i lm nh v y. Hy b o m r ng $LINES v $COLUMNS c nh ngha trong [~/.cshrc] ho c [~/.bashrc] b ng m t l nh gi ng nh l nh sau:
$ LINES=25; export $LINES; $COLUMNS=80; export $COLUMNS

t $LINES v $COLUMNS ng b ng s dng v s c t c a terminal c a b n. Cu i cng, u ra c a stty -g c th c dng t o shell script reset terminal: 1. Lu k t qu u ra c a stty -g vo t p tin. Trong v d ny, t p tin l termset.:
$ stty -g >termset

K t qu c a stty -g (n i dung c a [termset]) s trng gi ng th ny:


500:5:bd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:73

2. S a [termset] thnh shell script b ng cch thm interpreter v l nh stty:


#!/bin/bash stty 500:5:bd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:73

3. t quy n th c thi cho termset v dng nh m t shell script:


$ chmod +x termset $ ./termset

H: N u ti qu y h th ng v khng th ng nh p c th lm th no kh c ph c? : B n t o a m m kh n c p r i, ph i khng? Hy kh i ng t a m m . V d , c p a m m c a Slackware (g m a kh i ng v a root) n m trong th m c install c a b n phn ph i Slackware.

42

Nh ng cu h i th ng g p v Linux : Ngoi ra cn c hai gi ph n m m t t o a kh n c p ftp://metalab.unc.edu/pub/Linux/system/Recovery/. Nh ng ci ny t t hn v chng ch a lun h t nhn trn a, v th b n khng ph i lo nguy c thi u cc thi t b v h th ng t p tin. Hy m shell v g n k t a c ng b n b ng dng l nh tng t nh

$ mount -t ext2 /dev/hda1 /mnt

Sau h th ng t p tin c a b n s c g n v i th m c /mnt v b n c th s a l i. Hy nh tho g n k t a c ng tr c khi kh i ng l i (cd ra ngoi tr c, n u khng n s bo busy).

H: i u g s x y ra n u ti qun m t kh u root? :

C nh bo
M t sai ph m trong vi c hi u ch nh nh ng t p tin trong th m c /etc c th lm h ng h th ng b n. Hy t o m t b n sao c a b t c t p tin no b n nh s a phng sai st.

N u b n phn ph i c a b n cho php kh i ng ch ng i dng n (single-user), hy th kh i ng ch ny b ng cch g single t i d u nh c BOOT lilo:. Nhi u b n phn ph i g n y cho php kh i ng ch ng i dng n b ng cch g linux 1, linux single, ho c init=/bin/bash. N u cch trn khng c, hy kh i ng t a ci t ho c a m m, v chuy n sang console o khc b ng Alt-F1 -- Alt-F8, v sau g n k t h th ng t p tin g c vo /mnt. Sau th c hi n nh ng b c d i y xc nh xem h th ng b n dng m t kh u chu n hy m t kh u shadow, v lm cch no b m t kh u. Dng trnh so n th o a thch c a b n s a m c root trong t p tin /etc/passwd b m t kh u. M t kh u c t gi a d u hai ch m u v d u hai ch m th hai. Ch lm v y tr khi tr ng m t kh u ch ch a m t k t x. Trong tr ng h p , hy xem bn d i
root:Yhgew13xs:0:0: ...

i thnh:
root::0:0: ...

N u m t kh u ch ch a m t k t x, b n ph i b m t kh u trong t p tin /etc/shadow, c cng d ng th c v i t p tin /etc/passwd. Hy tham kh o man page: man passwd, v man 5 shadow.

43

Nh ng cu h i th ng g p v Linux H: u l l h ng b o m t nghim tr ng c a l nh rm!?!?! : Khng c. R rng b n c l l m v i cc h i u hnh h Unix v c n c m t cu n sch hi u m i th ho t ng ra sao. u m i: kh nng xa t p tin ph thu c vo quy n truy c p ghi c a th m c . H: T i sao lpr v/ho c lpd khng ho t ng? : Tr c h t, hy ki m tra ch c ch n [/dev/lp*] c c u hnh ng. IRQ v a ch c ng c n ph i ng v i cc thi t l p trn card my in. B n s c th xu t m t t p tin tr c ti p ra my in:
$ cat the_file >/dev/lp1

N u lpr a ra thng bo nh myname@host: host not found, c ngha l c kh nng giao di n loopback, lo, khng ho t ng. H tr loopback c trong h u h t cc b n phn ph i c a h t nhn. Hy ki m tra xem giao di n ny c c u hnh ng khng b ng l nh ifconfig. Theo quy c, a ch m ng s l 127.0.0.0 v a ch my c c b l 127.0.0.1. N u m i th c c u hnh ng, b n s c th telnet t i chnh my b n v c th ng nh p thng qua telnet. Hy ki m tra ch c ch n [/etc/hosts.lpd] ch a tn my c a b n. If your machine has a network-aware lpd, like the one that comes with LPRng, make sure that [/etc/lpd.perms] is configured correctly. Ngoi ra hy xem Printing HOWTO (http://www.tldp.org/HOWTO/Printing-HOWTO/index.html). Ti li u u?.

H: T i sao Timestamps tn t p tin trn partition MS-DOS khng ng? : C m t l i trong chng trnh clock (th ng c t trong /sbin). N m thi u m t mi gi , l n l t giy v i pht ho c v i th khc. Hy dng phin b n m i hn. H: Lm th no LILO kh i ng kernel image? : T phin b n h t nhn 1.1.80 tr i, cc kernel image nn, c dng b i LILO, t t i [arch/i386/boot/zImage], ho c [arch/i386/boot/bzImage] khi c t o ra, v th ng c lu trong th m c /boot/. T p tin [/etc/lilo.conf] th ng dng lin k t bi u t ng vmlinuz symbolic link, khng ph i l kernel image th t s . i u ny c thay i vi c t o kernel cho cc b x l khc nhau d dng hn t m t source tree.

H: Lm th no b o m h th ng s kh i ng sau khi ci t l i h i u hnh? : Ch d n ny s lm vi c b t k b n ci t l i Linux hay cc h i u hnh khc:


t a tr ng, nh d ng vo

a A:

Lu b n sao c a Master Boot Record (MBR) c a a c ng vo a m m b ng l nh:


# dd if=/dev/hda of=/dev/fd0 count=1 dd l m t chng trnh chu n trn h th ng Linux. Phin b n cho MS-Windows c t i

ftp://ftp.gnu.org/, cng nh t i nhi u MS software archive khc.

44

Nh ng cu h i th ng g p v Linux

Ki m tra xem a m m c kh i ng h th ng khng, b ng cch kh i ng l i h th ng khi v n a trong a A:. Sau b n c th ci t h i u hnh khc (trn a c ng khc v/ho c trn partition khc, n u b n khng mu n g b Linux). Sau khi ci t, hy kh i ng Linux b ng a m m v ci t l i MBR b ng l nh: /sbin/lilo.

H: T i sao card PCMCIA c a ti khng ho t ng sau khi nng c p h t nhn? : Mun d ch v Card PCMCIA, n m trong /lib/modules/version/pcmcia, v i version l phin b n c a kernel, dng thng tin c u hnh ring cho kernel image. Cc mun PCMCIA s khng ho t ng v i kernel khc. B n c n nng c p mun card PCMCIA khi nng c p kernel. Khi nng c p t kernel c, ch c r ng b n c phin b n th vi n run-time, gi module, .. m i nh t (ho c kh m i). Tham kh o t p tin Documentation/Changes trong m ngu n kernel bi t chi ti t.
Quan tr ng: N u b n dng D ch v Card PCMCIA, ng b t ty ch n Network device support/Pocket v portable adapters trong menu c u hnh kernel, v n xung t v i cc mun trong D ch v Card PCMCIA.

Bi t cc m i lin h mun PCMCIA trong kernel c r t h u d ng. B n c n lu thng tin l i. V d , n u card PCMCIA c a b n ph thu c vo thi t b c ng tu n t c ci t b ng mun trn kernel c, b n c n m b o mun tu n t cng c trong kernel m i lun.

H: Lm th no lo i b (ho c thay i) mu s c trong cch hi n th c a l nh ls? : N u ls ang hi n th mu v b n khng mu n th , c l b n ang dng alias c a l nh ny. Vi b n phn ph i m c nh dng cch ny. L nh shell, unalias ls, s b alias m b n phn ph i dng. dng lu di, hy s a script kh i ng c a b n, .bashrc.

: thay i mu s c hn l b mu, hy xem man page c a ls man page (man ls). H: T i sao chng trnh khng ho t ng trong th m c hi n th i? : V th m c hi n th i khng n m trong ng d n tm ki m, v l do b o m t, cng nh m b o b n dng b n dng ng phin b n c a cc chng trnh. N u m t k xm nh p c th t o m t t p tin (m t chng trnh) trong th m c cng c ng, nh /tmp, ng i s c th ch y chng trnh n u n n m trong ng d n tm ki m. Gi i php cho v n ny l g p c th m c khi g i l nh; v.d., d ng ./myprog, thay v myprog. Ho c l thm th m c hi n th i vo bi n mi tr ng PATH; v.d., export PATH=".:"$PATH trong bash, m c d cch ny khng c khuy n khch v l do nu trn.

45

Nh ng cu h i th ng g p v Linux

Lm i u ny nh th no ho c tm hi u ci kia ra sao...
H: Lm th no bi t Notebook c ang ch y Linux hay khng? : Theres no fixed answer to this question, because notebook hardware is constantly updated, v getting the X display, sound, PCMCIA, modem, v so forth, working, can take a good deal of effort. Most notebooks currently on the market, for example, use "Winmodems," which often do not work with Linux because of their proprietary hardware interfaces. Even notebooks which are certified as "Linux compatible," may not be completely compatible. Information about installing Winmodems in general is contained in the Winmodems-and-Linux-HOWTO (http://www.tldp.org/HOWTO/Winmodems-and-Linux-HOWTO.html). (Refer to Ti li u u?) You can find the most current information, or ask other users about their notebook experiences, on the linux-laptop mailing list, which is hosted b i the vger.redhat.com server. (Refer to Mailing List u?) A mailing list for Linux on IBM Thinkpads has its home page t i http://www.topica.com/lists/linux-thinkpad/ . Another Thinkpad mailing list is hosted b i http://www.bm-soft.com/ . Send email with the word help in the body of the message to majordomo@www.bm-soft.com (mailto:majordomo@www.bm-soft.com). There is a Web page about Linux on IBM Thinkpads t i http://peipa.essex.ac.uk/tp-linux/ . The Linux Laptop home page is t i http://www.cs.utexas.edu/users/kharker/linux-laptop/ . For information about interfacing peripherals like Zip v CD-ROM drives through parallel ports, refer to the Linux Parallel Port Home Page, t i http://www.torque.net/linux-pp.html. If you need the latest version of the PCMCIA Card Services package, it is (or was) located t i ftp://cb-iris.stanford.edu/pub/pcmcia/, but that host no longer seems to be available. Recent nh ng b n phn ph i are on ftp://metalab.unc.edu/pub/Linux/kernel/pcmcia/. You will also need to have the kernel source code installed as well. Be sure to read the ERROR: LDP namespace resolution failure on PCMCIA-HOWTO (http://failed.com), which is included in the b n phn ph i.

H: Lm th no ci t Linux b ng FTP? : Most nh ng b n phn ph i are too large v complex to make FTP installation practical. Installing a basic Linux system that doesnt have a GUI or major applications is possible with FTP, however. The main non-commercial b n phn ph i in use is Debian GNU/Linux, v this answer describes an installation of a basic Debian system, to which you can add other Linux applications v commercial software as necessary. This answer describes installation on IBM-compatible machines with an Intel x86 or Pentium processor. You will need a machine with t i least a 80386 processor, 8 Mb of memory, v about 100 Mb of disk space. More memory v a larger disk is necessary however, for practical everyday use. For other hardware, substitute -arm, -ppc, -m68k, or other abbreviation in directory names for -i386. For detailed v hardware-specific information refer to: http://www.debian.org/releases/stable/ .

46

Nh ng cu h i th ng g p v Linux

Connect using anonymous FTP to ftp.debian.org v cd to the [pub/debian/dists/stable/main/disks-i386/current/] subdirectory. Retrieve the binary image files for the rescue disk, v the drivers disk. Depending on the floppy drive installed on your machine, retrieve either the diskette images with "1200" in the names if you have a 1.2 Mb, 5.25-in. floppy, or the disks with "1440" in the name if the computer has a 3.25-in., 1.44 Mb floppy. Then retrieve the base system diskettes. Note that there are 7 base system images in the 1.44-Mb set (which have a 14 in their names) , v 9 in the 1.2-Mb set of images (which have a 12 in their names). You will use these to create the basic installation diskettes. If you have a Linux machine, you can use dd to write the images to the diskettes. If you are creating the installation diskettes on a MS-DOS machine, also download the [RAWRITE.EXE] MS-DOS utility, which will copy the raw binary images to floppy disks. Also download the [install.en.txt] document, which contains the detailed installation instructions. Create the installation disk set on floppies using either dd under Linux (v.d.: dd if=resc1440.bin of=/dev/fd0), or the [RAWRITE.EXE] utility under MS-DOS. Be sure to label each installation diskette. Insert the rescue diskette into the floppy drive v reboot the computer. If all goes well, the Linux kernel will boot, v you will be able start the installation program b i pressing Enter t i the boot: prompt. Follow the on-screen instructions for partitioning the hard disk, installing device drivers, the basic system software, v the Linux kernel. If the machine is connected to a local network, enter the network information when the system asks for it. To install additional software over the Internet, be sure that you have installed the ppp module during the installation process, v run (as root) the /usr/sbin/pppconfig utility. You will need to provide your user name with your ISP, your password, the ISPs dial-up phone number, the address(es) of the ISPs Domain Name Service, v the serial port that your modem is connected to, /dev/ttyS0 /dev/ttyS3. Be sure also to specify the defaultroute option to the PPP system, so the computer knows to use the PPP connection for remote Internet addresses. You may have to perform additional configuration on the PPP scripts in the /etc/ppp subdirectory, v in particular, the ISP-specific script in the /etc/ppp/peers subdirectory. There are basic instructions in each script. For detailed information, refer to the Debian/GNU Linux installation instructions that you downloaded, the pppd manual page (type man pppd), v the PPP HOWTO from the Linux Documentation project, http://www.tldp.org/ . Once you have a PPP connection established with your ISP (it will be displayed in the output of ifconfig), use the dselect program to specify which additional software you want to install. Use the apt [A]ccess option to retrieve packages via anonymous FTP, v make sure to use the [U]pdate option to retrieve a current list of packages from the FTP archive.

H: C th ti p t c t i v sau khi b ng t k t n i khng? : You can use the reget command of the standard ftp client program after reconnecting to pick up where you left off. Clients like ncftp support resumed FTP downloads, v wget supports resumed FTP v HTTP downloads.

47

Nh ng cu h i th ng g p v Linux H: Lm th no t c u hnh lc kh i ng? : You can configure Linux t i the lilo: prompt either b i typing the kernel arguments t i the
BOOT lilo: prompt, or b i adding an append= directive to the [/etc/lilo.conf] file; for example: # t i the LILO prompt (example only): BOOT lilo: parport=0x3bc,7 parport=0x3bc,none serial=0x3f8,4 serial=0x2f8,3

# Example statement for /etc/lilo.conf: append="parport=0x3bc,none serial=0x3f8,4 serial=0x2f8,3"

If you modify the [/etc/lilo.conf] file, be sure to run the lilo command to install the new configuration. Configuration notes for specific hardware devices are in the documentation of the kernel source b n phn ph i, [/usr/src/linux/Documentation] in most nh ng b n phn ph i. Refer to the lilo v [/etc/lilo.conf] manual pages, as well as the LDP BootPrompt-HowTo (Ti li u u?), v the documentation in [/usr/doc/lilo].

H: Lm th no nh d ng Man Pages khng c n man ho c groff? : The man2html program translates groff text to HTML, which you can view with a Web browser. The man2html program, v many like it, are availble on the Web. Look for them with your favorite search engine. The unformatted manual pages are stored in subdirectories of [/usr/man], [/usr/local/man], v elsewhere. If you want to view text, use nroff v less. Both of these programs have MSDOS versions with an implementation of the man macro package available as well. An example would be:
$ nroff -man /usr/man/man1/ls.1 | less

If you know where to find a good implementation of the man macros without installing groff , please let the FAQ maintainer know. If the manual page filename ends in .gz, then youll need to uncompress it before formatting it, using gzip -d or gunzip. A one-line example would be:
$ gzip -dc /usr/man/man1/ls.1.gz | nroff -man | less

48

Nh ng cu h i th ng g p v Linux H: Lm th no cu n ng c mn hnh trong ch vn b n : With the default US keymap, you can use Shift with the PgUp v PgDn keys. (The gray ones, not the ones on the numeric keypad.) With other keymaps, look in [/usr/lib/keytables]. You can remap the ScrollUp v ScrollDown keys to be whatever you like. The screen program, http://vector.co.jp/vpack/browse/person/an010455.html provides a searchable scrollback buffer v the ability to take snapshots of text-mode screens. Recent kernels that have the VGA Console driver can use dramatically more memory for scrollback, provided that the video card can actually handle 64 kb of video memory. Add the line:
#define VGA_CAN_DO_64B

to the start of the file [drivers/video/vgacon.c]. This feature may become a standard setting in future kernels. If the video frame buffer is also enabled in the kernel, this setting may not affect buffering. In older kernels, the amount of scrollback is fixed, because it is implemented using the video memory to store the scrollback text. You may be able to get more scrollback in each virtual console b i reducing the total number of VCs. See [linux/tty.h]. Chris Karakas

H: Lm th no c th s d ng email : For sending mail via SMTP (Simple Mail Transfer Protocol) v receiving mail from an ISPs POP (Post Office Protocol) server, you can use a desktop client like Netscape Communicator or KDE kmail. You will need to enter the names of the SMTP v POP servers in the preferences of the respective application, as well as your E-mail address (v.d., username@example.com), v your dial-up password. The same applies to Usenet News. Enter the name of the NNTP (Network News Transfer Protocol) server in your News clients preferences section. You may also have to provide the IP addresses of the ISPs primary v secondary name servers. If you have a traditional MTA (Mail Transport Agent) like Sendmail, Smail, qmail, or Exim, youll need to follow the instructions in each package. Basically, configuration entails determining which host machine, either on your local LAN or via dial-up Internet, is the Smart Host, if youre using SMTP. If youre using the older UUCP protocol, then youll need to consult the directions for configuring UUCP, v also make sure that your ISPs system is configured to relay mail to you. Information about Internet hosting, v News v E-mail in general, is available on the Usenet News group news.announce.newusers, v those FAQs are also archived t i ftp://rtfm.mit.edu/pub/usenet/.

H: Sendmail d ng t i m t pht v i m i l nh : Make sure that Sendmail can resolve your hostname to a valid (i.e., parsable) domain address. If you are not connected to the Internet, or have a dial-up connection with dynamic IP addressing, add the fully qualified domain name to the /etc/hosts file, in addition to the base host name; v.d., if the host name is bilbo v the domain is bag-end.com:
192.168.0.1 bilbo.bag-end.com bilbo

49

Nh ng cu h i th ng g p v Linux

And make sure that either the /etc/host.conf or /etc/resolv.conf file contains the line:
order hosts,bind

Th n tr ng
Do not change the localhost entry in /etc/hosts, because many programs depend on it for internal message-passing.

Sendmail takes many factors into account when resolving domain addresses. These factors, collectively, are known as, rulesets, in sendmail jargon. The program does not require that a domain address be canonical, or even appear to be canonical. In the example above, bilbo. (note the period) would work just as well as bilbo.bag-end.com. This v other modifications apply mainly to recent versions. Prior to version 8.7, sendmail required that the FQDN appear first in the [/etc/hosts] entry. This is due to changes in the envelope address masquerade options. Consult the sendmail documents. If you have a domain name server for only a local subnet, make sure that . refers to a SOA record on the server machine, v that reverse lookups (check b i using nslookup) work for all machines on the subnet. Finally, FEATURE configuration macro options like nodns, always_add_domain, v nocanonify, control how sendmail interprets host names. The document, Sendmail: Installation v Operation Guide, included in the doc/ subdirectory of Sendmail source code nh ng b n phn ph i, discusses briefly how Sendmail resolves Internet addresses. Sendmail source code archives are listed at: http://www.sendmail.org/ Chris Karakas

H: Lm th no cho php v ch n console o : In text mode, press the left Alt-F1 to Alt-F12 to select the consoles tty1 to tty12; Right Alt-F1 gives tty13 v so on. To switch out of X you must press Ctrl-Alt-F1, etc; Alt-F5 or whatever will switch back. However, If you have a non-PC compatible system, please see the note below. If you want to use a VC for ordinary login, it must be listed in /etc/inittab, which controls which terminals v virtual consoles have login prompts. The X Window System needs t i least one free VC in order to start.
Ghi ch: The key sequence is actually Ctrl Meta FN. On PC compatible systems, the right v left Alt keys are really synonymous with the keysymbols Meta_L v Meta_R. If the binding is different, you can determine what keys produce Meta_L v Meta_R with xkeycaps or a similar application.

50

Nh ng cu h i th ng g p v Linux

H: Lm th no t mi gi : Change directory to [/usr/lib/zoneinfo/]. Get the time zone package if you dont have this directory. The source is available in ftp://metalab.unc.edu/pub/Linux/system/admin/time/. Then make a symbolic link named [localtime] pointing to one of the files in this directory (or a subdirectory), v one called [posixrules] pointing to [localtime]. For example:
$ ln -sf US/Mountain localtime $ ln -sf localtime posixrules

This change will take effect immediatelytry date. If the system uses Red Hat-style configuration files, the respective time zone info files are [/usr/share/zoneinfo] v [/etc/localtime]. The manual pages for tzset or tzselect describe setting the time zone. Some programs recognize the TZ environment variable, but this is not POSIX-correct. You should also make sure that your Linux kernel clock is set to the correct GMT time. Type date -u v check that the correct UTC time is displayed. (Tai sao my tnh lu sai gi ?)

H: C u hnh PPP quay s : This information is mainly for people who do not have a wrapper utility like kppp or pppconfig, or are not able to get those utilities to work correctly. If you need to manually configure PPP to dial in to your ISP, you will need the following information:

The port that your modem is connected to: /dev/ttyS0-/dev/ttyS3, which correspond to COM1-COM4 under MS-DOS. The phone number of your ISPs data connection. The user name v password that your ISP gave you. The IP addresses of the primary v possibly secondary Domain Name Service that you will use when dialing in to the ISP. This assumes that you will not be using a DNS that you installed on your system. When you have all of this information, make sure that the programs pppd v chat, t i the very minimum, are installed correctly. In most current nh ng b n phn ph i, they are installed in the [/usr/sbin/] directory, v you will need to be logged in as root to use them. In addition, the following programs are also useful for configuring network connections, determining network status, v diagnosing problems: [/sbin/ifconfig], [/sbin/route], [/bin/ping], [/usr/sbin/traceroute]. These are the basic steps that you need to follow to configure PPP. You must be logged in as root.

51

Nh ng cu h i th ng g p v Linux

Make sure that the serial port v modem are operating correctly. Using a program like minicomm or kermit, you should be able to send AT commands to the modem v receive the OK string in response from the modem. Enter the primary v possibly secondary Domain Name Server IP addresses in the [/etc/resolv.conf] file, using dotted quad notation, with the nameserver label. For example:
order hosts,bind nameserver 196.182.101.103 nameserver 196.182.101.104

The nameserver addresses in the example above are examples only. They dont correspond to actual network hosts. The first line, order hosts,bind, tells your networking software, when it resolves network domain addresses, to first look in the [/etc/hosts file], v then use the bind service; i.e., the DNS servers, which are specified on the lines that begin with nameserver.

Locate the chat script that PPP will use to dial the modem v connect to your ISP. In many systems, this is either in the [/etc/chatscripts] or [/etc/ppp] directory, v will be called [provider] or something similar. You can store a chat script anywhere, provided that you tell pppd to use it rather than the default script. Refer to the chat v pppd manual pages, v the information below, for details. Here is a sample chat script:
ABORT ABORT ABORT ABORT "" ogin word BUSY "NO CARRIER" VOICE "NO DIALTONE" ATDT<your_isps_phone_number> <your_user_name> <your_password>

This is a chat program for a simple, script based login. The chat program uses the pair of strings on each line as a match/response pair. When it starts, it sends the string ATDTyour_isps_phone_number, where you have substituted the actual phone number of course. It then waits for the string ogin (a substring of the word login) v sends your user name. It then waits for word (a substring of password) v sends your password. If your ISP uses a different login v password prompts, v any additional prompts, you will need to edit the script accordingly. Again, refer to the chat manual page for details. If your ISP uses PAP or CHAP authentication, you will need to edit the [pap-secrets] or [chap-secrets] files in [/etc/ppp] directory as well. Refer to the manual pages for these files, as well as the instruction in the files themselves.

The configuration of pppd, the program that maintains the actual connection, is usually contained in two or three separate files. The first is usually [/etc/ppp/options], which contains options that all of your systems PPP connections will use. (Yes, you can have more than one; as many as your computer has serial ports, generally.) Here is a sample [/etc/ppp/options] file:
#/etc/ppp/options asyncmap 0

52

Nh ng cu h i th ng g p v Linux
auth crtscts lock noipx # ---<End of File>---

The options may be given on one line or each on a separate line. Many options files are much longer, v come with a description of each option. Here, the options mean, in order, dont remap any characters between the PPP client v server; always use password, PAP, or CHAP authentication when making a connection; use the modems hardware handshake lines for flow control; lock the serial port when in use so no other programs can access it; v do not use the IPX network protocol.

For connection set-up on each individual serial port or PPP host, there will either be an [/etc/ppp/options.ttyS1], for example, options file for [/etc/ttyS1], or a file for your ISP in the [/etc/ppp/peers] directory. The default is often called [/etc/ppp/peers/provider]. Here is a sample of the default [provider] file:
noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/provider" defaultroute /dev/ttyS1 38400 persist

There might be an explanation of these v other options in the [/etc/ppp/peers/provider] file itself. You can also refer to the pppd manual page for details. Briefly, they mean: do not use PAP authentication for this connection; use the chat program v the [/etc/chatscripts/provider] script, which is described above, to dial the phone v log in; set the network default route to the PPP connection (so when your network software needs to resolve an network address that is not on your local machine(s), it will use the PPP connection to the Internet); use /dev/ttyS1 as the serial port for the connection; set the modem speed to 38400; v keep the pppd daemon running even if the connection fails.

That is all of the configuration you need. To actually start v stop PPP, there are often [/usr/bin/pon] v [/usr/bin/poff] scripts (in Debian), or something similar, v they are usually very simple, v only contain the command:
$ /usr/sbin/pppd call ${1:-provider}

This will start pppd v use the call option to call the server that you type on the command line, or the provider given in the [/etc/ppp/peers/provider] file if you do not specify a remote server. After making the call v logging in (about 30 seconds), you should be able to use the [/sbin/ifconfig] program to determine that the connection really did establish a PPP interface (the first will be [ppp0], the second will be [ppp1], etc., depending on how many simultaneous PPP connections you have. If something goes wrong, you can look t i the [/var/log/ppp.log] file to determine what happened. You can also view the log as the connection is being made, b i tailing it in another window; that is, viewing it as pppd logs the connections status information. To do this, use the command (again, as root):

53

Nh ng cu h i th ng g p v Linux
$ tail -f /var/log/ppp.log

On some systems the PPP output is directed to [/var/log/messages], in which case your system may not have a dedicated PPP log file. You should be also able to ping one of your ISPs domain names (v.d., mail.isp.com) v receive a response. These are the most basic steps for configuring a PPP connection. You will also need to take into account what other network connections may be present (for example, if theres an Ethernet connection that has already been assigned the default route), as well as various security measures t i your ISPs end. If youre having trouble making the dial-up connection, usually the best way to determine what may be going wrong is to use Seyon, minicomm, kermit, or some other program to dial v log in manually to the ISP, v determine just exactly what you have to do to log in, then duplicate that in the PPP scripts. Most Linux documentation also has additional instructions for configuring PPP connections. Refer to (FTP c a Linux u?) (Ti li u u?)

H: Phin b n Linux ang dng v tn my l g? : Type:


$ uname -a

H: T p tin [core] l g? : T p tin core c t o khi m t chng trnh k t thc b t th ng, v chng trnh c l i, ho c v vi ph m c ch b o v c a ph n c ng ho c c a h i u hnh. H i u hnh s bu c ch m d t chng trnh v t o t p tin [core], nh l p trnh vin c th hnh dung ra ci g sai. T p tin ch a m t chi ti t tr ng thi c a chng trnh khi b bu c ch m d t. N u b n mu n bi t t p tin core c a chng trnh no, hy dng l nh file nh sau:
$ file core

L nh ny s cho b n bi t tn chng trnh t o ra core. You may want to write the maintainer(s) of the program, telling them that their program dumped core. Eric Hanchrow

H: Lm th no b t ho c t t t o core? : Hy dng l nh ulimit trong bash, l nh limit trong tcsh, ho c l nh rlimit trong ksh. Xem trang man tng ng bi t chi ti t. This setting affects all programs run from the shell (directly or indirectly), not the whole system.

54

Nh ng cu h i th ng g p v Linux If you wish to enable or disable core dumping for all processes b i default, you can change the default setting in [linux/sched.h]. Refer to definition of INIT_TASK, v look also in [linux/resource.h]. PAM support optimizes the systems environment, including the amount of memory a user is allowed. In some nh ng b n phn ph i this parameter is configurable in the /etc/security/limits.conf file. For more information, refer to the Linux Administrators Security Guide. (Ti li u u?)

H: Lm th no nng c p/bin d ch l i h t nhn : See the Kernel HOWTO or the README files which come with the kernel release on ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/ v mirrors. (See FTP c a Linux u?) You may already have a version of the kernel source code installed on your system, but if it is part of a standard b n phn ph i it is likely to be somewhat out of date (this is not a problem if you only want a custom configured kernel, but it probably is if you need to upgrade.) With newer kernels you can (and should) make all of the following targets. Dont forget that you can specify multiple targets with one command.
$ make clean dep install modules modules_install

Also remember to update the module dependencies.


$ depmod -a

This command can be run automatically t i boot time. On Debian/GNU Linux systems, the command is part of the [/etc/init.d/modutils] script, v can be linked appropriately in the [/etc/rc]x[.d/] directories. For more information on depmod, see the manual page. Make sure you are using the most recent version of the modutils utilities, as well as all other supporting packages. Refer to the file [Documentation/Changes] in the kernel source tree for specifics, v be sure to consult the README file in the modutils package. Remember that to make the new kernel boot you must run lilo after copying the kernel into your root partition. The Makefile in some kernels have a special zlilo target for this; try:
$ make zlilo

On current systems, however, you can simply copy the [zImage] or [bzImage] file (in [arch/i386/boot/] to the [/boot/] directory on the root file system, or to a floppy using the dd command. Refer also to the question, How do I get LILO to boot the kernel image? Kernel version numbers with an odd minor version (ie, 1.1.x, 1.3.x) are the testing releases; stable production kernels have even minor versions (1.0.x, 1.2.x). If you want to try the testing kernels you should probably subscribe to the linux-kernel mailing list. (Mailing List u?) The Web site http://www.kernelnotes.org/ has lots of information v links to other sites that provide information about Linux kernel updates.

55

Nh ng cu h i th ng g p v Linux Also refer to the questions, T i sao card PCMCIA c a ti khng ho t ng sau khi nng c p h t nhn? v Lm th no LILO kh i ng kernel image?

H: Can Linux Use More than 3 Serial Ports b i Sharing Interrupts? : Yes, but you wont be able to use simultaneously two ordinary ports which share an interrupt (without some trickery). This is a limitation of the ISA Bus architecture. See the Serial HOWTO for information about possible solutions v workarounds for this problem.

H: C u hnh thi t l p m c nh cho Emacs : Create a file in your home directory named [.emacs] with the Emacs Lisp commands that you want to run every time Emacs starts up. You wont see the file in the directory listing. (The leading . tells ls not to display it, unless you use the -a command line switch with ls.) Any kind of Emacs Lisp statement will work in the [.emacs] file, including entire defuns. Emacs uses lisp variables v statements extensively, v many of the editing functions are written in Emacs Lisp. For example, to enable word wrapping whenever you edit a file that ends with [.txt], add the following statement. This is from the Emacs Texinfo help document ( F1-i, then m Emacs Return):
(add-hook text-mode-hook (lambda () (auto-fill-mode1)))

This adds a statement that calls a hook function whenever a text editing mode is entered for that buffer. The value of text-mode-hook, which is a variable, to auto-fill-mode, which is a function. If you want to turn off the menu bar t i the top of each Emacs frame, add this statement:
(menu-bar-mode -1)

And if you want to include an Emacs Lisp program that someone has written, like [msb.el] (an enhanced, pop-up buffer menu), make sure the lisp file is in a directory where Emacs can find it (usually it will be named Site-lisp), v add these statements in the [.emacs] file:
(require msb) (msb-mode 1)

Most tasks have several possible solutions in Emacs Lisp. Any task that can be programmed in Emacs Lisp is valid in the [.emacs] file. For more information, consult the Texinfo documentation. There is also a FAQ list for Emacs (refer to: What other FAQs are there for Linux? ).

56

Nh ng cu h i th ng g p v Linux H: Lm th no t o a c p c u (rescue disk) : Make a file system on it with bin, etc, lib v dev directorieseverything you need. Install a kernel on it v arrange to have LILO boot it from the floppy (see the LILO documentation, in [lilo.u.*.ps]). If you build the kernel (or tell LILO to tell the kernel) to have a RAM disk the same size as the floppy the RAM disk will be loaded t i boot time v mounted as root in place of the floppy. See the Bootdisk HOWTO (http://www.tldp.org/HOWTO/Bootdisk-HOWTO/index.html).

H: How To Remap a Keyboard to Anh, French, Etc. : For recent kernels, get [/pub/Linux/system/Keyboards/kbd-0.90.tar.gz] from ftp://metalab.unc.edu/. Make sure you get the appropriate version; you have to use the right keyboard mapping package for your kernel version. For older kernels you have to edit the top-level kernel [Makefile], in [/usr/src/linux/]. You may find more helpful information in The Linux Keyboard v Console HOWTO, b i Andries Brouwer, t i ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/.

H: Lm th no n NUM LOCK m c nh l b t : Use the setleds program, for example (in [/etc/rc.local] or one of the [/etc/rc.d/*] files):
for t in 1 2 3 4 5 6 7 8 do setleds +num < /dev/tty$t > /dev/null done

setleds is part of the kbd package ("How do I remap my keyboard to Anh, French, etc.? "). Alternatively, patch your kernel. You need to arrange for KBD_DEFLEDS to be defined to (1 << VC_NUMLOCK) when compiling [drivers/char/keyboard.c].

H: Lm th no t (ho c kh i ng l i) mu ban u c a terminal : The following shell script should work for VGA consoles:
for n in 1 2 4 5 6 7 8; do setterm -fore yellow -bold on -back blue -store > /dev/tty$n done

Substitute your favorite colors, v use [/dev/ttyS$n] for serial terminals. To make sure they are reset when people log out (if theyve been changed):

57

Nh ng cu h i th ng g p v Linux Replace the references to getty (or mingetty or uugetty or whatever) in [/etc/inittab] with references to /sbin/mygetty.
#!/bin/sh setterm -fore yellow -bold on -back blue -store > $1 exec /sbin/mingetty $@

H: Lm th no dng trn 128Mb Swap : Use several swap partitions or swap files. Linux kernels before version 2.2 supported up to 16 swap areas, each of up to 128Mb. Recent versions do not have this limitation. Very old kernels only supported swap partition sizes up to 16Mb. Linux on machines with 8KB paging, like Alpha v Sparc64, support a swap partition up to 512MB. The 128MB limitation comes from PAGE_SIZE*BITSPERBYTE on machines with 4KB paging, but is 512KB on machines with 8KB paging. The limit is due to the use of a single page allocation map. The file [mm/swapfile.c] has all of the gory details.

H: Lm th no trnh l i khi lin k t chng trnh v i cc hm ton h c : Older run-time libraries included the math library in the C run-time library. It was not necessary to specify the math library separately when compiling. If the compiler generates a message like this when linking a program that uses math functions:
/tmp/ccDUQM4J.o: In function main: /tmp/ccDUQM4J.o(.text+0x19): undefined reference to sqrt collect2: ld returned 1 exit status

You need use the -lm option with GCC to link with the math libraries:
# gcc -o program program.c -lm

Make sure also to use the statement #include <math.h> in the source file. Florian Schmidt

58

Nh ng cu h i th ng g p v Linux

Thng tin linh tinh v cc cu h i c tr l i


H: Lm th no lm cho chng trnh XYZ ch y c trong Linux? : Hy c ti li u, ho c m t cu n sch hay v Unix v man page (g man man). Ngoi ra cn c nhi u ti li u theo d ng GNU Info. Hy ch y Emacs v g F1-i, ho c g info info n u b n khng c ho c khng thch Emacs. Ch r ng nt libc c th khng m t ng phin b n libc m i nh t c a Linux, ho c GNU glibc2. Nhng d n GNU v LDP lun tm ng i tnh nguy n c p nh t ti li u ny. Cho d b n xem man page (ph n 2 v 3) hay info page th v n thng tin kh i u. Cng nh m i ph n m m t do, ti li u t t nh t chnh l m ngu n. Phin b n m i nh t c a man page, b ti li u GNU Info, v nh ng thng tin khc lin quan n l p trnh, c th c tm th y metalab.unc.edu/pub/Linux/docs/man-pages/.

H: ELF l g? glibc l g? : Hy xem ELF HOWTO c a Daniel Barlow. Ch r ng y khng ph i l ti li u [chuy n qua ELF], c vi t nng c p sang ELF th cng. Linux c hai d ng th c khc nhau cho t p tin th c thi, t p tin i t ng, v cc th vi n, l ELF. (D ng th c c g i l a.out.) Chng c nhi u u i m, bao g m kh nng h tr th vi n dng chung v lin k t ng t t hn. C t p tin a.out v ELF u c th cng t n t i trn h th ng. Tuy nhin, chng dng th vi n C khc nhau, c hai th vi n u ph i c ci t. N u b n mu n bi t h th ng c dng ELF hay khng, hy tm trong /lib m t t p tin tn l [libc.so.5]. N u c, c th b n c cc th vi n ELF. N u b n mu n bi t b n ci t c a b n c ph i l ELF hay khng, hy ch n m t chng trnh, gi s ls, v ch y l nh sau:
-chiark:~> file /bin/ls /bin/ls: Linux/i386 impure executable (OMAGIC) - stripped valour:~> file /bin/ls /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, stripped

C m t b n patch Linux 1.2.x c th dng trnh bin d ch ELF, v t o ra core dump ELF, t t i ftp://tsx-11.mit.edu/pub/packages/GCC/. B n khng c n patch ny ch y cc chng trnh d ng ELF. Linux 1.3.x v sau nay hon ton khng c n patch ny. Th vi n GNU glibc2 c n thi t cho nh ng phin b n c a cc th vi n ELF g n y cho php lin k t ng v n p ng. Thng tin nng c p t t i (Lm sao c p nh t th vi n m khng lm h ng h th ng?)

H: Lm th no xc nh gi ph n m m no c ci trn h th ng : V i cc gi ph n m m d ng RPM, hy dng l nh:


$ rpm -qa

59

Nh ng cu h i th ng g p v Linux

B n c th c n quy n root. B n c th lu k t qu vo t p tin vn b n tham kh o v sau b ng l nh:


$ rpm -qa >installed-packages

V i h th ng Debian, l nh tng ng l:
$ dpkg -l

H: T p tin .gz l g? cn t p tin.tgz? v t p tin .bz2? V... ? : T p tin.gz (v .z) c nn b ng chng trnh GNU gzip. B n c n dng gunzip (th t ra l m t symlink t i l nh gzip) gi i nn.
.taz, .tar.Z, v .tz l t p tin tar ( c t o ra b ng l nh tar) v c nn b ng compress. L nh

compress trong cc h *nix chu n l ph n m m proprietary, nhng cng c nh ng phin b n free nh ncompress.
.tgz (ho c .tpz) l t p tin tar nn b ng gzip. .bz2 l t p tin c nn b ng chng trnh bzip2 (m i xu t hi n g n y, v hi u qu hn). .lsm l cc m c trong B n Ph n m m Linux (Linux Software Map), theo d ng nhng o n text ng n. Chi ti t v d n LSM c t i ftp://metalab.unc.edu/pub/Linux/docs/. .deb l Gi Nh phn Debian (Debian Binary Package) - m t d ng th c gi ph n m m c dng b i

Debian GNU/Linux. N dng chng trnh dpkg v dpkg-deb (c trn h th ng Debian v t i ftp://ftp.debian.org/).
.rpm l gi ph n m m Red Hat, c dng trong Red Hat Linux v nh ng b n phn ph i tng t . .sit l compressed Macintosh archive c t o b ng StuffIt, m t chng trnh thng m i. Aladdin

Systems Inc., nh s n xu t c a StuffIt, c m t ti n ch gi i nn free gi i nn nh ng t p tin ny. B n c th t i n v t http://www.aladdinsys.com/expander/ . L nh file th ng cho b n bi t t p tin l lo i t p tin g. N u b n th y gzip bo l i khi b n gi i nn m t t p tin, c l b n t i t p tin trong ch ASCII, trong khi ph i t i trong ch BINARY. B n ph i t i l i trong ch binary.

H: VFS ngha l g? : H th ng t p tin o (Virtual File System - VFS). y l m t l p abstract phn cch ng i dng v cc h t p tin th c nh ext2, Minix v MS-DOS. Cng vi c c a n bao g m vi c xa vng m c khi pht hi n c thay i trn a.
VFS: Disk change detected on device 2/0

60

Nh ng cu h i th ng g p v Linux

H: BogoMip l g? : BogoMips l t ghp g m Gi (Bogus) v Mips. MIPS l (ty thu c vo ng i b n h i) S tri u ch th trong m t giy (Millions of Instructions per Second), ho c Ch th v ngha c a t c b x l (Meaningless Indication of Processor Speed). Con s hi n th khi kh i ng my l k t qu c a vi c kernel timing calibration, c dng cho nh ng vng l p ch c c ng n trong vi driver thi t b . Theo BogoMips mini-HOWTO, the rating for your machine will be:
Common BogoMips Ratings Processor BogoMips ---------------Intel 8088 clock * 0.004 Intel/AMD 386SX clock * 0.14 Intel/AMD 386DX clock * 0.18 Motorola 68030 clock * 0.25 Cyrix/IBM 486 clock * 0.34 Intel Pentium clock * 0.40 Intel 486 clock * 0.50 AMD 5x86 clock * 0.50 Mips R4000/R4400 clock * 0.50 Nexgen Nx586 clock * 0.75 PowerPC 601 clock * 0.84 Alpha 21064/21064A clock * 0.99 Alpha 21066/21066A clock * 0.99 Alpha 21164/21164A clock * 0.99 Intel Pentium Pro clock * 0.99 Cyrix 5x86/6x86 clock * 1.00 Intel Pentium II/III clock * 1.00 Intel Celeron clock * 1.00 Mips R4600 clock * 1.00 Alpha 21264 clock * 1.99 AMD K5/K6/K6-2/K6-III clock * 2.00 UltraSparc II clock * 2.00 Pentium MMX clock * 2.00 PowerPC 604/604e/750 clock * 2.00 Motorola 68060 clock * 2.01 Motorola 68040 Cha d li u. AMD Athlon Cha d li u. IBM S390 Cha d li u. Comparison ---------0.02 0.8 1 ( nh ngha) 1.4 1.8 2.2 2.8 2.8 2.8 4.2 4.7 5.5 5.5 5.5 5.5 5.6 5.6 5.6 5.6 11.1 11.1 11.1 11.1 11.1 11.2

N u s ny nh b t th ng, c l b n t nt Turbo ho c t t c CPU khng ng, ho c do v n cache (xem T i sao h th ng ch m i khi thm b nh ?) For values people have seen with other, rarer, chips, or to calculate your own BogoMips rating, please refer to the BogoMips Mini-HOWTO, on ftp://metalab.unc.edu/. (Ti li u u?)

61

Nh ng cu h i th ng g p v Linux Wim van Dorst

H: C nh ng t bo/t p ch Online/Free no cho Linux khng? : C m t s :

geek news. http://geeknews.cjb.net/ . Headlines for articles about Linux, like the comp.os.linux.announce v Techweb postings, v general interest, like Associated Press stories. Linux Gazette. http://www.linuxgazette.com/ . This is the longest-running of the on-line periodicals, v the only one that publishes source code. LinuxToday. http://www.linuxtoday.com. Tin t c v cc ki n lin quan n Linux, c p nh t hng ngy. Linux Weekly News. http://lwn.net. Tin t c v Linux, c p nh t hng tu n. Slashdot. http://www.slashdot.org. Tin t c v free software v vn ha. Freshmeat. http://www.freshmeat.net/ . Thng bo ph n m m m i v ph n m m c c p nh t cho Linux v cc h i u hnh khc.

Vui lng b sung vo danh sch ny b ng cch g i n pclouds@users.sourceforge.net (mailto:pclouds@users.sourceforge.net).

H: C bao nhiu ng i s d ng Linux? : Linux c s d ng t do, v khng m t ai c n ph i ng k c th s d ng Linux, v th nn r t kh bi t c c bao nhiu ng i s d ng Linux. Vi ho t ng t n t i ch nh vo vi c bn v h tr Linux. Cc nhm tin Linux l m t trong nh ng nhm ho t ng tch c c nh t trn Usenet. R t kh c con s chnh xc, nhng s l ng trong kho ng vi tri u t i hng ch c tri u. Tuy nhin, m i ng i c th ng k nh l ng i s d ng Linux t i d n Linux Counter, t n t i t nm 1993. n thng 10 nm 2002, d n ny cho bi t c 135263 ng i dng Linux v d on s ng i dng Linux trn ton th gi i vo kho ng t 2,7 tri u n 67,6 tri u ng i. Hy xem chi ti t t i http://counter.li.org/ v i n vo m u ng k. N u b n khng dng Web, hy g i email n counter@counter.li.org (mailto:counter@counter.li.org) v i dng Ch l, I use Linux at home (Ti dng Linux trong nh), ho c I use Linux at work. (Ti dng Linux trong c quan). Con s th ng k c g i hng thng ln comp.os.linux.misc, v lun c s n trn Web. Harald Tveit Alvestrand

: Nm 1999, T p on D li u Qu c t (International Data Corporation) pht hnh b n d bo thng m i u tin cho Linux sales. B n bo co xc nh Linux vendor sales trong nm 1996, 1997, v 1998, v d bo t i nm 2003. c b n bo co, hy lin h IDC t ictoffel@idc.com (mailto:ctoffel@idc.com). Trang Web c a h l http://www.itresearch.com/ .

62

Nh ng cu h i th ng g p v Linux H: B n phn ph i no l t t nh t : Ci t t nh t lun ty thu c vo quan i m c a t ng ng i. Chuy n tho lu n ci t t nh t nh v y th ng x y ra trn Usenet. H u h t l nh ng cu c tranh lu n d d i. Answering is generally a waste of time. B n hy th t nh gi ki m tra trn my b n xem. Cch t t hn di n t cu h i l: T c th tm .... u?

H: Pht m ch Linux nh th no? : Cu h i ny th ng t o ra nh ng cu c tranh lu n d d i. N u b n mu n bi t chnh Linus pht m Linux nh th no, hy t i t p tin [english.au] ho c [swedish.au] t i ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/SillySounds/. N u b n c sound card ho c driver cho loa PC, b n c th nghe b ng cch g
$ cat english.au >/dev/audio

S khc nhau khng ph i b i cch pht m Linux m l cch Linus ni, hello. V i nh ng ng i khng c phng ti n nghe: Linus pht m Linux g n gi ng v i Leenus, trong ee c pht m nh feet, nhng ng n hn, v u th gi ng nh eu trong ti n Php nhng ng n hn (vd peur - pht m nh u trong put cng t m c).

Cc thng bo l i th ng g p
H: Modprobe khng th nh v mun, XXX, v nhng thng bo tng t : Nh ng lo i thng bo ny th ng x y ra vo th i i m kh i ng ho c t t my. N u modprobe, insmod, ho c rmmod than phi n v vi c khng th tm th y mun, hy thm dng sau vo t p tin [/etc/modules.conf] ho c [/etc/modutils/aliases] (t o m i n u cha c).
$ alias <module-name> off

V dng tn c a mun xu t hi n trong thng bo l i.

H: Unknown Terminal Type linux v nh ng th tng t : Trong cc h t nhn c, terminal console m c nh c i t console sang linux. B n ph i s a [/etc/termcap] thay i line reading:
console|con80x25:

63

Nh ng cu h i th ng g p v Linux thnh
linux|console|con80x25:

(c th c dumb

y - n u c th hy xa n.)

b so n th o lm vi c, b n c n g:
$ TERM=console

(v i bash v ksh), ho c
$ setenv TERM console

v i csh ho c tcsh. Vi chng trnh dng [/usr/lib/terminfo] thay v [/etc/termcap]. V i nh ng chng trnh ny, b n nn nng c p gi terminfo, m t thnh ph n c a ncurses. Tng t i v i X terminal. N u b n phn ph i c a b n t TERM m t gi tr l nh xterm-24-color, b n c th n gi n ph c h i gi tr chung b ng l nh:
$ TERM="xterm"; export TERM

H: INET: Warning: old style ioctl... called! : B n ang c dng cc ti n ch c u hnh m ng c. Nhng phin b n m i c t i ftp.linux.org.uk/pub/linux/Networking/PROGRAMS/NetTools/ (ch c m ngu n thi). Note that they cannot be used just like the old-style programs. See the NET-2 HOWTO for instructions on how to set up the old-style networking programs correctly. Even better, see the NET-3 HOWTO v upgrade your networking software.

H: ld: unrecognized option -m486 : B n ang dng phin b n ld c. Hy ci gi binutils m i hn, ch a b n nng c p cho ld. Hy tm [binutils-2.6.0.2.bin.tar.gz] trn tsx-11.mit.edu t i [/pub/linux/packages/GCC/] . H: GCC ni Internal compiler error. : If the fault is repeatable (i.e., it always happens t i the same place in the same file - even after rebooting v trying again, using a stable kernel) you have discovered a bug in GCC. See the GCC Info documentation (type F1-i in Emacs, v select GCC from the menu) for details on how to report the error. Make sure you have the latest version, though.

64

Nh ng cu h i th ng g p v Linux Note that this is probably not a Linux-specific problem. Unless you are compiling a program many other Linux users also compile, you should not post your bug report to any of the comp.os.linux groups. If the problem is not repeatable, you may be experiencing memory corruption. Refer to the answer: (Make ni Error 139.)

H: Make ni Error 139. : Your compiler (GCC) dumped core. You probably have a corrupted, buggy, or old version of GCC get the latest release or EGCS. Alternatively, you may be running out of swap space. Refer to: (T i sao my ch y r t ch m v i GCC / X / ...?) If this doesnt fix the problem, you are probably having problems with memory or disk corruption. Check that the clock rate, wait states, v refresh timing for your SIMMS v cache are correct (hardware manuals are sometimes wrong, too). If so, you may have some marginal SIMMS, or a faulty motherboard or hard disk or controller. Linux is a very good memory tester - much better than MS-DOS based memory test programs. Reportedly, some clone x87 math coprocessors can cause problems. Try compiling a kernel with math emulation (Lm th no nng c p/bin d ch l i h t nhn) no387 kernel command line flag on the LILO prompt to force the kernel to use math emulation, or it may be able to work v still use the 387, with the math emulation compiled in but mainly unused. More information about this problem is available on the Web t i http://www.bitwizard.nl/sig11/ .

H: Shell-Init: Permission Denied when I Log In : Your root directory v all the directories up to your home directory must be readable v executable b i everybody. See the manual page for chmod or a book on Unix for how to fix the problem. H: No Utmp Entry. You Must Exec ... when Logging In : Your [/var/run/utmp] is screwed up. You should have
/var/run/utmp

in your [/etc/rc.local] or [/etc/rc.d/*]. See, (N u ti qu y h th ng v khng th ng nh p c th lm th no kh c ph c?) Note that the [utmp] may also be found in [/var/adm/] or [/etc/] on some older systems.

H: Warning--bdflush Not Running : Modern kernels use a better strategy for writing cached disk blocks. In addition to the kernel changes, this involves replacing the old update program which used to write everything every 30 seconds with a more subtle daemon (actually a pair), known as bdflush. Get [bdflush-]n.n[.tar.gz] from the same place as the kernel source code (Lm th no nng c p/bin d ch l i h t nhn) v compile v install it. bdflush should be started before the usual boot-time file system checks. It will work fine with older kernels as well, so theres no need to keep the old update around.

65

Nh ng cu h i th ng g p v Linux H: Warning: obsolete routing request made : This is nothing to worry about. The message means that your version route is a little out of date, compared to the kernel. You can make the message go away b i getting a new version of route from the same place as the kernel source code. (Lm th no nng c p/bin d ch l i h t nhn) H: EXT2-fs: warning: mounting unchecked file system : You need to run e2fsck (or fsck -t ext2 if you have the fsck front end program) with the -a option to get it to clear the dirty flag, v then cleanly unmount the partition during each shutdown. The easiest way to do this is to get the latest fsck, umount, v shutdown commands, available in Rik Faiths [util-linux] package (FTP c a Linux u?) You have to make sure that your [/etc/rc*/] scripts use them correctly. NB: Dont try to check a file system thats mounted read/write. This includes the root partition if you dont see
VFS: mounted root ... read-only

at boot time. You must arrange to mount the root file system read/only to start with, check it if necessary, v then remount it read/write. Almost all nh ng b n phn ph i do this. If yours doesnt, read the documentation that comes with [util-linux] to find out how to do this. Note that you need to specify the -n option to mount so it wont try to update [/etc/mtab], since the root file system is still read-only, v this will otherwise cause it to fail.

H: EXT2-fs warning: maximal count reached : This message is issued b i the kernel when it mounts a file system thats marked as clean, but whose "number of mounts since check" counter has reached the predefined value. The solution is to get the latest version of the ext2fs utilities ([e2fsprogs-0.5b.tar.gz] t i the time of writing) from the usual sites. (FTP c a Linux u?) The maximal number of mounts value can be examined v changed using the tune2fs program from this package.

H: EXT2-fs warning: checktime reached(C nh bo EXT2-fs: n lc ph i ki m tra) : Kernels from 1.0 onwards support checking a file system based on the elapsed time since the last check as well as b i the number of mounts. Get the latest version of the ext2fs utilities. (EXT2-fs warning: maximal count reached) H: df ku r ng, Cannot read table of mounted file systems(Khng th c b ng h th ng t p tin g n k t). : There is probably something wrong with your [/etc/mtab] or [/etc/fstab] files. If you have a reasonably new version of mount, [/etc/mtab] should be emptied or deleted t i boot time (in [/etc/rc.local] or [/etc/rc.d/*]), using something like
$ rm -f /etc/mtab*

66

Nh ng cu h i th ng g p v Linux Some old Linux nh ng b n phn ph i have an entry for the root partition in [/etc/mtab] made in [/etc/rc*] b i using rdev. That is incorrectthe newer versions of mount do this automatically. Some old nh ng b n phn ph i also have a line in [/etc/fstab] that looks like:
/dev/sdb1 /root ext2 defaults

The entry for /root should read simply /.

H: fdisk ku r ng, Partition X has different physical/logical... : A If the partition number (X, above) is 1, this is the same problem as in fdisk: Partition 1 does not start on cylinder boundary. If the partition begins or ends on a cylinder numbered greater than 1024, this is because the standard DOS disk geometry information format in the partition table cant cope with cylinder numbers with more than 10 bits. You should see (Lm th no Linux lm vi c v i a c a ti?)

H: fdisk: Partition 1 does not start on cylinder boundary(Partition 1 khng


b t u t i bin cylinder)

: The version of fdisk that comes with many Linux systems creates partitions that fail its own validity checking. Unfortunately, if youve already installed your system, theres not much you can do about this, apart from copying the data off the partition, deleting v remaking it, v copying the data back. You can avoid the problem b i getting the latest version of fdisk, from Rik Faiths util-linux package (available on all the usual FTP sites). Alternatively, if you are creating a new partition 1 that starts in the first cylinder, you can do the following to get a partition that fdisk likes.

Create partition 1 in the normal way. A p listing will produce the mismatch complaint. Type u to set sector mode v do p again. Copy down the number from the End column. Delete partition 1. While still in sector mode, re-create partition 1. Set the first sector to match the number of sectors per track. This is the sector number in the first line of the p output. Set the last sector to the value you wrote down in the step above. Type u to reset cylinder mode v continue with other partitions. Ignore the message about unallocated sectors. They refer to the sectors on the first track apart from the Master Boot Record, v they are not used if you start the first partition in track 2.

H: fdisk ni Partition n c s sector l : The PC disk partitioning scheme works in 512-byte sectors, but Linux uses 1K blocks. If you have a partition with an odd number of sectors, the last sector is wasted. Ignore the message.

67

Nh ng cu h i th ng g p v Linux H: Ti n ch Mtools ni r ng khng th kh i ng a X

: This means that mtools is having trouble accessing the drive. This can be due to several things. Often this is due to the permissions on floppy drive devices ([/dev/fd0*] v [/dev/fd1*]) being incorrect. The user running mtools must have the appropriate access. See the manual page for chmod for details. Most versions of mtools distributed with Linux systems (not the standard GNU version) use the contents of a file [/etc/mtools] to determine which devices v densities to use, in place of having this information compiled into the binary. Mistakes in this file often cause problems. There is often no documentation about this. For the easiest way to access your MS-DOS files (especially those on a hard disk partition) see How do I access files on my DOS partition or floppy? Noteyou should never use mtools to access files on an msdosfs mounted partition or disk!

H: At the Start of Booting: Memory tight : This means that you have an extra-large kernel, which means that Linux has to do some special memory-management magic to be able to boot itself from the BIOS. It isnt related to the amount of physical memory in your machine. Ignore the message, or compile a kernel containing only the drivers v features you need. (Lm th no nng c p/bin d ch l i h t nhn) H: The System Log ku r ng, end_request: I/O error, .... : This error message, v messages like it, almost always indicate a hardware error with a hard drive. This commonly indicates a hard drive defect. The only way to avoid further data loss is to completely shut own the system. You must also make sure that whatever data is on the drive is backed up, v restore it to a non-defective hard drive. This error message may also indicate a bad connection to the drive, especially with home brew systems. If you install an IDE drive, always use new ribbon cables. Its probably is a good idea with SCSI drives, too. In one instance, this error also seemed to coincide with a bad ground between the system board v the chassis. Be sure that all electrical connections are clean v tight before placing the blame on the hard drive itself.

H: B n khng t n t i. i i. : This is not a viral infection. It comes from programs like write, talk, v wall, if your invoking UID doesnt correspond to a valid user (probably due to [/etc/passwd] being corrupted), or if the session (pseudoterminal, specifically) youre using isnt properly registered in the [utmp] file (probably because you invoked it in a funny way). H: Operation not permitted (thao tc khng c php). : One or more of the files or directorys attribute bits are set incorrectly. If the I bit is set, for example, you wont be able to change file permissions with chmod. The solution is to use lsattr to display file v directory attributes, v chattr to set v unset them. The programs documentation is contained in their manual pages.

68

Nh ng cu h i th ng g p v Linux Paul Campbell

H: programname: error in loading shared libraries: lib xxx..so. x: cannot open shared object file: No such file or directory. : A message like this, when the program that youre trying to run uses shared libraries, usually means one of two things: the program was either compiled on a machine that had a different set of libraries or library paths than yours; or youve upgraded your libraries but not the program. Executable programs that are linked with dynamic libraries, expect the full pathname of each of the library files it requires. So do the shared libraries, if they rely on other libraries. This is so the shared object dependencies remain as unambiguous as possible, v also as a security measure. Short of recompiling the executable file for the libraries on the systemprobably the most desirable alternative in the long run - you can try to determine which libraries the executable file needs with the command: ldd programname. The output will be a list of the shared libraries on the system that the program needs to run, as well as the missing libraries. You can then add the library packages, or if the libraries already exist in a different directory, you can create a symbolic link so the program can find it. For example, if the program requires /usr/lib/libncurses.so.2, v your machine has /lib/libncurses.so.2, you can create a link where the program expects to find the library; v.d.:
# cd /usr/lib && ln -s /lib/libncurses.so.2 .

You should note, however, that creating library links like these should be considered a security risk, v the additional links you create will not be compatible with future upgrades. Its simply a quick fix for backward compatibility. Also, it may take some guesswork to determine in exactly which of the system library directories the program expects to find a shared library file, because ldd will not list the paths of libraries it cant find. A program most likely will tell the run-time linker, /lib/ld.so, to look for shared libraries in /lib, [/usr/lib], [/usr/local/lib], or [/usr/X11R6/lib], if its an X client. But that doesnt mean that libraries cant be installed elsewhere. It helps to have some idea of the original library configuration before proceeding. Also be sure to run ldconfig after creating the symbolic link, so that ld.so has an updated view of the systems libraries. You should also make certain that all of the library directories are listed in [/etc/ld.so.conf], v perhaps in the LD_LIBRARY_PATH environment variable.

H: init: Id "x" respawning too fast: disabled for 5 minutes . : However, Id can also indicate the absence or misconfiguration of another program, like mingetty, if init tries to respawn itself more than 10 times in 2 minutes. Id x is the number in the leftmost column of the [/etc/inittab] file:
# Run gettys in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3

69

Nh ng cu h i th ng g p v Linux
4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6

Commenting the offending line out v then fixing the errant program v testing on the command line will allow you to see any error messages that go to standard error output (console) if the errors are not going to the system log file. Uncomment the line v restart init with kill -SIGHUP 1 or telinit q to cause init to reinitialize v reread the [/etc/inittab] file. Some systems, however, rewrite [/etc/inittab] when booting. In that case, refer to the init man page, and/or the settings in [/etc/sysconfig/init]. Refer to the init v [/etc/inittab] man pages for detailed information. Carl King

H: FTP ku r ng: 421 service not available, remote server has closed connection. : If an FTP server wont allow logins, it is probably configured correctly, but the problem is probably with authorizing users t i login. FTP servers in current nh ng b n phn ph i often authorize users with the Pluggable Authentication Modules library, in which case there should be an authorization file [/etc/pam.d/ftp]. A generic authorization file looks like this. (The line break on the first auth line is for readability. The entry is actually a single, long line).
#%PAM-1.0 auth auth auth account session

required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed required /lib/security/pam_pwdb.so shadow nullok required /lib/security/pam_shells.so required /lib/security/pam_pwdb.so required /lib/security/pam_pwdb.so

Also, make sure the [/etc/ftpusers] file, or whatever users file is named in the first auth line, is configured correctly. Btw, the sample [ftp] file above is actually the [ftpd/ftp.pam.sample] file from the [ftpd-BSD-0.3.1.tar.gz] package. Many thanks to David A. Madore for this much needed port.

70

Nh ng cu h i th ng g p v Linux

X Window System
H: Linux c h tr X khng? : Yes. Linux uses XFree86 (the current version is 4.0, which is based on X11R6). You need to have a video card which is supported b i XFree86. See the XFree86 HOWTO for more details. Most Linux nh ng b n phn ph i nowadays come with an X installation. However, you can install or upgrade your own, from ftp://metalab.unc.edu/pub/Linux/X11/Xfree86-* v its mirror sites, or from http://www.xfree86.org/ .

H: Lm th no X Window System ho t ng : The answers to this question can, v do, fill entire books. If the installation program wasnt able to configure the X server correctly, Linux will most likely try to start the X display, fail, v drop back into text-only terminal mode. First v foremost, make certain that you have provided, as closely as possible, the correct information to the installation program of your video hardware: the video card v monitor. Some installation programs can correctly guess a least common denominator screen configuration, like a 640-by-480 VESA-standard display, but there are many possible video hardware configurations that may not be able to display this standard. The X Window System configuration file is called (usually) [/etc/XF86Config], [/etc/X11/XF86Config], or [/usr/X11R6/lib/X11/XF86Config]. If you need to manually configure the X server, there are several possible methods:

Try to use the XF86Setup program, which can help identify the correct X server v monitor timings for the video hardware. Make sure that the X server has the correct options. If you log in as the superuser, you should be able to use X --probeonly to get a listing of the video card chipset, memory, v any special graphics features. Also, refer to the manual page for the X server. (v.d.; man X), v try running the X server v redirecting the standard error output to a file so you can determine, after you can view text on the screen again, what error messages the server is generating; v.d., X 2>x.error. With that information, you should be able to safely refer to one of the references provided b i the Linux Documentation Project. ("Where can I get the HOWTOs v other documentation? ") There are several HOWTOs on the subject, including a HOWTO to calculate video timings manually if necessary. Also, the Installation v Getting Started guide has a chapter with a step-by-step guide to writing a [XF86Config] file.

Also, make sure that the problem really is an incorrect [XF86Config] file, not something else like the window manager failing to start. If the X server is working correctly, you should be able to move the mouse cursor on the screen, v pressing Ctrl-Alt-Backspace will shut down the X server v return to the shell prompt in one of the virtual terminals.

71

Nh ng cu h i th ng g p v Linux H: Tm t p tin [XF86Config] c s n u

: If you cant seem to get X working using the guidelines above, refer to the XFree86 HOWTO, recent versions of Installation v Getting Started, v the instructions for the [XF86Setup] program. The contents of the [XF86Config] file depend on the your exact combination of video card v monitor. It can either be configured b i hand, or using the XF86Setup utility. Read the instructions that came with XFree86, in [/usr/X11R6/lib/X11/etc]. The file you probably need to look t i most is [README.Config]. You should not use the sample [XF86Config.eg] file which is included with newer versions of XFree86 verbatim, because the wrong video clock settings can damage your monitor. Please dont post to comp.os.linux.x asking for an [XF86Config], v please dont answer such requests. If you have a laptop, look t i the Linux Laptop Web page (Lm th no bi t Notebook c ang ch y Linux hay khng?) Many of the installation notes also have the [XF86Config] file for the display. If you have a desktop machine, there are a few sample [XF86Config] files t i ftp://metalab.unc.edu/. Refer also to the XFree86 FAQ http://www.xfree.org/FAQ/ v the monitor timings list http://www.xfree.org/#resources/ , v in the [/usr/X11R6/lib/X11/] directory of your X b n phn ph i.

H: Mi tr ng h a no ch y trn Linux? : Linux with XFree86 supports the KDE, GNOME, v commercial CDE desktop environments, v extended window managers like WindowMaker. Each uses a different set of libraries v provides varying degrees of MS Windows-like look v feel. Information on KDE is available from http://www.kde.org/ . The KDE environment uses the Qt graphics libraries, available from http://www.qt.org/ . The desktop uses its own window manager, kwm, v provides a MS Windows-like look v feel. The GNOME home page is http://www.gnome.org/ . The environment uses the free GTK libraries, available from http://www.gtk.org/ , v window managers like Enlightenment, http://www.enlightenment.org/ , SawFish, http://www.sawfish.org/ . Theres also a Web page for GNOME installation v upgrade that functions much like Debians apt-get utility with a friendly GUI front end. Its at: http://www.helixcode.com/desktop/ . The commercial CDE environment uses the Motif libraries v a variation of the Motif mwm window manager, dtwm, v provides a suite of desktop v session-management utilities. Several vendors have made the source code of Motif available v provided binary packages for Linux nh ng b n phn ph i. As a starting point, download v installation information is available t i http://www.opengroup.org/openmotif/ . A free version of Motif, called LessTiF, is available from http://www.lesstif.org/ . WindowMaker, http://www.windowmaker.org/ is a window manager that has many desktop environment-like features. It provides support for GNUstep, http://www.gnustep.org/ , a clone of the commercial NeXTStep environment.

72

Nh ng cu h i th ng g p v Linux H: xterm Logins Show Up Strangely in who, finger : The xterm that comes with XFree86 2.1 v earlier doesnt correctly understand the format that Linux uses for the /var/adm/utmp file, where the system records who is logged in. It therefore doesnt set all the information correctly. The xterms in XFree86 3.1 v later versions fix this problem.

H: Lm th no kh i ng X Client trn Display khc : To start a X client on another system that has a running X server, use the following commands:

Use xhost on the server system to allow the client system use the display. If the servers IP address is 192.168.20.1, enter the command:
$ xhost + 192.168.20.1

On the client system, open a telnet connection to the server system. In the telnet session, start a xterm in the background with the -display v -e options. For example, if the IP address of the machine running the server is 192.168.20.1 v the client program name is named clientapp, use the following command:
$ xterm -display 192.168.20.1 -e clientapp &

Pierre Dal Farra

Tm tr gip su hn nh th no
H: N u ti li u ny v n cha tr l i cu h i c a b n.... : Vui lng c t t c cu tr l i tr c khi h i. ng l hi di, nhng b n s bi n mnh thnh m t th ng ng c tr tr c 50.000 ng i v ph ph m hng trm gi c a h . B n khng ngh nn b th i gian c v lm theo nhng ch d n ny? N u b n ngh c m t cu tr l i cha hon ch nh ho c khng chnh xc, vui lng g i th n pclouds@users.sourceforge.net (mailto:pclouds@users.sourceforge.net). Hy c nh ng cu n sch Linux Documentation Project thch h p. Hy tham kh o: (Ti li u N u b n cn l l m v i Unix ho c Linux, hy c FAQ c a comp.unix.questions, news.announces.newusers, v b t k nhm no trong cc nhm comp.unix.* c lin quan. Linux has so much in common with commercial unices, that almost everything you read there will apply to Linux. The FAQs, like all FAQs, be found on ftp://rtfm.mit.edu/pub/usenet/ (the mail-server@rtfm.mit.edu (mailto:mail-server@rtfm.mit.edu) can send you these files, if you dont have FTP access). There are mirrors of rtfms FAQ archives on various sites. Check the Introduction to *.answers posting, or look in news-answers/introduction in the directory above. u?)

73

Nh ng cu h i th ng g p v Linux Check the relevant HOWTO for the subject in question, if there is one, or an appropriate old style sub-FAQ document. Check the FTP sites. Try experimenting thats the best way to get to know Unix v Linux. Read the documentation. Check the manual pages (type man man if you dont know about manual pages. Also try man -k subject v apropos subject. They often list useful v relevant, but not very obvious, manual pages. Check the Info documentation (type F1-i, i.e. the F1 function key followed b i i in Emacs). This isnt just for Emacs. For example, the GCC documentation lives here as well. There will also often be a README file with a package that gives installation and/or usage instructions. Make sure you dont have a corrupted or out-of-date copy of the program in question. If possible, download it again v re-install ityou probably made a mistake the first time. Read comp.os.linux.announce. It often contains very important information for all Linux users. General X Window System questions belong in comp.windows.x.i386unix, not in comp.os.linux.x. But read the group first (including the FAQ), before you post. Only if you have done all of these things v are still stuck, should you post to the appropriate comp.os.linux.* newsgroup. Make sure you read the next question first. "( What to put in a request for help. )"

H: C n ghi g khi yu c u gip : Vui lng c nh ng l i khuyn sau m t cch c n th n bi t cch g i th gip . T o m t thng i p hon ch nh s tng m t cch ng k kh nng m t chuyn gia ho c m t ng i dng khc c thng tin v ng l c tr l i b n. This advice applies both to postings asking for advice v to personal E-mail sent to experts v fellow users. Hy m b o b n a ra thng tin y , chi ti t v v n , bao g m:

B n g p v n v i chng trnh no. Bao g m s phin b n n u bi t v ni l y n. Nhi u l nh chu n s cho b n bi t s phin b n n u b n dng ty ch n --version v i chng trnh . B n phn ph i b n ang dng (Red Hat, Slackware, Debian, ho c b t k ci g khc) v phin b n c a b n phn ph i . Ghi chnh xc v y cc thng i p l i. M t chnh xc nh ng g b n lm v nh ng g quan st th y. A transcript of an example session is a good way to show this. N i dung cc t p tin c u hnh c dng b i chng trnh c h i v cc chng trnh lin quan. What version of the kernel v shared libraries you have installed. The kernel version can be found b i typing uname -a, v the shared library version b i typing ls -l /lib/libc*. Chi ti t v ph n c ng b n dng, n u th y c n thi t.

You are in little danger of making your posting too long unless you include large chunks of source code or uuencoded files, so err on the side of giving too much information.

74

Nh ng cu h i th ng g p v Linux Ghi dng Ch r rng, chi ti t. ng ghi ki u n khng ch y, Linux, gip v i, ho c cu h i n u b n bi t n l g. Save the space for the name of the program, a fragment of an error message, or summary of the unusual behavior. Put a summary paragraph t i the top of your posting. At the bottom of your posting, ask for responses b i email v say youll post a summary. Back this up b i using Followup-To: poster. Then, actually post the summary in a few days or a week or so. Dont just concatenate the replies you gotsummarize. Putting the word SUMMARY in your summarys Subject line is also a good idea. Consider submitting the summary to comp.os.linux.announce. Make sure your posting doesnt have an inappropriate References: header line. This marks your article as part of the thread of the article referred to, which will often cause it to be junked b i readers, along with the rest of a boring thread. You might like to say in your posting that youve read this FAQ v the appropriate HOWTOsthis may make people less likely to skip your posting. Remember that you should not post E-mail sent to you personally without the senders permission.

H: Lm th no email cho ai v l i c a b n : Try to find the author or developer of whatever program or component is causing you difficulty. If you have a contact point for your Linux b n phn ph i, you should use it. Please put everything in your E-mail message that you would put in a posting asking for help. Finally, remember that, despite the fact that most of the Linux community are very helpful v responsive to E-mailed questions, youre likely asking for help from unpaid volunteers, so you have no right to expect an answer.

Ghi ch
1. stable 2. development 3. Public Domain 4. package 5. GNU parted, a partition editor, is stable enough for non-guru, mere-mortal use with relative confidence 6. high density 7. mount 8. h th ng t p tin m ng 9. khng tm th y k hi u c a vng nh 10. t ng c ng - s d ng - cn tr ng : o

75

Nh ng cu h i th ng g p v Linux 11. bootable devices 12. dynamic library loader 13. shared library 14. symbolic link 15. alias

76

You might also like