You are on page 1of 77

Nhng cu hi thng gp v Linux

Nguyn Thi Ngc Duy


pclouds@users.sourceforge.net

L Trng Vn
zow82@yahoo.co.uk

y l danh sch Cc cu hi thng gp (Frequently Asked Questions) ca Linux, mt h iu hnh t o chy trn nhiu h thng my tnh khc nhau. Ti liu ny c tng hp t Linux-FAQ (http://www.tldp.org/FAQ/Linux-FAQ/index.html). Ti liu ny trong ang trong giai on dch phc tho. Rt mong nhn cc kin ng gp, ph bnh.. v ti liu ny. Mi kin xin gi n <pclouds@users.sourceforge.net>.

Mc lc
Gii thiu v thng tin chung ...................................................................................................................1 Ngun v ti nguyn mng .......................................................................................................................9 Tnh tng thch vi cc h iu hnh khc .........................................................................................19 H thng tp tin, a, v a ................................................................................................................25 Porting, bin dch v ly chng trnh ..................................................................................................32 Gii php cho cc vn linh tinh thng thng ................................................................................37 Lm iu ny nh th no hoc tm hiu ci kia ra sao......................................................................45 Thng tin linh tinh v cc cu hi c tr li ....................................................................................58 Cc thng bo li thng gp.................................................................................................................63 X Window System....................................................................................................................................70 Tm tr gip su hn nh th no .........................................................................................................73

Nhng cu hi thng gp v Linux

Gii thiu v thng tin chung


H: Linux l g? : Linux l mt h iu hnh tng t nh h iu hnh UNIX ca AT&T Bell Labs. Linux c mi c tnh ca mt h iu hnh hin i: h thng a nhim, a tuyn on, b nh o, th vin ng, chng trnh dng chung, ti theo nhu cu, qun l b nh, cc mun driver thit b, video frame buffering, v mng TCP/IP. Tuy nhin, hu ht mi ngi xem h iu hnh, cc phn mm h thng v phn mm ng dng l Linux, v quy c ny cng c dng trong FAQ ny. Linux Torvalds v nhm lp trnh vin tnh nguyn t khp ni trn Internet vit (v vn tip tc vit) Linux t con s khng. Ht nhn Linux (Linux kernel) c phn phi theo nhng iu khon ca Giy php GNU GPL (GNU General Public License). (Giy php m ngun m Linux l g?) Cc phin bn ca ht nhn Linux t ti http://ps.cus.umist.ac.uk/~rhw/kernel.versions.html. Hy xem thm cc bi vit Wikipedia ti 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 vit cho my PC dng b vi x l ca Intel, dng cc tnh nng phn cng ca b vi x l 80386 v nhng b vi x l th h sau ca 80386. H my 80386 bao gm 80486, v tt c cc chip Pentium. Tuy nhin, ngy nay Linux c th c dng trn nhiu h my khc nhau (Chuyn qua cc h my khc) C nhiu bn phn phi Linux (Linux distribution) c bit dnh ring cho cc my cm tay v my di ng. c t API b cng c pht trin cho B vi x l Crusoe Smart c pht trin bi Transmeta Corporation t ti http://www.transmeta.com. Thng tin v bn phn ph6i Linux cho Compaq iPAQ t ti http://www.handhelds.org. Ngoi ra hy tham kho Linux INFO-SHEET (http://www.tldp.org/HOWTO/INFO-SHEET.html) bit thm chi tit cng nh cc cu tr li cho Ti liu u?, Phn cng no c h tr?, v Chuyn qua cc h my khc, bn di.

H: Cc phin bn Linux hot ng nh th no? : Ti thi im ny, c vi phin bn Linux n nh1, v mt phin bn pht trin2. Khng ging nh cc phn mm c quyn, nhng phin bn n nh c vn tip tc c h tr chng no cn c dng. l l do ti sao c nhiu phin bn cng tn ti. S hiu phin bn Linux tun theo chun truyn thng. Mi phin bn gm ba ch s, v.d. X.Y.Z. S X ch tng khi xy ra nhng thay i rt quan trng, nhng thay i lm cho phn mm khng th hot ng ng n vi nhng phn mm khc. iu ny rt him khi xy ra - trong lch s Linux ch xy ra ng mt ln.

Nhng cu hi thng gp v Linux S Y cho bit s series pht trin bn ang dng. Mt ht nhn n nh lun c s Y l s chn, trong khi mt ht nhn ang pht trin s dng s l S Z xc nh chnh xc phin bn ca ht nhn bn dng, n c tng mi phin bn S hiu phin bn hin thi l 2.4.x, v phin bn ang pht trin l 2.5.x. Tuy nhin nhiu ngi tip tc dng ht nhn 2.2.x v thm ch c 2.0.x, v nhng phin bn ny vn tip tc c sa cha. Series ang pht trin ni cc nh pht trin Linux ang hot ng tch cc. Series ny lun c cng b rng ri xem, kim tra, v thm ch s dng, mc d khng nn dng series ny! Cui cng, series 2.5.x s tr thnh ht nhn 2.6.0 v phin bn n nh mi c to ra, v series pht trin 2.7.x s tip tc. Hoc nu c nhng thay i tht s quan trng, c th n s tr thnh 3.0.0, v series 3.1.x s tip tc.

H: Ti nn bt u t u? : Nu bn cha bit Linux, bn nn bt u bng cch mua hoc ti v mt bn phn phi Linux ph dng. Mt bn phn phi l mt h iu hnh hon chnh, bao gn ht nhn Linux v cc tin ch, cc phn mm cn thit, sn sng ci t v s dng. Hu ht cc bn phn phi cha hng ngn gi phn mm (software package), bao gm cc giao din ho, b phn mm vn phng, v cc tr chi C mt nhm cc bn phn phi chnh, v bn nn dng chng. bit thm thng tin v cc bn phn phi ny v cch ci t chng, hy xem CD-Distributions-EN-HOWTO (http://www.tldp.org/HOWTO/CD-Distributions-EN-HOWTO/index.html) thuc Linux Documentation Project. Ngoi ra, danh sch cc bn phn phi c cp nht hng tun c ti http://old.lwn.net/Distributions. Trc khi bn chn bn phn phi mun dng, hy c cc m t cn thn v so snh vi nhu cu ca bn. Mi bn phn phi c thit k cho mt loi ngi dng ring bit. Vi bn c ti u hot ng nh server, vi bn khc c dng chi game, vi bn khc li c dng cho my bn v cc ng dng vn phng. C mt s t bn phn phi c xem l s la chn cho ngi dng mi:

Red Hat c bit tt cho server Mandrake l h thng bn xut sc SuSE cng l h thng bn xut sc

Ngoi ra cn c mt s ln cc phin bn c phn phi t ph dng hn v thch hp vi cc nhu cu ni b hoc dnh cho quc gia. Phn ln trong s nm ti ftp://ftp.tux.org.

H: C th ly mt bn phn phi nh th no? : Nu bn c kh nng, hy mua mt bn phn phi. Cc bn phn phi Linux cc k r - thng vo khong 30$ cho mt h thng hon chnh, v u trong khong 70$ n 150$ cho mt h thng ln hn vi nhiu phn mm server hn hoc nhiu cng c pht trin hn. Thm ch vi bn phn phi c bn 30$ cng tng ng vi hng ngn la cc cng c c quyn, v chng rt c gi tr. Cc nh phn phi dng tin ca bn u t pht trin, v thng nm ngoi cc d n m ngun m (open source). Vi cc bn phn phi thng mi, bn c th t mua thng qua web site ca cng ty .

Nhng cu hi thng gp v Linux Nu bn dng Debian GNU/Linux, mt bn phn phi phi li nhun, do ngi tnh nguyn to ra, bn c th ng h bng tin cho h.

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

http://www.cheapbytes.com

: Cc bn phn phi c th c ti v t trang ch ca cc bn phn phi . y l yu cu trong cc iu khon giy php ca phn mm, v th nu bn khng th mua mt bn phn phi, bn c th ly chng theo cch ny. Vi ngi dung ha gia tr tin v ti v t mng, v d, mua mi phin bn chnh (nh 6.0) nhng ti v cc phin bn ph (nh 6.1 v 6.2). Ngoi ra, nhiu bn phn phi c lu ti: ftp://ftp.tux.org v http://planetmirror.com/pub/linux.

: Vi nh sn xut phn cng km theo bn Linux ci t sn trn h thng ca h. Tuy nhin, i khi rt kh mua chng - h cung cp Linux ch trn mt s t h thng, thng l server, hoc h yu cu bn ti phn "Linux" trn website ca h. H: Ci t Linux nh th no? : Khi c mt bn phn phi, n s cha cc ch dn ci t. Mi bn phn phi c chng trnh ci t ring. : C mt ti liu ci t rt hon chnh ti http://heather.cs.ucdavis.edu/~matloff/linux.html : Vi bn phn phi (v.d. Debian GNU/Linux) c th c ci t qua FTP v danh trn mng. Nhng, tr khi bn c cp, DSL, hoc c kh nng truy cp Internet vi bng thng rng, cn nu khng th cch ci t ny khng thc t lm v kch thc cc bn phn phi rt ln ("FTP ca Linux u?") Cc bn tin trn Usenet, bao gm FAQ, c lu http://groups.google.com/ . Hy tm ch comp.os.linux.*, alt.uu.comp.os.linux.*, hoc bt c th g ph hp, bn s nhn c cc bi vit trn Usenet. ("C nhng Nhm Tin (newsgroup) no cho Linux?")

H: Linux h tr phn mm no? : Linux chy c tt c cc tin ch m ngun m chun, nh GCC, (X)Emacs, X Window System, mi tin ch Unix chun, TCP/IP (bao gm SLIP v PPP), v hng trm chng trnh c mi ngi hiu chnh chy trn Linux. C mt trnh m phng DOS, gi l DOSEMU, cho php Linux chy cc chng trnh c vit trn DOS. Phin bn n nh mi nht l 0.98.3. FTP t ti ftp://ftp.dosemu.org/dosemu. Web site ti http://www.dosemu.org.

Nhng cu hi thng gp v Linux Trnh m phng c th chy chnh DOS v mt vi (nhng khng phi tt c) cc ng dng DOS. Hy xem tp tin README xc nh nn ly phin bn no. Ngoi ra nn xem DOSEMU-HOWTO (http://www.tldp.org/HOWTO/DOSEMU-HOWTO.html) (tuy nhin, n khng cp n nhng phin bn mi nht), ti ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. WINE, trnh m phng Microsoft Windows, vn ang trong giai on pht trin. ("Linux c th chy cc chng trnh trn Microsoft Windows khng?") Trnh m phng Chun Tng thch Nh phn Intel (Intel Binary Compatibility Standard - iBCS2) cho SVR4 ELF v SVR3.2 COFF c th c chn lc bin dch. Thng tin v iBCS2 c ti ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/README. bit thm thng tin, hy xem INFO-SHEET (http://www.tldp.org/HOWTO/INFO-SHEET.html). Vi cng ty a ra cc phn mm thng mi. H thng 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 phn mm c bit nh th no? : Trc ht hy tm trong Linux Software Map, ti: ftp://metalab.unc.edu/pub/Linux/docs/linux-software-map/, v trn cc a ch FTP khc. C mt my tm kim ti http://www.boutell.com/lsm/ . Ngoi ra hy tm ti Freshmeat (http://www.freshmeat.net). y l ni cng b cc phm mm mi. Freshmeat l ni lin tc cp nht cc thng bo v phn mm mi, cp nht cc phn mm c trong Linux, lin kt ti URL ca cc phn mm . Cc a ch FTP ("FTP ca Linux u?") thng c tp tin ls-lR hoc th mc INDEX lit k danh sch tp tin. Bn c th tm bng cch dng lnh grep hoc mt b son tho vn bn. Cc tp tin lit k loi ny c th rt ln nn rt kh dng chng tm kim nhanh. Ngoi ra hy tm ti Linux Projects Map: ftp://ftp.ix.de/pub/ix/Linux/docs/Projects-Map.gz. C mt my tm kim Linux FTP archive ti: http://lfw.linuxhq.com. Tm t Linux trn Web cung cp mt lng tham chiu di do. ("Nhng th khc v Linux trn Web u?") Nu bn khng tm c th g, bn c th ti m ngun ca chng trnh v v t bin dch chng. Hy xem ("Lm sao chuyn XXX sang Linux?"). Nu l mt gi phm mm ln v cn mt vi hiu chnh chy, hy gi thng bo ln comp.os.linux.development.apps. iu ny rt him khi xy ra v Linux rt ph dng. Mt lng ln cc phn mm quan trng trn cc h thng h Unix c chuyn sang Linux t lu. Nu bn bin dch mt chng trnh ln, vui lng upload n ln mt hoc nhiu FTP, v thng bo trn comp.os.linux.announce (gi thng bo ca bn ti linux-announce@news.ornl.gov (mailto:linux-announce@news.ornl.gov)). Nu bn ang tm mt chng trnh, rt c kh nng mt ngi no vit chng trnh ri. FAQ comp.sources.wanted c nhng ch dn tm m ngun ca cc chng trnh .

Nhng cu hi thng gp v Linux H: Phn cng no c h tr? : Mt bn ci t Linux ti thiu yu cu mt h my c h tr, vi t nht 2Mb RAM, v mt a mm. Nhng tn dng sc mnh Linux, bn phi cn nhiu RAM v a cng hn. Hy xem: "Chuyn qua cc h my khc", "Yu cu a cho ci t ti thiu, ci t server, v ci t trn lm vic l g?", v "Yu cu b nh ti thiu v ti a l bao nhiu?" Cc my tnh tng thch PC, CPU Intel, cn t nht l b vi x l 80386 chy ht nhn Linux chun. Linux, gm X Window System, chy trn hu ht laptop. Hy tham kho cu tr li ca "Lm th no bit Notebook c ang chy Linux hay khng?". C mt lng ln thng tin v cc my PC c bit, v card mn hnh, b iu khin a, v cc loi phn cng khc. Hy tham kho 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 liu u?")

H: Chuyn qua cc h my khc : Web site, Tng quan v Linux Ports: http://www.itp.uni-hannover.de/~kreutzm/de/lin_plattforms.html cung cp danh sch known ports. Mt a ch khc cha 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 quyn ca IBM) v cng ESDI hu ht ng h tr. Nhng thng tin su hn v bus MCA v card no c Linux h tr c ti trang web Micro Channel Linux, http://www.dgmicro.com/mca. Ngoi ra hy tham kho cu tr li: "Nhng th khc v Linux trn Web u?" Linux cng c th chy trn 8086, c bit nh l Embeddable Linux Kernel Subset (ELKS). y l ht nhn Linux 16 bit c dng ch yu trong cc h thng nhng, t ti: http://www.linux.org.uk/Linux8086.html. Linux chun khng chy trn 8086 v 80286 v cn tnh nng qun l task v b nh ch c trn 80386 v cc th h sau. Linux h tr kin trc a x l Intel MP. Hy xem tp tin Documentation/smp.tex trong bn phn phi m ngun Linux. Mt d n ang c trin khai cho php Linux hot ng vi h my da trn 68000 nh Amigas v Ataris. Linux/m68K FAQ t ti http://www.clark.net/pub/lawrencc/linux/faq/faq.html. a ch trang ch ca Linux/m68k ti http://www.linux-m68k.org/faq/faq.html. Jes Sorensen chuyn Linux qua m68k cho Amiga, t ti ftp://sunsite.auc.dk/pub/os/linux/680x0/redhat/. FAQ Ci t (Ron Flory) cho gi ny t ti 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 ti ftp.phil.uni-sb.de/pub/atari/linux-68k, nhng a ch ny khng cn tn ti na. Debian GNU/Linux ang c chuyn qua h my Alpha, Sparc, PowerPC, v ARM. C cc mailing lists cho cc cng vic ny. Hy xem http://www.debian.org/MailingLists/subscribe

Nhng cu hi thng gp 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 ti http://www.cs.nmt.edu/~linuxppc/ . bn s tm thy kernel c phn phi vi Linux. 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 ti http://www.azstarnet.com/~axplinux/ . Mailing list ti 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 ti ftp://ftp.fnet.fr/linux-mips v ftp://ftp.linux.sgi.com/pub/mips-linux. Nhng ngi quan tm c th gi nhng cu hi hoc h tr h bng cch gi th ti linux@waldorf-gmbh.de (mailto:linux@waldorf-gmbh.de). Ngoi ra ( tng) c mt knh MIPS ti Linux Activists mail server v linux-mips mailing list. ("Mailing List u?") Ngoi ra hin thi Linux ang c chuyn sang h my ARM. Mt trong s ny l dnh cho ARM3, fitted to the Acorn A5000, v bao gm driver I/O cho 82710/11. Ci cn li l ARM610 ca Acorn RISC PC. RISC PC port hin ang giai on gia, cn vit li phn x l b nh. A5000 port ch c dng th nghim. Bn chnh thc s c cng b trong thi gian gn y. bit thm thng tin cp nht, hy c nhm tin comp.sys.acorn.misc. FAQ t ti 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 ca UltraSPARC port ("UltraPenguin") t ti http://sunsite.mff.cuni.cz/linux/ultrapenguin-1.0/ , mc d URL ny c th khng cn tn ti. Ngoi ra cn c bn Linux cho my SGI/Indy ("Hardhat"). URL l http://www.linux.sgi.com.

H: Yu cu a cho ci t ti thiu, ci t server, v ci t trn lm vic l g? : Linux cn khon 10Mb cho bn ci t ti thiu, thch hp th Linux, v khng g khc. Bn c th ci t bn server, bao gm X Window System GUI, vi khong 80Mb. Ci t Debian GNU/Linux khong 500Mb1GB, bao gm m ngun ht nhn, ch cho cc tp tin ngi dng, v vng spool. Ci t bn phn phi thng mi c mi trng ha GUI, word processor thng mi, v b phn mm vn phng, s chim khong 15.1 GB.

H: Yu cu b nh ti thiu v ti a l bao nhiu? : Linux cn t nht 4MB, v bn s cn dng tin trnh ci t c bit cho ti khi ci t disk swap space. Linux s chy thoi mi vi 4MB RAM, mc d chy cc ng dng ha GUI th khng thc t v rt chm (v phi lin tc dng swap). Vi ng dng, nh StarOffice, cn 32 MB b nh vt l, v bin dch m C++ c th ngn 100MB vng nh vt l v vng nh o mt cch d dng.

Nhng cu hi thng gp v Linux C mt bn phn phi, "Small Linux", s chy trn my vi 2MB RAM. Hy tham kho: "FTP ca Linux u?" Mt s ngi hi lm th no dng nhiu hn 64MB, gii hn trn mc nh ca hu ht ht nhn. Hoc l nhp vo ti du nhc BOOT lilo::
mem=XXM

Hoc t dng sau vo tp tin /etc/lilo.conf:


append="mem=XXM"

Tham s "XX M" l khong b nh, tnh theo megabyte; v d, "128M." Nu c ch th "append=" trong /etc/lilo.conf, hy thm vo ch th mem= ti cui i s c, v cch i s cui cng bng khong trng; v.d.:
# Ch l v d; ng s dng. append="parport=0x3bc,none serial=0x3f8,4 mem=XXM"

Nh chy lnh "lilo" ci t cu hnh mi. Nu Linux vn khng nhn ra vng nh mi, c th cn vi tham s b sung cho ht nhn. Hay tham kho tp tin /usr/src/linux/Documentation/memory.txt trong m ngun ht nhn. bit thm thng tin v LILO, hy tham kho ti liu hng dn ca lilo v lilo.conf, ti liu t ti /usr/doc/lilo, the LILO-HOWTO (), v cu tr li cho: "Lm th no t cu hnh lc khi ng?", bn di.

H: Linux c h tr cc thit b USB? : Ti thi im ny Linux h tr khong vi chc thit b USB, v cng vic vn ang tip tc h tr cc driver thit b b sung. C mt trang web chuyn v ch ny, ti http://www.linux-usb.org. Ngoi ra cn c mt ti liu LDP, ti: ("Nhng th khc v Linux trn Web u?") H tr USB phin bn 2.0 c thm vo gn y trong ht nhn ang pht trin, nhng vn cha c trong ht nhn 2.4.

H: Giy php m ngun m Linux l g? : Nhn hiu thng mi Linux thuc v Linus Torvalds. ng ta quyt nh dng Giy php Cng cng GNU (GNU General Public License) cho Linux. Ni chung, giy php ny cho php bn t o sao chp, thay i, phn phi Linux, nhng bn khng th n nh bt k rng buc no trn cc bn phn phi , v bn phi cng khai m ngun. FAQ cho GPL t ti: http://www.gnu.org/copyleft/gnu-faq.html.

Nhng cu hi thng gp v Linux Giy php ny khng ging nh Vng cng cng3. Hy xem Copyright FAQ, ftp://rtfm.mit.edu/pub/usenet/news.answers/law/copyright, bit thm chi tit. Chi tit y nm trong tp tin COPYING trong m ngun ht nhn Linux (c l nm trong /usr/src/linux trn h thng ca bn). Giy php ca nhng tin ch v chng trnh trong b phn phi rt khc nhau. Nhiu on m thuc d n GNU ti Free Software Foundation, v s dng giy php GPL. Vi chng trnh quan trng khc dng giy php BSD v cc loi giy php khc. Ch rng vic tho lun v gi tr v nhng th khc ca GPL nn c gi ln gnu.misc.discuss, ng gi ln nhm comp.os.linux. Vi nhng legal question, hy tham kho cu tr li: (Where Are Linux Legal Issues Discussed?)

H: Linux c phi l *nix? : Mt cch chnh thc, mt h iu hnh khng th c gi l UNIX cho ti khi n vt qua cuc kim tra chng nhn ca Open Group, v h tr cc API cn thit. Rt t h iu hnh thng mi vt qua c cc bi kim tra ca Open Group. bit thm thng tin, hy xem http://www.unix-systems.org/what_is_unix.html. : Mt cch khng chnh thc, Linux rt ging vi nhng h thng thng c gi l Unix, v trong nhiu trng hp th chng tng ng nhau.

Ngun v ti nguyn mng


H: Phin bn ht nhn mi nht u trn Internet? : Cch cp nht ht nhn d nht l cp nht trc tip t bn phn phi bn ang dng. : Nu bn mun hoc cn cu hnh v bin dch kernel cho ring bn, trang web http://www.kernel.org/ lit k cc phin bn ht nhn n nh v ang pht trin. Nu bn mun ti m ngun v, hy FTP ti ftp.xx.kernel.org, trong xx l k hiu tn min quc gia ca bn; v.d us l Hoa K, ca l Canada, de l c, v vi l Vit Nam. Ht nhn phin bn 2.2.x c lu ti th mc pub/linux/kernel/v2.2, as are patches for the prerelease versions. M ngun ca ht nhn c lu bng cc tp tin .tar.gz, v .tar.bz2. Hy lm theo nhng ch dn trong bt k tham kho chun no bin dch ht nhn, nh bn lm vi cc ht nhn t to khc ca bn. Th mc Documentation cha thng tin v tc gi ca cc h thng con khc nhau v cc driver, v rt nhiu thng tin khng tm thy nhng ni khc. Nu bn mun tham gia pht trin ht nhn, hy ng k mailing list linux-kernel bit ai ang lm g. Hy xem cu tr li: Mailing List u? C mt cu truyn v nhng c tnh ca ht nhn 2.4.x ti http://features.linuxtoday.com/stories/8191.html.

Nhng cu hi thng gp v Linux H: Ti liu u? : Hy tm nhng ni sau, v cc a ch mirror ca n.

D n Ti liu Linux (The Linux Documentation Project) ti http://www.tldp.org xut bn hng trm ti liu v cch s dng 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/

c danh sch cc FTP cho Linux, hy xem cu tr li: FTP ca Linux u? Nu bn khng th truy cp 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 hin c nm trong tp tin HOWTO-INDEX ti http://www.tldp.org/HOWTO/HOWTO-INDEX/howtos.html. Danh sch cc HOWTO mini ti http://www.tldp.org/HOWTO/HOWTO-INDEX/mini.html. Ngoi ra, cc bn dch cn c ti ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/ v cc mirror trn ton cu. HOWTO v nhng ti liu khc c dch ra cc ngn ng sau:

Trung Hoa (zh) Croatia (hr) Php (fr) c (de) Hellenic (el) Indonesia (id) (it) Nht (ja) Hn Quc (ko) Ba Lan (pl) Slovenia (sl) Ty Ban Nha (es) Thy in (sv) Th Nh K (tr)

Cc ti liu b sung vn ang c vit. Vui lng lin lc vi coordinator nu bn mun vit ti liu. Thng tin lin lc v gi bi vit ti http://www.tldp.org/mailinfo.html. Ngoi ra cn c trang LDP HOWTO ti http://howto.tucows.org/ .

10

Nhng cu hi thng gp v Linux Danh sch Cm nang hng dn ca The Linux Documentation Project ti http://www.tldp.org. Vui lng c chng nu bn cha tng bit Unix v Linux. V d nhin vn c mt s ngi vit cc ti liu c lp vi LDP:

Linux Administrators Security Guide, bi 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 bn ting H Lan. http://www.stuwww.kub.nl/people/b.vannunen/linux-man.php3. Virtual Frame buffer HOWTO, bi Alex Buell. http://www.tahallah.demon.co.uk/programming/prog.html X11 & TrueType Fonts, bi Peter Kleiweg. http://www.let.rug.nl/~kleiweg/ .

Ti liu cho nh pht trin ht nhn c trc tuyn ti http://kernelbook.sourceforge.net. tm hiu v h thng qun l b nh ca Linux, bao gm cc hiu chnh ci thin hiu sut, hy xem trang Web ca Rik van Riel ti http://humbolt.geo.uu.nl/Linux-MM/ . Linux Consultants-Guide c mt th mc cc nh t vn Linux. Bck khoa ton th ca Gary lit k trn 4,000 lin kt c lin quan. URL ca n l http://members.aa.net/~swear/pedia/index.html. Ngoi ra cn c FAQ cho bn phn phi Red Hat ti http://www.best.com/~aturner/RedHat-FAQ/faq_index.html.

H: Nhng th khc v Linux trn Web u? : Ngoi trang ch ca Linux Document Project: http://www.tldp.org, cn c nhiu trang cung cp thng tin nng cao v Linux. Hai trang sau l im khi u tt cho cc thng tin chung v Linux: Trang ch ca Linux International, ti http://www.li.org, v trang ch ca Linux Online http://www.linux.org. C hai trang ny cung cp cc lin kt n cc a ch khc, cc thng tin chung, thng tin v cc bn phn phi, cc phn mm mi, ti liu, v tin tc. Ti liu cho nh pht trin ht nhn ti: http://kernelbook.sourceforge.net. Tutorial, Unix is a Four Letter Word..., ti http://www.linuxbox.com/~taylor/4ltrwrd/ . Ti liu ny gii thiu chung v h iu hnh Unix, khng ch ring cho Linux. Thm na, cn c mt danh sch cha hon chnh cc trang Web dnh cho Linux:

AboutLinux.com: http://www.aboutlinux.com Thm him lp trnh Linux: http://members.tripod.com/rpragana/ Kho phn mm Linux Dave Central: http://linux.davecentral.com Tr gip Debian http://www.debianhelp.org

11

Nhng cu hi thng gp v Linux


Erlug Webzine (ting ): http://www.erlug.linux.it Free Unix Giveaway List: http://visar.csustan.edu/giveaway.html Cung cp danh sch cc CD min ph. Ngoi ra cn c qua mail: axel@visar.csustan.edu (mailto:axel@visar.csustan.edu), vi Subject: "send giveaway_list" Thng tin v Linux trong mi trng cng tc: http://www.smartstocks.com/linux.html Thng tin cho ngi mi bit Linux ca 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 trc tuyn: 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 Qun 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 dng 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 Nhng ng gp Linux ca ti bi 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

Nhng cu hi thng gp 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 cp lng tham chiu di 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 phn chuyn v Linux ti http://www.google.com/linux/ . Cc thng tin chi tit hn v my tm kim Web nm trong Web and Internet Search Engine Faq: http://www.infobasic.com/pagefaq.html. Ngoi ra nn tham kho cu tr li: Cn c nhng FAQ v ti liu no khc cho Linux?

H: C nhng Nhm Tin (newsgroup) no cho Linux? : Comp.os.linux.announce l nhm tin thng bo (moderated). Bn nn xem nhm tin ny nu nh dng Linux. N cha thng tin v cc ln cp nht phn mm, cc chng trnh c chuyn qua Linux, cc cuc hp ca cc nhm ngi dng, v cc sn phm thng mi. N l nhm tin duy nht cha cc thng tin thng mi. Gi 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 ti: 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 rt ng c: comp.os.linux.* v alt.uu.comp.os.linux.*. Bn c th tm thy nhiu vn thng thng qu mi so vi ti liu, nhng li c tr li 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

Nhng cu hi thng gp 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 rng Linux tng thch POSIX, v hu ht cc nhm tin trong comp.unix.* v comp.windows.x.* cng thch hp, ngoi tr cc vn lin quan phn cng, v vi vn cp thp. Thng tin v e-mail clients (MUA), mail transfer agents (MTA), v cc phn mm lin quan khc c ti nhm comp.mail.*, c bit l:

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

Cu hi v thng tin v phn mm c tin c ti:

news.software.readers.

Vui lng c Nu ti liu ny vn cha tr li cu hi ca bn.... trc khi gi. Gi cng lc nhiu nhm tin trong comp.os.linux.* him khi l mt tng hay. C th c nhng nhm ngi dng Linux (LUG) trong khu vc ca bn. Hy kim tra xem. Xem thm Lm th no ly thng tin khi khng th truy cp Usenet? Cng c cc nhm tin cc b khc. Bn c th tm thy nhiu thng tin hu dng :

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

14

Nhng cu hi thng gp v Linux

it.comp.linux (Italy).

Tm kim trn http://groups.google.com/ c th cung cp danh sch cp nht cc nhm tin.

H: Cn c nhng FAQ v ti liu no khc cho Linux? : C mt s FAQ th v v nhng ch khc nhau lin quan n vic qun tr h thng, s dng Linux, v nhng ch khc nh Flying Saucer Attacks (nhc) v h tr phc hi cho qun tr h thng. Kho lu tr Usenet FAQ chnh thc : ftp://rtfm.mit.edu/pub/usenet/. Internet FAQ Consortium cung cp mt kho lu c th tm kim ti: http://www.faqs.org/. a ch ny cn qun l mt kho lu cc ti liu Internet Request For Comment (RFC), Best Current Practices (BCP), v For Your Information (FYI). Ngoi ra cn c vi FAQ v ti liu c bit hu ch:

FAQ cho ngi dng mi: http://homes.arealcity.com/swietanowski/LinuxFAQ/ Linux FAQ ting Ty Ban Nha t ti: http://www.abierta.org/faq.htm http://www.abierta.org/faq.htm AfterStep FAQ: http://www.linuxinfor.com/en/astepfaq/AfterStep-FAQ.html Nhng cu hi thng gp v BASH: ftp://ftp.cwru.edu/pug/bash/FAQ/ http://www.dcoul.de/

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

Nhng cu hi thng gp v M ngun 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 hc v K thut: 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 trc tuyn: http://www.linuxinfor.com/en/docfaq.htm OReilly & Associates Openbook Project: http://www.oreilly.com/openbook/ Sendmail: http://www.sendmail.org/faq/ Sendmail: Cm nang ci t v iu hnh:: http://www.sendmail.org/ FAQ K thut cho ngi dng Linux: http://www-106.ibm.com/developerworks/library/l-faq/?n-l-7261 My tm kim Web: http://www.infobasic.com/pagefaq.html

15

Nhng cu hi thng gp v Linux

Wu-ftpd: http://www.wu-ftpd.org/man/ (tht s l mt tp hp cc man pages), vi HOWTO ti: http://www.wu-ftpd.org/HOWTO/ Nhng cu hi thng gp v XTERM. http://dickey.his.com/xterm/xterm.faq.html

H: FTP ca Linux u? : C ba kho lu chnh cho Linux:


ftp://ftp.funet.fi/pub/OS/Linux/ (Phn Lan). http://ibiblio.org/pub/linux/ (M), vi mt giao din WWW p. ftp://tsx-11.mit.edu//pub/linux/ (M).

Ni tt nht ly ht nhn Linux l ftp://ftp.kernel.org/pub/linux/kernel/. Linus Torvalds upload cc phin bn cp nht nht ln a ch ny. Trong cc bn phn phi ca M, Debian GNU/Linux t ti ftp://ftp.debian.org/pub/debian/. Red Hat Linux t ti ftp://ftp.redhat.com/, v Linux Slackware ti ftp://ftp.freesoftware.com/. Bn phn phi Small Linux, c th chy ch vi 2 MB RAM, ti http://smalllinux.netpedia.net/ . Ni dung ca nhng a ch ny c sao chp (mirror - c th l hng ngy) bi nhiu a ch khc nhau. Vui lng dng a ch gn bn nht t c tt 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/ (Hng Kng) ftp://sunsite.ust.hk/pub/Linux/ (Hng Kng) ftp://ftp.spin.ad.jp/pub/linux/ (Nht Bn) ftp://ftp.nuri.net/pub/Linux/ (Hn Quc) 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 ti 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/ (Cng ha Sc) ftp://ftp.funet.fi/pub/Linux/sunsite/ (Phn 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

Nhng cu hi thng gp 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

Nhng cu hi thng gp 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 gi cp nht v chnh sa v danh sch ny cho Linux pclouds@users.sourceforge.net (mailto:pclouds@users.sourceforge.net) Khng phi mi a ch trn lu ton b source trn a ch gc, v vi ni c nhng th m a ch gc khng c.

H: Lm th no ly Linux khi khng th truy cp FTP? : Cch d nht c l l tm mt ngi bn c truy cp FTP. Nu c mt Nhm ngi dng Linux (Linux User Group) gn bn, h c th gip bn. Nu bn c mt kt ni email tt, bn c th th dng cc server FTP-qua-mail ti ftpmail@ftp.sunet.se (mailto:ftpmail@ftp.sunet.se), hoc ftpmail@ftp.uni-stuttgart.de (mailto:ftpmail@ftp.uni-stuttgart.de). Linux cn c trn CD, thng qua th tn truyn thng. Tp tin Installation-HOWTO (ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/Installation-HOWTO), v tp tin Distribution-HOWTO (ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/Distribution-HOWTO) cha cc thng tin v nhng bn phn phi ny.

H: Lm th no ly thng tin khi khng th truy cp Usenet? : C th nhn bn tm tt ca comp.os.linux.announce bng cch ang k mailing list (gi th vi ni dung l t subscribe khng c du nhy ti linux-announce-REQUEST@news-digests.mit.edu (mailto:linux-announce-REQUEST@news-digests.mit.edu). ng k mailing list ny l mt kin hay, n mang n cho bn nhng thng tin v ti liu quan trng v Linux. Hy nh rng dng nhng a ch *-request ng k hoc hy ng k cc thng bo; gi th ti a ch khc s c gi ti news group.

H: Mailing List u? : Nhng nh pht trin Linux hin nay ch yu s dng Majordomo server ti majordomo@vger.redhat.com (mailto:majordomo@vger.redhat.com). Hy gi mt thng ip vi ni dung l t lists (khng c du nhy) ti a ch c lit k y. Thm mt dng vi t help c tp tin tr gip chun ca Majordomo, hin th danh sch cc lnh ng k v hy ng k cc danh sch. Hin thi, kernel list c lu ti: http://www.uwsg.indiana.edu/hypermail/linux/kernel/ , v http://www.lib.uaa.alaska.edu/linux-kernel/archive/ Vui lng ng gi nhng thng ip lc ln mailing list. Hu ht cc mailing list ny c dng bi cc nh pht trin Linux ni chuyn v cc vn k thut v k hoch pht trin trong tng lai. Chng khng c dng tr li cc cu hi ca ngi mi dng Linux, qung co hoc cc thng bo cng cng khng trc tip lin quan n ch ca mailing list. Comp.os.linux.announce l ni gi cc thng bo cng cng. y l quy tc chung ca Internet. Nu bn khng theo nhng hng dn ny, rt c kh nng bn s b flamed.

18

Nhng cu hi thng gp v Linux linux-newbie l ni m khng c cu hi no l ng ngn. Khng may l dng nh khng c nhiu ngi dng c kinh nghim trn . C mt s lng ln cc mailing list lin quan n Linux ti http://www.onelist.com/ . Ti trang phn loi v chn Linux. Ngoi ra cn c lin kt ng k mailing list ti: http://oslab.snu.ac.kr/~djshin/linux/mail-list/ Trang Mailing Lists Available in Usenet ti: http://paml.net/ . Thng tin v danh sch c ti: ftp://rtfm.mit.edu/, v c gi 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, bi 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 qun l u? : C cc trang web ti: http://unmaintained.sourceforge.net, v: http://www.orphansource.org/ . Vui lng lin lc vi nhng tc gi ban u ca cc d n thng qua email, hoc nhng ngi lit k cc phn mm khng c qun l, trc khi ngh n vic dng giy php mi cho gi phn mm .

H: News Groups c cn c lu ch no khc khng? : Usenet Linux news groups c lu ti http://groups.google.com/ . ftp://metalab.unc.edu/pub/Linux/docs/linux-announce.archive lu cc thng bo ca comp.os.linux.announce. Ngoi ra cn c cc mirror ti 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 vn bo mt u? : C mt trang web chuyn v bo mt trong Linux ti: http://www.linuxsecurity.com/ . Mt a ch khc l: http://www.rootshell.com/ , cha cc thng tin v bo mt Internet v privacy issue. c thng tin v Weekly Linux Security Digest email newsletter v cc c s d liu lin quan n bo mt khc, hy xem ti http://securityportal.com/ .

H: Tm t t h thng Linux u? : Trc tin, hy xem ti The Linux Standards Base, http://www.linuxbase.org. a ch ny cha cc thng tin v phn mm kim tra, t chc h thng tp tin, quy c t tn th vin ng.

19

Nhng cu hi thng gp v Linux

Tnh tng thch vi cc h iu hnh khc


H: C th dng Linux trn cng a cng c cha MS-DOS? OS/2? 386BSD? Win95? : C. Linux h tr rt nhiu h thng tp tin khc nhau, bao gm m hnh phn partition chun ca MS-DOS, v th n c th chia s a cng vi cc h iu hnh khc. Linux h tr mi phin bn c cng b ca h thng tp tin Microsoft FAT v VFAT, bao gm nhng ci c dng bi Windows 95, Windows 98, Windows NT, Windows 2000 v Windows ME thng qua cc mun ht nhn np ng. Vi mt h thng cu hnh ng, chng c th t ng np khi partition c gn kt (mount). Tuy nhin, ch rng nhiu h iu hnh khc c th khng hon ton tng thch. V d, FDISK.EXE v FORMAT.EXE ca DOS, c th ghi d liu trong partition Linux, v i khi n dng sai d liu partition t boot sector ca partition hn l t bng partition. trnh nhng trng hp , tt nht nn xa trng phn partition bn to, trc khi MS-DOS hoc ci g khc nh dng 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 ca a (IDE) th nht. Linux c th c v ghi tp tin ln cc partition FAT ca DOS v OS/2 v a mm nh h thng tp tin DOS trong ht nhn hoc nh mtools. Mt driver thit b OS/2 (GPL) c bo co c th c v vit cc partition Ext2. bit thm thng tin v h tr partition FAT32, hy xem http://bmrc.berkeley.edu/people/chaffee/fat32.html. Hy xem, (Linux h tr phn mm no?) bit chi tit v tnh trng hin thi ca cc b m phng DOS, MS Windows, v cc chng trnh System V. Ngoi ra hy xem, Linux c th truy cp h thng tp tin Amiga khng?, Linux c th truy cp h thng tp tin Macintosh khng?, Linux c th truy cp BSD, SysV, ... UFS khng? v Linux c th truy cp h thng tp tin SMB khng?. Driver NTFS vn ang c pht trin. Driver ny s h tr nn nh l c tnh chun.

H: Lm th no truy cp tp tin trn a mm hoc trn partition MS-DOS? : V d, dng h thng tp tin DOS, hy nhp vo:
$ mkdir /dos $ mount -t msdos -o conv=text,umask=022,uid=100,gid=100 /dev/hda3 /dos

Nu l a mm, ng qun umount a mm trc khi ly n ra! Bn c th dng ty chn conv=text/binary/auto, umask=nnn, uid=nnn, v gid=nnn iu khin s chuyn i kt dng t ng, iu khin quyn truy cp v quyn s hu tp tin trong h thng

20

Nhng cu hi thng gp v Linux tp tin DOS nh trong Linux. Nu bn gn kt (mount) h thng tp tin DOS bng cch t n vo /etc/fstab ca bn, bn c th t cc thuc tnh (cch nhau bng du phy) thay v thuc tnh mc nh. Ngoi ra bn c th dng mtools, c c di dng nh phn v m ngun t cc a ch FTP. (FTP ca Linux u?)

H: Linux c h tr h thng tp tin Ext2 nn khng? : D n ext2compr cung cp kernel patch. Thng tin v d n ny t ti http://e2ompr.memalpha.cx/e2compr/ . Cn c mt trang Web cha cc e2compr patch. on m vn cn ang c th nghim v bao gm patch cho ht nhn 2.0 v 2.1. bit thm thng tin v d n, bao gm cc bn patch mi nht, v a ch ca mailing list, hy xem ti URL http://debs.fuller.edu/e2compr/ .

: zlibc l mt chng trnh cho php cc ng dng c cc tp tin nn (bng GNU gzip) nh th khng b nn. Hy xem ti ftp://metalab.unc.edu/pub/Linux/libs/. Tc gi chng trnh ny l Alain Knaff. : Ngoi ra cn c thit b khi nn, "DouBle", c vit bi Jean-Marc Verbavatz, c th cung cp nn a trong khi chy trong ht nhn. Bn phn phi ch c m ngun t ti ftp://metalab.unc.edu/pub/Linux/patches/diskdrives/. Driver ny nn cc inode v th mc cng nh tp tin, v th mi h hng ca h thng tp tin nhiu kh nng s tr nn nghim trng. : Cn c mt gi gi l tcx (Transparently Compressed Executables), gip bn gi cc chng trnh t khi dng dng nn, ch gii nn tm thi khi c dng. TCX t ti ftp://metalab.unc.edu/pub/Linux/utils/compress/. H: C th dng Linux vi cc a DOS dng Stacked/DBLSPC/... hay khng? : Cho ti gn y th iu khng d dng lm. Bn c th truy xyt cc volume DOS 6.X thng qua b m phng DOS (xem Linux h tr phn mm no?), nhng lm th kh hn so vi truy cp DOS volume thng thng qua mun DOS trong ht nhn, hoc thng qua mtools. Gn y c mt gi phn mm, gi l dmsdos, cho php c/ghi cc h thng tp tin nn nh DoubleSpace/DriveSpace trong MS-DOS 6.x v Win95, cng nh Stacker phin bn 3 v 4. N l mun ht nhn. Hy xem ti ftp://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/.

H: Linux c th truy cp partition OS/2 HFPS khng? : c, nhng ch c th c, khng th ghi. Xem tp tin Documentation/filesystems/hpfs.txt trong m ngun ca ht nhn. (Lm th no nng cp/bin dch li ht nhn) Bn c th gn kt partition HPFS nh v d sau:
$ mkdir /hpfs $ mount -t hpfs /dev/hda5 /hpfs

21

Nhng cu hi thng gp v Linux

H: Linux c th truy cp h thng tp tin Amiga khng? : Ht nhn Linux h tr h thng tp tin nhanh Amiga (Amiga Fast File System - AFFS) phin bn 1.3 tr ln, c th c ci sn trong ht nhn hoc tch lm mt mun ht nhn. Tp tin Documentation/filesystems/affs.txt trong m ngun ht nhn Linux cho bit cc thng tin chi tit hn. Xem (Lm th no nng cp/bin dch li ht nhn) Linux ch h tr partition AFFS trn cng, khng h tr trn mm v tnh khng tng thch gia b iu khin a mm ca Amiga v ca PC. Driver AFFS cn c th gn kt partition a ca Un*x Amiga Emulator, vit bi Bernd Schmidt.

H: Linux c th truy cp BSD, SysV, ... UFS khng? : Cc ht nhn gn y c th gn kt (ch c) h thng tp tin UFS ca System V; Coherent; Xenix; BSD; v derivatives nh SunOS, FreeBSD, NetBSD, v NeXTStep. H tr UFS c th c ci vo ht nhn hoc t trong mun ht nhn. Xem, (Lm th no nng cp/bin dch li ht nhn)

H: Linux c th truy cp h thng tp tin SMB khng? : Linux h tr c/ghi cc volume SMB ca Windows for Workgroups v Windows NT. Xem tp tin Documentation/filesystems/smbfs.txt trong m ngun Linux v(Lm th no nng cp/bin dch li ht nhn) bit thm. Ngoi ra cn c mt b chng trnh tn l Samba cung cp h tr cho h thng tp tin mng ca Windows for Workgroups (provided theyre for TCP/IP). Xem thm thng tin trong tp tin README ti metalab.unc.edu/pub/Linux/system/network/samba/. Trang web ca SMB l http://www.samba.org, v cn c mt trang web ti samba.anu.edu.au/samba.

H: Linux c th truy cp h thng tp tin Macintosh khng? : C mt tp chng trnh cp ngi dng c v ghi Macintosh Hierarchical File System (HFS). Chng trnh t ti metalab.unc.edu/pub/Linux/utils/disk-management/ (http://metalab.unc.edu/pub/Linux/utils/disk-management). H tr truy cp h thng tp tin HFS+ vn ang c pht trin.

H: Linux c th chy cc chng trnh trn Microsoft Windows khng? : WINE, mt b m phng Windows trong Linux, vn cha sn sng s dng. Nu bn mun tham gia pht trin, hy xem bo co tnh hnh ti nhm tin comp.emulators.ms-windows.wine. Ngoi ra cn c mt FAQ, c bin son bi P. David Gardner, ti ftp://metalab.unc.edu/pub/Linux/docs/faqs/Wine-FAQ/.

22

Nhng cu hi thng gp v Linux

: Hin thi, nu bn mun chy cc chng trnh ca MS Windows, cch an ton nht l boot-kp (dual-boot). LILO, the Linux boot loader, c th khi ng mt h iu hnh c chn t menu. Hy xem ti liu LILO bit thm. Ngoi ra, LOADLIN.EXE (mt chng trnh trong DOS cho php np ht nhn Linux, hoc ht nhn cc h iu hnh khc, l mt cch c th dng c Linux v DOS. LOADLIN.EXE c bit hu dng khi bn mun ci t Linux trn a th ba hoc th t (hoc khi bn thm mt a SCSI vo h thng c a IDE). Trong trng hp ny, LILO thng khng th tm ra hoc np ht nhn trn a "khc". V th bn ch cn to th mc C:LINUX (hoc mt tn khc), t LOADLIN.EXE vo km theo mt bn sao ca ht nhn bn dng, v chy LOADLIN.EXE. LOADLIN.EXE l chng trnh tng thch VCPI. Win95 s yu cu bn "shutdown into DOS mode," chy chng trnh (nh cc chng trnh DOS dng protected-mode khc).

: Ngoi ra cn c mt chng trnh thng mi tn l VMWare cho php chy Windows trong Linux. Hy xem ti trang web ca cng ty ti 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 cp nht. : Nhng thng tin di y c trch t NFS HOWTO ca Nicolai Langfeldt vo thi im 10/1/1999: Hu ht ht nhn phin bn 2.2.x cn set of patches ci t h thng con knfsd, c qun l bi H.J. Lu, c th lin lc mt cch hiu qu (if at all) vi Sparc, IBM RS, v cc my Alpha, v c l c nhng my khc. Gi phn mm ny tht s l mt tp cc patch cho m ngun kernel. H tr tt hn cho kin trc phi-Intel c gp trong ht nhn 2.4. Ngoi ra cn c user-space server. Mc d n thiu tnh nng kha tp tin t xa (remote file locking), nhng n d ci t hn. C hai c hiu sut tng ng. Trong tp tin Documentation/Changes trong cc ht nhn gn y, c mt danh sch cc URL cho c knfsd server v user-space server. C mt CVS server cho kernel-space NFS, cng nh trang ch ti http://www.linuxnfs.sourceforge.org, mc d cn mt khu truy cp. URL lin quan c lit k trong tp tin README.nfs ti ftp://ftp.us.kernel.org Patches c ti ftp://ftp.varesearch.com/pub/kernel/latest/patches/. User-space server v cc tin ch c ti ftp://linux.mathematik.tu-darmstadt.de:/pub/linux/people/okir/. Mailing list linux-kernel c vi cuc tho lun v NFS subsystem.

H: Linux c th dng font True Type khng? : C. C mt s font server cho X Window System. Mt trong s l xfsft. Trang ch ca n t ti http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/ . Ngoi ra cn c cc ch dn cu hnh.

23

Nhng cu hi thng gp v Linux : Mt font server khc h tr True Type l xfstt : Cn c cc font server khc h tr True Type. Trn trang ch ca xfsft c cc lin kt ti cc server ny. : Bn cn c th bin dch tnh nng h tr True Type vo thng trong X Window. Vui lng xem trang ch xfsft bit thng tin chi tit. : Ngi dng Debian nn tham vn TT-Debian-HOWTO (http://failed.com). H: C th khi ng Linux t MS-DOS khng? : Nu LILO khng chy, v nu my bn c MS-DOS hoc Microsoft Windows, my ca bn c th s khng khi ng c. iu ny c th xy ra khi nng cp Linux. Ci t li LILO l iu cui cng m phn ci t lm. iu cc k quan trng khi ci t hoc nng cp Linux trn my dual-boot l phi c a mm khi ng MS-DOS hoc Windows, nh bn c th dng lnh FDISK -MBR phc hi Master Boot Record. Sau bn c th dng LOADLIN.EXE khi ng Linux thay v dng LILO. Tp tin config.sys ny l mt cch gi LOADLIN.EXE v khi ng MS-DOS hoc 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.

Nhng dng lnh ny to mt menu bn c th chy LOADLIN.EXE trc khi DOS khi ng xong. ng dn v ty chn ph thuc vo tng my. Xem ti liu LOADLIN.EXE bit v ty chn. Chng cng ging nh LILO, v ty chn ch n gin c chuyn cho kernel.

H: Khi ng Linux t OS/2 Boot Manager nh th no? : 1. To mt partition dng FDISK.EXE ca OS/2 (Khng Phi fdisk ca Linux). 2. nh dng partition trong OS/2, hoc l FAT, hoc l HPFS. Lm nh vy OS/2 bit partition c nh dng. (Bc ny khng cn thit vi OS/2 warp 3.0.) 3. Thm partition vo Boot Manager.

24

Nhng cu hi thng gp v Linux 4. Khi ng Linux, v to mt h thng tp tin trn partition bng lnh mkfs -t ext2 hoc mke2fs. Vo lc ny, nu bn thch, hy dng lnh fdisk ca Linux thay i m ca partition sang loi 83 (type 83 - Linux Native). Vic ny c th gip cho cc script t ng c th tm ra u l partition ng cn dng. 5. Ci t Linux trn partition. 6. Ci LILO trn partition Linux, KHNG phi trn Master Boot Record (MBR) ca cng. Nh LILO chy nh l boot loader th hai, c dng np Linux trn chnh partition . lm th, hy t dng:
boot = /dev/hda2

(trong /dev/hda2 l partition dng khi ng) trong tp tin /etc/lilo/config hoc /etc/lilo.config.

7. Hy kim tra chc rng partition cha Boot Manager c nh du active, bn c th dng Boot Manager chn h iu hnh. C nhiu HOWTO v ch multi-boot ny. Hy tm trn trang ch ca LDP, http://www.tldp.org.

H thng tp tin, a, v a
H: Lm th no Linux lm vic vi a ca ti? : Nu a ca bn thuc chun IDE hay EIDE, bn nn xem tp tin /usr/src/linux/drivers/block/README.ide (mt phn trong m ngun ca Linux kernel). Phn README ny cha nhiu ch dn hu ch v cc a IDE. Nhiu IDE controller mi thc hin chuyn i t ng gia cylinders/heads/sectors vt l v logic. Cc a SCSI c truy xut bng cc s block tuyn tnh. BIOS gi lp cc gi tr cylinders/heads/sectors logic h tr DOS. Cc BIOS ca h my IBM PC-compatible c s khng th truy xut cc phn vng m rng qu 1024 logical cylinder v s gp trc trc nu khi ng Linux kernel t cc phn vng ny. Tuy nhin bn vn c th s dng cc phn vng ny trn Linux hoc trn cc h iu hnh truy xut trc tip vo controller. Tt hn l bn to t nht mt phn vng nm hon ton di gii hn 1024 logical cylinder v khi ng t phn vng ny. Cc phn vng khc vn s dng bnh thng. Ngoi ra, dng nh c mt cht trc trc vi cc a Ultra-DMA mi. Ti khng c r lm v vn ny, nhng chng rt thng thy trong cc bui installfest ca SVLUG (installfest l mt hnh thc cc thnh vin hi hp v tin hnh ci t Linux trc cc thnh vin mi). Nu m bn c trong tay loi a 8-12GB vi gi $200-$300 th khng c g phi lo lng.

25

Nhng cu hi thng gp v Linux H: Lm th no phc hi cc tp tin xa? : Thng thng, rt kh thc hin iu ny trn cc h iu hnh Unix bi v tnh a nhim ca bn thn n. Chc nng phc hi trong h thng tp tin ext2 vn lm vic, nhng tt nht l bn ng trng ch qu nhiu vo n. C kh nhiu gi phn mm4 cung cp lnh chp v xa mi, cc lnh ny s chuyn cc tp tin b xa vo mt ci gi rc. Tp tin c th c phc hi cho ti khi b xa t ng bi mt tin trnh chy nn. Chng trnh qun l tp tin Midnight Commander cung cp mt c ch phc hi s dung cc hm th vin h thng tp tin Ext2 v mt th mc cha file va xa cho mi h thng file. Cc gi phn mm MC phn phi thng mi c th c hoc khng tnh nng ny, v th hy th nhn vo m ngun ca bn phn phi xem lm th no bt tnh nng phc hi tp tin xa. Hoc l, bn c th d tm trc tip trn a cng. y l mt cng vic nng nhc, v bn s cn phi ng nhp vi t cch l root lm iu ny. Nhng b li n cng kh c vic. Ch cn chy grep trn thit b th, v d :
grep -b bookmarks /dev/hda

Nu d liu cha b ghi ln, bn s c th tm thy v phc hi tp tin xa bng mt chng trnh son tho vn bn.

H: Lm th no sao lu d liu? : Bn c th sao lu c mt cy th mc hoc ton b h thng tp tin vo bt k phng tin no bng cch s dng GNU tar hoc cpio, nhng cng c c thit k cho mc ch ny. tar c v thng dng hn, v bao gm mt s ty chn trn dng lnh cho php to bn sao lu c nn, c th b sung v c th to multi-volume (bn sao c chia lm nhiu phn c th lu vo cc thit b lu tr c dung lng nh nh a mm, CD). Thng tin y c trong cc ti liu, chng c lu di dng GNU Texinfo. : Chng trnh min ph Amanda nhn c rt nhiu li khen trn Usenet. Trang ch ca n http://www.amanda.org. : Cng c kh nhiu tin ch sao lu thng mi. Chng thng c km theo trong nhng bn phn phi thng mi. H: C th thay i kch thc partition m khng ph hy d liu khng? : Hy dng chng trnh FIPS.EXE c trong hu ht cc bn phn phi. Chng trnh ny chy di nn MS-DOS. : GNU parted, mt trnh hiu chnh partition, lm vic kh n nh, cho nhng ngi dng thng thng 5. M ngun ca phin bn mi nht ftp://ftp.gnu.org/pub/gnu/parted/. Ngoi ra cng c tp tin image to a khi ng c cha chng trnh parted c th chy trn cc h thng khng c sn

26

Nhng cu hi thng gp v Linux Linux. Dng tp tin image ny tng i d i vi nhng ngi mi. Xy dng li t m ngun cn phi cu hnh thm mt cht. Parted cng c ti liu hng dn tng bc, dng plain-text cho h thng tp tin Linux v FAT (MS-DOS).

: Ngoi ra mt vi bn phn phi thng mi c km theo phn mm phn vng ring, chng hn nh Partition Magic. H: C trnh dn a cho Ext2fs khng? : C. l defrag, l mt trnh dn a cho mt s h thng tp tin Linux nh ext2, Minix, v ext kiu c. Chng trnh c ftp://metalab.unc.edu/pub/Linux/system/filesystems/defrag-0.70.tar.gz. i vi h thng tp tin ext2 c th khng cn defrag, bi v ext2 c kh nng gim thiu s phn mnh nhiu nht c th c (k c khi a y). H: Lm th no nh dng a mm theo mt h thng tp tin no ? : Nu bn ang chy Gnome hoc KDE phin bn gn y, bn c trong tay mt cng c nh dng a mm d dng vi giao din ha. : Cn nh dng a mm 3.5 inch HD 6 bng dng lnh, bn c th g vo lnh sau y:
$ fdformat /dev/fd0H1440 $ mkfs -t ext2 -m 0 /dev/fd0H1440 1440

i vi a 5.25 inch, hy t li cc gi tr fd0h1200 v 1200 cho thch hp. i vi a B: hy dng


fd1 thay v fd0.

Ty chn -m 0 bo cho mkfs.ext2 bit l khng dnh khng gian a cho superuser (ngi dng cp cao), thng l 10% dnh cho root. Lnh u tin thc hin nh dng cp thp. Lnh th hai to vng khng gian trng cho a. Bn c th mount a mm nh l vi phn vng cng v s dng cc lnh cp v mv,v.v... Quy c gi tn thit b thng thng ging nh cc h iu hnh Unix khc. Chng c th c tm thy trong tp hng dn Installation v Getting Started ca Matt Welsh. Hy tham kho phn (Ti liu u?). Bi miu t chi tit hn Linux Allocated Devices ca H. Peter Anvin, hpa@zytor.com (mailto:hpa@zytor.com), c lu c 2 dng Latex v ASCII, c trong bn phn phi m ngun ca kernel (c th nm trong /usr/src/kernel/Documentation/), di tn devices.tex v devices.txt.

H: Linux c h tr h thng tp tin o nh RAID khng? : Hu ht cc kernel Linux gn y u h tr phn mm RAID, v chng ng nhin s h tr cc b iu khin a RAID.

27

Nhng cu hi thng gp v Linux Mt trnh t ng gn kt 7 cc phn vng NFS 8 l mt phn khng th thiu i vi hu ht cc bn phn phi. Hn na, hin c kh nhiu cc d n v h thng tp tin o. Mt trong s l Linux Logical Volume Manager c http://linux.msede.com/lvm/ .

H: Linux c h tr m ha h thng tp tin khng? : C ch. V d nh ppdd c http://pweb.de.uu.net/flexsys.mtk/ . H: Nhng thng ip rc v Inode, Block, v nhng th tng t l g? : H thng ca bn b li h thng tp tin. Nguyn nhn c th l khng shutdown Linux trc khi tt my hay khi ng li my. Bn c th dng trnh shutdown lm vic ny. Trnh ny c trong cc gi ci t util-linux, thng km sn trn sunsite v tsx-11. Nu bn may mn, chng trnh fsck (hoc e2fsck hoc xfsck ty nu fsck khng c trn my tnh ca bn) s sa li cc li trong h thng tp tin. Nu bn km may mn, h thng tp tin s tr nn v gi tr, v bn s phi ti nh dng li a bng mkfs (hoc mke2fs, mkxfs, v.v...), v khi phc li t bn sao lu d phng trc .
Ghi ch: ng c kim tra h thng tp tin c gn lin vi phn vng root trong ch c/ghi, nu bn khng thy:
VFS: mounted root ... read-only

lc khi ng.

H: Ti sao vng nh o ca ti khng hot ng? : Khi bn khi ng (hay khi cho bt ch swapping - tc l cho php s dng vng nh o), bn s thy:
Adding Swap: NNNNk swap-space

Nu bn khng thy bt k thng ip no ht, c th bn thiu


swapon -av

(lnh cho php s dng vng nh o) trong tp tin /etc/rc.local hoc /etc/rc.d/* (cc tp tin scripts cha cc lnh c thi hnh khi h thng khi ng), hoc qun thm vo mt dng trong /etc/fstab gn kt phn vng c s dng lm vng nh o lc khi ng, v d nh:

28

Nhng cu hi thng gp v Linux


/dev/hda2 none swap sw

Nu bn thy:
Unable to find swap-space signature9

tc l bn qun chy mkswap cho phn vng . Hy xem thm cc cun hng dn (manual) bit chi tit. N hot ng kh ging vi mkfs. Hy chy th lnh free xem dung lng vng nh cn trng, trn mn hnh s c mt dng tng t vi dng sau:
total used free Swap: 10188 2960 7228
10

Nu g vo lnh cat /proc/swaps ch cho thy tn tp tin hay phn vng, ch khng c thng tin v vng nh o, khi tp tin hay phn vng dng lm vng nh o cn phi thit lp li. Bn c th s dng fdisk (di quyn root) xc nh phn vng no trn a cng c chun b lm vng nh o. Phn vng ny cn phi nh dng vi mkswap trc khi s dng n bng lnh swapon.

H: Lm sao thm vng nh o? : Ngoi cc vng nh s dng phn vng a cng, Linux cn cho php s dng tp tin lm vng nh o (tp tin hon i - swap file). Mt vi chng trnh, nh g++, c th s dng mt lng ln b nh, cn phi to thm vng nh o b sung tm thi trong lc chy. V d to thm mt vng nh o khong 64MB, bn chy ln lt cc lnh sau:
# dd if=/dev/zero of=/swap bs=1024 count=65535 # mkswap /swap # swapon /swap

i s count= ca lnh dd xc nh dung lng ca tp tin hon i. Trong v d ny, tn tp tin hon i l /swap, nhng tn v v tr trn thc t l ty , thng ch ph thuc vo dung lng cn thit v bn c quyn c ghi vo th mc no. Khi bn khng cn vng nh o na, hy hy n bng cc lnh sau:
# swapoff /swap # rm /swap

29

Nhng cu hi thng gp v Linux Bn cng nn xem qua Installation HOWTO (http://www.tldp.org/HOWTO/Installation-HOWTO/index.html) v Installation & Getting Started c hng dn chi tit. Nu vn khng c vng nh o cn thit, hy tham kho (Lm th no dng trn 128Mb Swap)

H: C th loi b LILO h thng khi ng DOS li khng? : Trnh lilo (khng phi ton b gi phn mm LILO) s dng ty chn -u trn dng lnh g b LILO. Bn phi cung cp tn thit b m bn ci t LILO, v d:
lilo -u /dev/hda

N s ghi li bn gc trc khi ci LILO vo master boot record ca a cng th nht, c lu gi trong /boot/boot.0300. Nu bn ci LILO ln phn vng nh l mt boot loader ph, v d /dev/hda1, lilo s dng bn gc lu /boot/boot.0301. Tham kho thm phn hng dn (manual) ca lilo bit chi tit. Cm n Villy Krush nhc ti cp nht cu tr li ny. Nu bn s dng phin bn LILO c hn, bn s phi dng lnh ca DOS (MS-DOS 5.0 hoc mi hn, hay OS/2) FDISK /MBR (khng c thng tin chnh thc v lnh ny). N s ghi ln lilo boot loader bng Master Boot Record chun ca MS-DOS. Nu bn c DR-DOS 6.0, chy FDISK.EXE theo cch thng thng v chn Re-write Master Boot Record . Nu bn to a khi ng trong qu trnh ci t Windows, chc chn l n c cha cc chng trnh FDISK.EXE, FORMAT.COM, v SYS.COM. Hy s dng chng ci t li MS-DOS trn a cng. Nu bn khng c MS-DOS hay DR-DOS, bn cn c bn sao lu ca boot sector m LILO lu li khi ln u bn ci n. Bn vn cn gi tp 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 nu bn s dng a loi SCSI). N cng c th dn sch partition table ca bn, tc l cc phn vng ca bn trn da s khng cn, v th hy cn thn! Nu bn thuc loi liu lnh, bn c th dng:
dd if=/dev/zero of=/dev/hda bs=512 count=1

N s xa sch partition table v boot sector. Sau bn c th nh dng li a bng chng trnh m bn thch. Nhng n s lm cho ni dung trn a ca bn tr nn khng th truy xut c, v bn s mt sch tr khi bn l mt chuyn gia. Ch l DOS MBR s khi ng bt c phn vng no (ch mt m thi) c nh du "active". Bn cn dng fdisk t v xa du "active" trn cc phn vng.

30

Nhng cu hi thng gp v Linux H: Ti sao fdformat cn quyn root? : nh dng a mm bn cn phi thc hin di quyn root, ngay c khi n c quyn i vi /dev/fd0*. Nu bn mun bt k ngi dng no cng c th nh dng a mm, hy th fdformat2. N s trnh c vn v n c setuid cho root. H: Ti sao h thng kim tra partition Ext2fs mi khi khi ng li? : Tham kho (EXT2-fs: warning: mounting unchecked file system) H: Ti sao h thng tp tin gc ca ti l ch-c? : hiu c lm th no m bn li b nh vy, hy xem phn (EXT2-fs: warning: mounting unchecked file system) Hy gn kt li (remount) n. Nu /etc/fstab l chnh xc, bn ch cn g:
mount -n -o remount /

Nu etc/fstab b sai, bn phi a thm tn thit b v c th c kiu ca n na, v d nh:


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

H: /proc/kcore l g? : Khng c mt tp tin no trong /proc thc s tn ti c, nhng tp tin c to bi kernel, cho bn cc thng tin v h thng v khng chim dung lng ca a.
/proc/kcore ging nh mt b danh ti b nh trong my tnh ca bn. Kch thc ca chng bng

vi dung lng RAM m bn c, v nu bn c n nh l mt tp tin, kernel s thc hin vic c trn b nh.

H: Ti sao card AHA1542C khng hot ng trong Linux? : Ty chn cho php card AHA1542C c th nhn ra c a cng hn 1024 cylinders ch cn thit cho cc BIOS c dng trong cc my bn, v nn tt i trong Linux. Vi cc kernel c hn bn cn phi tt hu ht cc ty chn nng cao trong BIOS tr ty chn v qut tm cc thit b c th khi ng c 11. H: Journalling File System u trn mng? : Linux hin h tr kh nhiu journalling file systems. Ext3 hin c gp vo trong dng kernel phin bn 2.4.x. : Mt journalling file system c tn Reiserfs va c pht hnh th nghim. N c gii thiu l lm cho Linux nhanh hn hn khi dng Linux vi h thng tp tin Ext2, c bit khi truy xut ti nhiu tp tin nh.

31

Nhng cu hi thng gp v Linux Ton b thng tin c http://devlinux.org/namesys/ .

: JFS vn ang c pht trin

Porting, bin dch v ly chng trnh


H: Bin dch chng trnh nh th no? : Hu ht cc phn mm trong Linux c vit bng C v c bin dch bng trnh bin dch GNU (GNU C Compiler). GCC l mt phn ca cc bn phn phi Linux. Phin bn mi nht ca GCC, cc ti liu, v patch t ti ftp://ftp.gnu.org/pub/gnu/. Nhng chng trnh vit bng C++ phi c bin dch bng trnh bin dch GNU G++, cng c trong cc bn phn phi v c t cng ch vi GCC. bin dch ht nhn 2.0.x, bn cn GCC phin bn 2.7.2.x. Bin dch cc ht nhn c vi trnh bin dch khc, nh GCC 2.8.x, EGCS, hoc PGCC, c th gy ra li v GCC related code dependencies. Ht nhn phin bn 2.2, 2.4, v 2.5 c th c bin dch bng cc trnh bin dch mi. Thng tin v trnh bin dch EGCS t ti http://www.gnu.org/software/gcc/gcc.html. Ch rng ti thi im hin nay, kernel developers khng sa li cho cc phin bn c m tp trung pht trin phin bn 2.5 cng nh bo tr cc phin bn 2.2.x v 2.4.x.

H: Lm th no ci t phn mm GNU? : Trn h thng c cu hnh ng, ci t cc phn mm GNU cn cc bc sau: 1. Gii nn m ngun source.tar.gz:
tar zxvf package-name.tar.gz

2. Chy script ./configure trong th mc m ngun va gii nn. C th thm vo cc tham s nu cn. Cc tham s c chp nh thng c ghi trong tp tin INSTALL hoc README. 3. Chy make. Chng trnh ny s bin dch m ngun v to chng trnh. Cng on ny c th mt vi pht hoc c khi l vi gi, ty thuc vo tc my tnh v kch thc ca chng trnh cn bin dch. 4. Chy make install. ci t chng trnh, cc tp tin cu hnh, v cc tp tin khc vo th mc thch hp.

H: Ly Java u? : Sun Microsystems Java runtime environments v developers kits t ti http://java.sun.com/java/ Bn c th ly m ngun, vi giy php ca Sun Microsystems.

32

Nhng cu hi thng gp v Linux

: Trang ch ca trnh bin dch Java ca IBM Jikes l http://www10.software.ibm.com/developerworks/opensource/jikes. : C mt phin bn ca trnh duyt HotJava ca Sun cho Linux ti: http://www.java.sun.com/products/hotjava/ . : Kaffee, mt bn sao Java, c ti: http://www.kaffe.org. : C mt trang v cc gi java t do v thng mi ti: http://www.blackdown.org/java-linux.html. : Netscape Communicator dng mt phin bn Java Runtime Environment ring, v th nu bn ch cn Java xem Web, bn c l c phin bn ri. Bn c th ti Communicator v t http://www.netscape.com. H: Lm sao chuyn XXX sang Linux? : Ni chung, cc chng trnh *nix cn rt t thay i. n gin l theo cc hng dn ci t. Nu bn khng bit v khng bit lm sao tm cu tr li cho vi cu hi trong qu trnh ci t, bn th on, nhng iu ny dng nh d lm cho chng trnh gp li. Trong trng hp ny, bn nn hi ai chuyn qua Linux. Nu bn c mt chng trnh ca BSD, bn nn th dng -I/usr/include/bsd v -lbsd trn nhng phn thch hp ca qu trnh bin dch.

H: ld.so l g v lm sao ly n? : ld.so l b np th vin ng 12. Mi chng trnh dng th vin dng chung13 thng cn khong 3K m khi ng tm v np th vin. By gi on m c t trong mt th vin c bit, /lib/ld.so, nh ph a, v c th c nng cp d dng.
ld.so c th ly t http://tsx-11.mit.edu/pub/linux/packages/GCC/ v cc mirror . Phin bn mi nht ti thi im vit bi ny l ld.so.1.9.5.tar.gz. /lib/ld-linux.so.1 cng nh vy, cho ELF (ELF l g? glibc l g?) v nm trong cng gi phn

mm nh b np a.out.

H: Lm sao cp nht th vin m khng lm hng h thng? :

Cnh bo
Bn nn to sn a cp cu sn sng thc hin nhng thao tc ny, trong trng hp c ci g khng n!

33

Nhng cu hi thng gp v Linux

Cng vic ny c bit kh nu bn nn cp cc phin bn rt c nh libc4. Nhng bn nn gi li libc4 trn cng h thng vi libc5 cho nhng chng trnh cn n n. iu cng ng i vi vic cp nht t libc5 sang bn glibc2 mi hn. Vn vi nng cp th vin ng l vo lc bn loi b nhng th vin c, cc tin ch bn cn nng cp s khng hot ng. y l cch trnh iu . Mt l t tm thi mt bn sao thu nh ca cc th vin runtime, t /lib/, /usr/lib/, hoc /usr/local/lib/, hoc mt th mc khc c lit k trong tp tin /etc/ld.so.conf. V d, khi nng cp th vin libc5, cc tp tin trong /lib/ c th trng ging th ny:
libc.so.5 libc.so.5.4.33 libm.so.5 libm.so.5.0.9

y l nhng th vin C v th vin ton hc. Chp chng vo mt th mc khc c lit 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 chc chn chy ldconfig cp nht cu hnh th vin. Cc tp tin libc.so.5 v libm.so.5 l cc lin kt biu tng14 tr n cc tp tin thc s. Khi nng cp, khng cn to lin kt mi nu lin kt c vn cn, tr khi bng dng c -f vi lnh cp. C -d vi lnh cp s chp chnh lin kt biu tng, khng phi tp tin n tr ti. Nu bn cn tr lin kt trc tip ti th vin, hy dng c -f vi lnh ln. V d, chp th vin mi ln ci c, hy th nh sau. To lin kt biu tng n th vin mi trc, sau chp c hai th vin v cc lin kt vo /lib/, bng cc lnh 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

Mt ln na, nh chy ldconfig sau khi chp th vin. Nu bn tha mn, bn c th loi b cc tp tin tm ca th vin ca ra khi /usr/lib/ hoc ni no khc m bn chp vo.

H: C th dng m hoc trnh bin dch c to cho 486 dng trn 386 khng? : C, tr khi bin dch kernel.

34

Nhng cu hi thng gp v Linux Ty chn -m486 ca GCC, c dng bin dch chng trnh x486, ch yu ti u vi im. Chng lm cho chng trnh ln hn mt cht v nhanh hn mt t trn my 486. Chng vn chy trn 386, mc d hiu sut km hn. Tuy nhin, t phin bn 1.3.35, kernel dng ch th ring ca 486 hoc Pentium nu c cu hnh cho 486 hoc Pentium, v th nn khng th chy trn 386. GCC c th c cu hnh cho 385 hoc 486: khc bit duy nht l cu hnh cho 386 dng ty chn -m386 lm mc nh cn 486 dng -m486 lm mc nh. Trong c hai trng hp, nhng ty chn ny c th b ghi bng cch sa /usr/lib/gcc-lib/i*-linux/n.n.n/specs. Mt bn alpha cho GCC bit ti u cho 586 nh th no, nhng n khng ng tin cy lm, c bit vi cc thit lp ti u. Pentium GCC c ftp://tsx-11.mit.edu/pub/linux/ALPHA/pentium-gcc/. GCC 486 nguyn thy to m tt hn cho Pentium bng cch dng -m386, or t nht cng nh hn.

H: Lnh gcc -O6 lm ci g? : Hin thi th cng nh -O2 (GCC 2.5) hoc -O3 (GCC 2.6, 2.7). Bt k s no ln hn s ny iu lm nh nhau. Tp tin Makefiles ca cc kernel mi dng -O2, v bn cng nn lm nh vy. H: linux/*.h v asm/*.h u? : Cc th mc /usr/include/linux/ v /usr/include/asm/ thng l cc lin kt tr ti th mc cha kernel header, thng nm ti /usr/src/kernel*/. Nu bn khng c m ngun kernel, hy ti chng v. Hy tham kho cu tr li: (Lm th no nng cp/bin dch li ht nhn) Sau khi ti, dng rm xa nhng tp tin c, v ln to lin kt:
$ 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 tp tin assembly nm trong cc th mc ring bic cho tng h my, v th bn cn lin kt /usr/src/include/asm ti /usr/src/linux/include/asm-i386 trn my PC, ti /usr/src/linux/include/asm-sparc trn my Sun Sparc, ti /usr/src/linux/include/asm-ppc trn PPC, v tng t th. Bn cng s nhn ra cn make config nh trong m ngun kernel mi, to linux/autoconf.h.

H: Phi lm g vi li khi bin dch ht nhn? : Xem cu hilinux/*.h v asm/*.h u?. Hy nh rng khi bn patch kernel, bn phi dng ty chn -p0 hoc -p1. Nu khng, c th s patch sai. Xem ti liu patch bit chi tit. ld: unrecognized option -qmagic ngha l bn cn c b lin kt mi hn, t ftp://tsx-11.mit.edu/pub/linux/packages/GCC/, trong tp tin binutils-2.8.1.0.1.bin.tar.gz.

35

Nhng cu hi thng gp v Linux H: Lm th no to th vin dng chung? : Vi ELF,


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

Vi a.out, ly tools-n.nn.tar.gz t tsx-11.mit.edu/pub/linux/packages/GCC/src/. N c ti liu i km, s cho bn bit cn lm g. Ch rng th vin dng chung a.out rt phc tp, rc ri. Hy xem xt nng cp th vin ca bn ln ELF. Xem ELF HOWTO, ti ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/.

H: Ti sao chng trnh ca ti qu ln? : Vi trnh bin dch ELF (ELF l g? glibc l g?), nguyn nhn thng nht l thiu lin kt th vin .so vi mi th vin bn dng. Nn c mt lin kt nh libc.so vi mi th vin nh libc.so.5.2.18. Vi trnh bin dch a.out nguyn nhn thng nht l ty chn lin kt -g. Ty chn ny to ra mt chng trnh c lin kt tnh, cha mi th vin n cn thay v lin kt vi cc th vin . Nhng ty chn khc ng quan tm l -O v -O2, cho php ti u (xem ti liu GCC), v -s (hoc lnh strip) loi b nhng thng tin symbol ra khi chng trnh (v cng c ngha l hon ton khng th debug). Bn c th s mun dng ty chn -N trn nhng chng trnh rt nh (nh hn 8K vi -N), nhng bn khng nn lm th tr khi bn hiu tc ng v hiu sut ca ty chn ny, v hon ton khng nn lm vi daemon.

H: Linux c h tr tuyn on (thread) v tin trnh nh cn (lightweight process) khng? : Cng nh m hnh a tin trnh Unix, bao gm n cc tin trnh nh cn, l mt phn ca Linux kernel chun, c vi phin bn tin trnh hoc thread nh cn. Cc kernel gn y dng m hnh thread l kthreads. Ngoi ra, cng c th dng nhng gi phn mm sau.

GNU glibc2 cho Linux c ty chn h tr thread: ftp://ftp.gnu.org/pub/gnu/ Trong sipb.mit.edu:/pub/pthread/ hoc ftp.ibp.fr:/pub/unix/threads/pthreads. Ti liu khng nm trong gi ny, nhng c ti http://www.mit.edu:8001/people/proven/home_page.html. Cc phin bn libc mi hn cha m ngun pthreads. Trnh bin dch GNU Ada trn ftp://metalab.unc.edu/pub/Linux/devel/lang/ada/gnat-3.01-linux+elf.tar.gz cha chng trnh c to t m ngun . QuickThreads ftp://ftp.cs.washington.edu:/pub/qt-001.tar.Z. Thng tin chi tit nm trong cc bo co k thut, nm 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) , mt phin bn rt nh. Mt phin bn ca Ada ftp://ftp.cs.fsu.edu:/pub/PART/. C nhiu ti liu PostScript m bn c th hc c nhiu thng tin b ch v thread. Khng th s dng trc tip trong Linux.

Vui lng lin lc tc gi cc gi phn mm trn bit chi tit.

36

Nhng cu hi thng gp v Linux

H: C th tm lint cho Linux u : Tnh nng gn tng ng c ci sn trong GCC. Hy dng ty chn -Wall bt hu ht cc cnh bo b sung rt hu dng. Xem ti liu GCC bit chi tit (g F1-i trong Emacs v chn mc GCC). C mt phin bn khc gi l lclint thc hin nh lint. M ngun t ti ftp://larch.lcs.mit.edu/pub/Larch/lclint/ hoc http://lclint.cs.virginia.edu/ .

H: C th tm Kermit cho Linux u? : M ngun v chng trnh c ti ftp://kermit.columbia.edu. Trang ch ca d n Kermit i hc Columbia l http://www.columbia.edu/kermit/ .

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

H: C chng trnh ICQ no chy trong Linux khng? : Vi ICQ client c trn metalab.unc.edu (ftp://metalab.unc.edu). (Hy tham kho: FTP ca Linux u?) ICQ gc khng c Linux client, nhng c mt bn Java client ti http://www.mirabilis.com/download/ .

Gii php cho cc vn linh tinh thng thng


H: Ti sao FTP dng nh b treo? : FTP b cht t ngt thng do trn vng m. Trn cc h Linux, vn ny dng nh xut hin thng xuyn nht vi cc phn mm server trong cc bn phn phi. Nu bn nhn c li ftp: connection refused, thng l do thiu xc thc (authentication). Hy tham kho Ti sao FTP hoc Telnet server ca ti khng cho php ng nhp?. Mt gii php l thay th cc server FTP trong cc bn phn phi bng server FTP ca OpenBSD. Trang ch ca chng trnh l: http://www.eleves.ens.fr:8080/home/madore/programs/ . ci t server ny, hy theo cc ch dn ci t, v tham kho man page ca inetd v [inetd.conf]. (Nu bn cha quen xinetd, hy xem bn di.) Hy kim tra chc chn cho [inetd] bit cn chy BSD daemon c lp, khng phi l mt tin trnh con, v d nh l tin trnh con ca [tcpd]. Comment nhng dng bt u bng ftp trong tp tin [/etc/inetd.conf] v thay bng mt dng tng t nh sau (nu bn ci t bn [ftpd] mi trong [/usr/local/sbin/]):

37

Nhng cu hi thng gp 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 hot ng sau khi khi ng li inetd hoc gi tn hiu (vi quyn root) SIGHUP cho inetd, v.d.:
# kill -HUP inetd

cu hnh [xinetd], hy to mt mc trong [/etc/xinetd.d] per the instructions in the [xinetd.conf] manual page. Hy kim tra chc chn cc tham s cho [ftpd] l ng, v bn ci tp tin /etc/ftpusers v [/etc/pam.d/ftp]. Sau hy khi ng li [xinetd] bng lnh: /etc/rc.d/init.d/xinetd restart. Lnh ny s bo "OK", system message log s lu thng bo ny.

H: Ti sao free to core? : Vi Linux 1.3.57 tr i, dng thc ca /proc/meminfo b thay i nn free khng hiu. Hy ly phin bn free mi nht, t metalab.unc.edu, trong [/pub/Linux/system/Status/ps/procps-0.99.tgz].

H: Ti sao Netscape b hng thng xuyn? : Netscape kh b crash nu n c cu hnh ng, v cu hnh mng cng ng. Vi th cn kim tra l:

Hy kim tra bin mi trng MOZILLA_HOME xem c ng khng. Nu bn ci Netscape trong /usr/local/netscape/, v d, vy th cng l gi tr ca MOZILLA_HOME. Hy t bin mi trng bng dng lnh (v.d, "export MOZILLA_HOME="/usr/local/netscape"" trong bash hoc thm dng vo tp tin khi ng h thng hoc tp tin khi ng ca ngi dng. Hy tham kho man page ca shell bit cch dng lnh. Nu bn dng phin bn brand-new, hy th vi cc phin bn c hn, phng trng hp khng tng thch th vin run-time. V d, Netscape 4.75 c ci (g "netscape --version" ti du nhc shell), hy th ci bn 4.7. Mi phin bn c lu ti ftp://ftp.netscape.com/. Netscape dng th vin Motif v Java Runtime Environment (JRE) ring. Nu c mt phin bn khc ca cc th vin ny c ci trn my bn trc , hy m bo rng chng khng interfer with Netscapes libraries; v.d., bng cch g b chng. Hy chc chn rng Netscape c th kt ni ti name server mc nh ca n. Nu chng trnh c v ngng hot ng trong vi pht th c l l n khng kt ni c ti name server mc nh ca n, ngha l h thng khng th kt ni ti cc my khc.

38

Nhng cu hi thng gp v Linux H: Ti sao FTP hoc Telnet server ca ti khng cho php ng nhp? : Nhng iu sau y ch p dng cho cc server c tr li cho client, nhng li khng cho php ng nhp. Trn cc h thng mi c ci Pluggable Authentication Module (PAM), hy xem cc tp tin tn l [ftp] hoc [telnet] trong th mc /etc/pam/ hoc trong [/etc/pam.d/]. Nu tp tin tng ng khng tn ti, hy xem ch dn cu hnh xc thc FTP v Telnet v cc cu hnh PAM khc, t /usr/doc/pam-<version>]. Ngoi ra hy tham kho cu tr li cho "FTP ku rng: 421 service not available, remote server has closed connection.." Nu FTP server t trn mt h thng c, hy kim tra xem ti khon c dng c tn ti trong tp tin /etc/passwd hay khng, c bit l ti khon anonymous. Loi li ny c th do li phn gii a ch my, t bit nu bn dng Reverse Address Resolution Protocol (RARP). Cu tr li n gin l lit k ton b tn my c lin quan v a ch IP ca my vo trong tp tin /etc/hosts trn mi my. (Hy xem v d v tp tin /etc/hosts v [/etc/resolv.conf] ti: "Sendmail dng ti mt pht vi mi lnh.") Nu mng c DNS ni b, hy kim tra chc chn mi my c th phn gii a ch mng bng DNS . Nu my hon ton khng tr li FTP hoc Telnet client th c l daemon ca server c ci t khng ng, hoc cha ci t. Hy tham kho man page: inetd v inetd.conf trn cc h thng c, or xinetd v xinetd.conf, cng nh ftpd, v telnetd.

H: Lm sao theo di Bookmark trong Netscape? : iu ny c l p dng cho hu ht cc trnh duyt khc lun. Trong menu Preferences/Navigator, t trang ch ca Netscape l bookmarks.html, nm trong th mc .netscape (c du chm u). V d, nu tn ng nhp ca bn l smith, hy t trang ch l:
file://home/smith/.netscape/bookmarks.html

Thit lp trang ch nh trn s th hin mt trang bookmark p khi Netscape khi ng, v c t ng cp nht bt c khi no bn thm, xa hoc thm mt site no c bookmark.

H: Tai sao my tnh lu sai gi? : C hai ng h trong my tnh. ng h phn cng (CMOS) lun chy k c khi tt my. ng h ny c dng khi h thng khi ng v c dng bi DOS (nu bn dng DOS). Thi gian h thng, c hin th v sa i bng lnh date, c ht nhn qun l trong khi Linux ang chy. Bn c th hin th thi gian ca ng h CMOS, hoc t gi ca ng h ny nh ci cn li, bng /sbin/clock (by gi c gi l hwclock trong nhiu bn phn phi). Hy tham kho: man 8 clock hoc man 8 hwclock. C nhiu chng trnh khc nhau c th sa mt trong hai hoc c hai ng h for system drift hoc truyn thi gian xuyn mng. Vi chng trnh trong s c th c ci trn h thng ca bn. Hy th tm adjtimex (corrects for drift), cc client Giao thc Thi gian Mng (Network Time Protocol - NTP) nh netdate, getdate, v xntp, hoc b client server NTP nh chrony. Hy tham kho: Tm cc phn mm c bit nh th no?.

39

Nhng cu hi thng gp v Linux H: Ti sao script c setuid khng hot ng? : Chng khng c thit k hot ng c. Tnh nng ny c v hiu ha trong ht nhn Linux, v cc script c setuid rt d to ra l hng bo mt. Sudo v SuidPerl c th cung cp mt c ch an ton hn so vi cc script hoc chng trnh c setuid, c biu trong trng hp quyn thc thi c gii hn cho mt ngi dng hoc mt nhm ngi dng. Nu bn mun bit ti sao script c setuid to ra l hng bo mt, hy c FAQ ca comp.unix.questions.

H: Ti sao lng b nh trng (Free Memory) c bo co bi free ngy cng t? : Lng b nh trng in bi free khng tnh lng b nh c dng l vng m a, c hin th trong ct buffers. Nu bn mun bit thc s cn trng bao nhiu b nh, hy cng phn b nh trong buffers vo khong free. Cc phin bn free mi hn in dng thng tin m rng cha thng tin ny. Vng m a c khuynh hng tng nhanh sau khi Linux khi ng. Khi bn np chng trnh v c tp tin, chng s c cache. Tuy nhin lng cache s tr nn n nh sau mt khong thi gian.

H: Ti sao h thng chm i khi thm b nh? : y l triu chng thng thng khi gp li cch b nh b sung. Vn chnh xc ph thuc vo motherboard ca bn. i khi bn bt cache trn mt s vng nht nh trong thit lp BIOS. Hy xem li thit lp CMOS xem c ty chn no cache vng nh mi, m hin cha c bt khng. iu ny xy ra thng xuyn vi 486. i khi RAM phi c cm vo ng socket mi c th c cache. i khi bn phi t jumper bt cache. i khi motherboards khng cache ton b RAM nu bn c nhiu RAM trn mi lng cache hn d on. Thng full cache 256K s x l vn ny. Nu nghi ng, hy xem li ti liu. Nu bn vn khng th sa li v ti liu khng thch hp, bn c th gi thng bo ln comp.os.linux.hardware, cung cp y thng tin chi tit, s model, date code, ..., nh ngi khc c th trnh dng n.

H: Ti sao vi chng trnh (v.d. xdm) khng cho php ng nhp? : C l bn dng chng trnh dng mt khu non-shadow trong khi bn li ang dng mt khu shadow. Nu th, bn cn phi ly mt phin bn mi dng mt khu shadow v bin dch li. B chng trnh mt khu shadow t ti ftp://tsx-11.mit.edu:/pub/linux/sources/usr.bin/shadow/. l m ngun. M nh phn c l trong [linux/binaries/usr.bin/].

40

Nhng cu hi thng gp v Linux H: Ti sao vi chng trnh cho php ng nhp khng cn mt khu? : C l bn gp vn nh (Ti sao vi chng trnh (v.d. xdm) khng cho php ng nhp?), cng thm vi th khc. Nu bn dng mt khu shadow, bn nn thm k t x hoc mt du sao vo trng mt khu ca mi ti khon trong tp tin /etc/passwd, nh nu mt chng trnh no khng bit mt khu shadow, n s khng ngh rng l ti khon khng c mt khu ri cho php ng nhp t do.

H: Ti sao my chy rt chm vi GCC / X / ...? : C l do bn c qu t b nh. Nu bn c t RAM hn lng cn thit cho cc chng trnh bn ang chy, Linux s swap a cng ca bn v chy chm kinh khng. Gii php trong trng hp ny l ng chy cng lc qu nhiu chng trnh hoc mua thm RAM. Bn cng c th tng b nh bng cch bin dch ht nhn vi t ty chn hn. Hy xem (Lm th no nng cp/bin dch li ht nhn) Bn c th bit ang dng bao nhiu b nh v vng hon i bng lnh free, hoc bng cch g:
$ cat /proc/meminfo

Nu ht nhn ca bn c cu hnh vi RAM disk, c th iu lm ph phm b nh v lm cho h thng chm i. Hy dng LILO hoc rdev bo ht nhn ng to RAM disk (hy xem ti liu LILO hoc g man rdev).

H: Ti sao h thng ch cho php ng nhp root? : C th bn ang gp vn v quyn truy cp, hoc bn c tp tin /etc/nologin. Trong trng hp sau, hy t dng rm -f /etc/nologin vo tp tin [/etc/rc.local] hoc [/etc/rc.d/*] ca bn. Trong trng hp khc, hy kim tra li quyn truy cp ca shell ca bn v bt k tp tin no xut hin trong thng bo li, v c cc th mc cha nhng tp tin cho ti th mc gc.

H: Ti sao mn hnh y nhng k t k l? : C l do bn l gi d liu nh phn ra mn hnh. Hy g echo -e \ec sa li. Nhiu bn phn phi c lnh reset lm cng vic tng t. Nu vn khng c, hy th gi lnh escape trc tip ra mn hnh.
$ echo Ctrl-V Ctrl-O

Vic ny phc hi font mc nh ca console. Nh gi phm Control v g k t thay v n phm Control, bung ra, ri mi g k t. Chui lnh

41

Nhng cu hi thng gp 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, nhn Ctrl-C vi ln phc hi du nhc shell. Lnh khc c th dng l mt b danh15, sane, c th lm vic vi cc terminal thng thng:
$ alias sane=echo -e " c";tput is2; > stty sane line 1 rows $LINES columns $COLUMNS

Lnh trn dng du nhy ngc (k bn phm s 1), khng phi nhy n. Xung hng ch cho r rng, khng cn thit phi lm nh vy. Hy bo m rng $LINES v $COLUMNS c nh ngha trong [~/.cshrc] hoc [~/.bashrc] bng mt lnh ging nh lnh sau:
$ LINES=25; export $LINES; $COLUMNS=80; export $COLUMNS

t $LINES v $COLUMNS ng bng s dng v s ct ca terminal ca bn. Cui cng, u ra ca stty -g c th c dng to shell script reset terminal: 1. Lu kt qu u ra ca stty -g vo tp tin. Trong v d ny, tp tin l termset.:
$ stty -g >termset

Kt qu ca stty -g (ni dung ca [termset]) s trng ging 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. Sa [termset] thnh shell script bng cch thm interpreter v lnh 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 quyn thc thi cho termset v dng nh mt shell script:


$ chmod +x termset $ ./termset

H: Nu ti quy h thng v khng th ng nhp c th lm th no khc phc? : Bn to a mm khn cp ri, phi khng? Hy khi ng t a mm . V d, cp a mm ca Slackware (gm a khi ng v a root) nm trong th mc install ca bn phn phi Slackware.

42

Nhng cu hi thng gp v Linux : Ngoi ra cn c hai gi phn mm t to a khn cp ftp://metalab.unc.edu/pub/Linux/system/Recovery/. Nhng ci ny tt hn v chng cha lun ht nhn trn a, v th bn khng phi lo nguy c thiu cc thit b v h thng tp tin. Hy m shell v gn kt a cng bn bng dng lnh tng t nh
$ mount -t ext2 /dev/hda1 /mnt

Sau h thng tp tin ca bn s c gn vi th mc /mnt v bn c th sa li. Hy nh tho gn kt a cng trc khi khi ng li (cd ra ngoi trc, nu khng n s bo busy).

H: iu g s xy ra nu ti qun mt khu root? :

Cnh bo
Mt sai phm trong vic hiu chnh nhng tp tin trong th mc /etc c th lm hng h thng bn. Hy to mt bn sao ca bt c tp tin no bn nh sa phng sai st.

Nu bn phn phi ca bn cho php khi ng ch ngi dng n (single-user), hy th khi ng ch ny bng cch g single ti du nhc BOOT lilo:. Nhiu bn phn phi gn y cho php khi ng ch ngi dng n bng cch g linux 1, linux single, hoc init=/bin/bash. Nu cch trn khng c, hy khi ng t a ci t hoc a mm, v chuyn sang console o khc bng Alt-F1 -- Alt-F8, v sau gn kt h thng tp tin gc vo /mnt. Sau thc hin nhng bc di y xc nh xem h thng bn dng mt khu chun hy mt khu shadow, v lm cch no b mt khu. Dng trnh son tho a thch ca bn sa mc root trong tp tin /etc/passwd b mt khu. Mt khu c t gia du hai chm u v du hai chm th hai. Ch lm vy tr khi trng mt khu ch cha mt k t x. Trong trng hp , hy xem bn di
root:Yhgew13xs:0:0: ...

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

Nu mt khu ch cha mt k t x, bn phi b mt khu trong tp tin /etc/shadow, c cng dng thc vi tp tin /etc/passwd. Hy tham kho man page: man passwd, v man 5 shadow.

43

Nhng cu hi thng gp v Linux H: u l l hng bo mt nghim trng ca lnh rm!?!?! : Khng c. R rng bn c l lm vi cc h iu hnh h Unix v cn c mt cun sch hiu mi th hot ng ra sao. u mi: kh nng xa tp tin ph thuc vo quyn truy cp ghi ca th mc . H: Ti sao lpr v/hoc lpd khng hot ng? : Trc ht, hy kim tra chc chn [/dev/lp*] c cu hnh ng. IRQ v a ch cng cn phi ng vi cc thit lp trn card my in. Bn s c th xut mt tp tin trc tip ra my in:
$ cat the_file >/dev/lp1

Nu lpr a ra thng bo nh myname@host: host not found, c ngha l c kh nng giao din loopback, lo, khng hot ng. H tr loopback c trong hu ht cc bn phn phi ca ht nhn. Hy kim tra xem giao din ny c cu hnh ng khng bng lnh ifconfig. Theo quy c, a ch mng s l 127.0.0.0 v a ch my cc b l 127.0.0.1. Nu mi th c cu hnh ng, bn s c th telnet ti chnh my bn v c th ng nhp thng qua telnet. Hy kim tra chc chn [/etc/hosts.lpd] cha tn my ca bn. 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 liu u?.

H: Ti sao Timestamps tn tp tin trn partition MS-DOS khng ng? : C mt li trong chng trnh clock (thng c t trong /sbin). N m thiu mt mi gi, ln lt giy vi pht hoc vi th khc. Hy dng phin bn mi hn. H: Lm th no LILO khi ng kernel image? : T phin bn ht nhn 1.1.80 tr i, cc kernel image nn, c dng bi LILO, t ti [arch/i386/boot/zImage], hoc [arch/i386/boot/bzImage] khi c to ra, v thng c lu trong th mc /boot/. Tp tin [/etc/lilo.conf] thng dng lin kt biu tng vmlinuz symbolic link, khng phi l kernel image tht s. iu ny c thay i vic to kernel cho cc b x l khc nhau d dng hn t mt source tree.

H: Lm th no bo m h thng s khi ng sau khi ci t li h iu hnh? : Ch dn ny s lm vic bt k bn ci t li Linux hay cc h iu hnh khc:

t a trng, nh dng vo a A: Lu bn sao ca Master Boot Record (MBR) ca a cng vo a mm bng lnh:
# dd if=/dev/hda of=/dev/fd0 count=1 dd l mt chng trnh chun trn h thng Linux. Phin bn cho MS-Windows c ti

ftp://ftp.gnu.org/, cng nh ti nhiu MS software archive khc.

44

Nhng cu hi thng gp v Linux

Kim tra xem a mm c khi ng h thng khng, bng cch khi ng li h thng khi vn a trong a A:. Sau bn c th ci t h iu hnh khc (trn a cng khc v/hoc trn partition khc, nu bn khng mun g b Linux). Sau khi ci t, hy khi ng Linux bng a mm v ci t li MBR bng lnh: /sbin/lilo.

H: Ti sao card PCMCIA ca ti khng hot ng sau khi nng cp ht nhn? : Mun dch v Card PCMCIA, nm trong /lib/modules/version/pcmcia, vi version l phin bn ca kernel, dng thng tin cu hnh ring cho kernel image. Cc mun PCMCIA s khng hot ng vi kernel khc. Bn cn nng cp mun card PCMCIA khi nng cp kernel. Khi nng cp t kernel c, chc rng bn c phin bn th vin run-time, gi module, .. mi nht (hoc kh mi). Tham kho tp tin Documentation/Changes trong m ngun kernel bit chi tit.
Quan trng: Nu bn dng Dch v Card PCMCIA, ng bt ty chn Network device support/Pocket v portable adapters trong menu cu hnh kernel, v n xung t vi cc mun trong Dch v Card PCMCIA.

Bit cc mi lin h mun PCMCIA trong kernel c rt hu dng. Bn cn lu thng tin li. V d, nu card PCMCIA ca bn ph thuc vo thit b cng tun t c ci t bng mun trn kernel c, bn cn m bo mun tun t cng c trong kernel mi lun.

H: Lm th no loi b (hoc thay i) mu sc trong cch hin th ca lnh ls? : Nu ls ang hin th mu v bn khng mun th, c l bn ang dng alias ca lnh ny. Vi bn phn phi mc nh dng cch ny. Lnh shell, unalias ls, s b alias m bn phn phi dng. dng lu di, hy sa script khi ng ca bn, .bashrc.

: thay i mu sc hn l b mu, hy xem man page ca ls man page (man ls). H: Ti sao chng trnh khng hot ng trong th mc hin thi? : V th mc hin thi khng nm trong ng dn tm kim, v l do bo mt, cng nh m bo bn dng bn dng ng phin bn ca cc chng trnh. Nu mt k xm nhp c th to mt tp tin (mt chng trnh) trong th mc cng cng, nh /tmp, ngi s c th chy chng trnh nu n nm trong ng dn tm kim. Gii php cho vn ny l gp c th mc khi gi lnh; v.d., dng ./myprog, thay v myprog. Hoc l thm th mc hin thi vo bin mi trng PATH; v.d., export PATH=".:"$PATH trong bash, mc d cch ny khng c khuyn khch v l do nu trn.

45

Nhng cu hi thng gp v Linux

Lm iu ny nh th no hoc tm hiu ci kia ra sao...


H: Lm th no bit Notebook c ang chy 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 liu 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 bi the vger.redhat.com server. (Refer to Mailing List u?) A mailing list for Linux on IBM Thinkpads has its home page ti http://www.topica.com/lists/linux-thinkpad/ . Another Thinkpad mailing list is hosted bi 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 ti http://peipa.essex.ac.uk/tp-linux/ . The Linux Laptop home page is ti 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, ti http://www.torque.net/linux-pp.html. If you need the latest version of the PCMCIA Card Services package, it is (or was) located ti ftp://cb-iris.stanford.edu/pub/pcmcia/, but that host no longer seems to be available. Recent nhng bn phn phi 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 bn phn phi.

H: Lm th no ci t Linux bng FTP? : Most nhng bn phn phi 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 bn phn phi 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 ti 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

Nhng cu hi thng gp 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 bi pressing Enter ti 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 tip tc ti v sau khi b ngt kt ni 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

Nhng cu hi thng gp v Linux H: Lm th no t cu hnh lc khi ng? : You can configure Linux ti the lilo: prompt either bi typing the kernel arguments ti the
BOOT lilo: prompt, or bi adding an append= directive to the [/etc/lilo.conf] file; for example: # ti 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 bn phn phi, [/usr/src/linux/Documentation] in most nhng bn phn phi. Refer to the lilo v [/etc/lilo.conf] manual pages, as well as the LDP BootPrompt-HowTo (Ti liu u?), v the documentation in [/usr/doc/lilo].

H: Lm th no nh dng Man Pages khng cn man hoc 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

Nhng cu hi thng gp v Linux H: Lm th no cun ngc mn hnh trong ch vn bn : 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 bi reducing the total number of VCs. See [linux/tty.h]. Chris Karakas

H: Lm th no c th s dng 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 ti ftp://rtfm.mit.edu/pub/usenet/.

H: Sendmail dng ti mt pht vi mi lnh : 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

Nhng cu hi thng gp v Linux

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

Thn trng
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 bi 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 nhng bn phn phi, 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 chn 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 ti 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

Nhng cu hi thng gp 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: Cu 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, ti the very minimum, are installed correctly. In most current nhng bn phn phi, 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

Nhng cu hi thng gp 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

Nhng cu hi thng gp 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 ti the [/var/log/ppp.log] file to determine what happened. You can also view the log as the connection is being made, bi 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

Nhng cu hi thng gp 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 ti 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 ca Linux u?) (Ti liu u?)

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


$ uname -a

H: Tp tin [core] l g? : Tp tin core c to khi mt chng trnh kt thc bt thng, v chng trnh c li, hoc v vi phm c ch bo v ca phn cng hoc ca h iu hnh. H iu hnh s buc chm dt chng trnh v to tp tin [core], nh lp trnh vin c th hnh dung ra ci g sai. Tp tin cha m t chi tit trng thi ca chng trnh khi b buc chm dt. Nu bn mun bit tp tin core ca chng trnh no, hy dng lnh file nh sau:
$ file core

Lnh ny s cho bn bit tn chng trnh to 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 bt hoc tt to core? : Hy dng lnh ulimit trong bash, lnh limit trong tcsh, hoc lnh rlimit trong ksh. Xem trang man tng ng bit chi tit. This setting affects all programs run from the shell (directly or indirectly), not the whole system.

54

Nhng cu hi thng gp v Linux If you wish to enable or disable core dumping for all processes bi 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 nhng bn phn phi this parameter is configurable in the /etc/security/limits.conf file. For more information, refer to the Linux Administrators Security Guide. (Ti liu u?)

H: Lm th no nng cp/bin dch li ht 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 ca 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 bn phn phi 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 ti 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

Nhng cu hi thng gp v Linux Also refer to the questions, Ti sao card PCMCIA ca ti khng hot ng sau khi nng cp ht nhn? v Lm th no LILO khi ng kernel image?

H: Can Linux Use More than 3 Serial Ports bi 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: Cu hnh thit lp mc 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 ti 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

Nhng cu hi thng gp v Linux H: Lm th no to a cp cu (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 ti 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, bi Andries Brouwer, ti ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/.

H: Lm th no n NUM LOCK mc nh l bt : 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 (hoc khi ng li) mu ban u ca 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

Nhng cu hi thng gp 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 li khi lin kt chng trnh vi cc hm ton hc : 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

Nhng cu hi thng gp v Linux

Thng tin linh tinh v cc cu hi c tr li


H: Lm th no lm cho chng trnh XYZ chy c trong Linux? : Hy c ti liu, hoc mt cun sch hay v Unix v man page (g man man). Ngoi ra cn c nhiu ti liu theo dng GNU Info. Hy chy Emacs v g F1-i, hoc g info info nu bn khng c hoc khng thch Emacs. Ch rng nt libc c th khng m t ng phin bn libc mi nht ca Linux, hoc GNU glibc2. Nhng d n GNU v LDP lun tm ngi tnh nguyn cp nht ti liu ny. Cho d bn xem man page (phn 2 v 3) hay info page th vn thng tin khi u. Cng nh mi phn mm t do, ti liu tt nht chnh l m ngun. Phin bn mi nht ca man page, b ti liu GNU Info, v nhng thng tin khc lin quan n lp trnh, c th c tm thy metalab.unc.edu/pub/Linux/docs/man-pages/.

H: ELF l g? glibc l g? : Hy xem ELF HOWTO ca Daniel Barlow. Ch rng y khng phi l ti liu [chuyn qua ELF], c vit nng cp sang ELF th cng. Linux c hai dng thc khc nhau cho tp tin thc thi, tp tin i tng, v cc th vin, l ELF. (Dng thc c gi l a.out.) Chng c nhiu u im, bao gm kh nng h tr th vin dng chung v lin kt ng tt hn. C tp tin a.out v ELF u c th cng tn ti trn h thng. Tuy nhin, chng dng th vin C khc nhau, c hai th vin u phi c ci t. Nu bn mun bit h thng c dng ELF hay khng, hy tm trong /lib mt tp tin tn l [libc.so.5]. Nu c, c th bn c cc th vin ELF. Nu bn mun bit bn ci t ca bn c phi l ELF hay khng, hy chn mt chng trnh, gi s ls, v chy lnh 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 mt bn patch Linux 1.2.x c th dng trnh bin dch ELF, v to ra core dump ELF, t ti ftp://tsx-11.mit.edu/pub/packages/GCC/. Bn khng cn patch ny chy cc chng trnh dng ELF. Linux 1.3.x v sau nay hon ton khng cn patch ny. Th vin GNU glibc2 cn thit cho nhng phin bn ca cc th vin ELF gn y cho php lin kt ng v np ng. Thng tin nng cp t ti (Lm sao cp nht th vin m khng lm hng h thng?)

H: Lm th no xc nh gi phn mm no c ci trn h thng : Vi cc gi phn mm dng RPM, hy dng lnh:


$ rpm -qa

59

Nhng cu hi thng gp v Linux

Bn c th cn quyn root. Bn c th lu kt qu vo tp tin vn bn tham kho v sau bng lnh:


$ rpm -qa >installed-packages

Vi h thng Debian, lnh tng ng l:


$ dpkg -l

H: Tp tin .gz l g? cn tp tin.tgz? v tp tin .bz2? V... ? : Tp tin.gz (v .z) c nn bng chng trnh GNU gzip. Bn cn dng gunzip (tht ra l mt symlink ti lnh gzip) gii nn.
.taz, .tar.Z, v .tz l tp tin tar (c to ra bng lnh tar) v c nn bng compress. Lnh

compress trong cc h *nix chun l phn mm proprietary, nhng cng c nhng phin bn free nh ncompress.
.tgz (hoc .tpz) l tp tin tar nn bng gzip. .bz2 l tp tin c nn bng chng trnh bzip2 (mi xut hin gn y, v hiu qu hn). .lsm l cc mc trong Bn Phn mm Linux (Linux Software Map), theo dng nhng on text ngn. Chi tit v d n LSM c ti ftp://metalab.unc.edu/pub/Linux/docs/. .deb l Gi Nh phn Debian (Debian Binary Package) - mt dng thc gi phn mm c dng bi

Debian GNU/Linux. N dng chng trnh dpkg v dpkg-deb (c trn h thng Debian v ti ftp://ftp.debian.org/).
.rpm l gi phn mm Red Hat, c dng trong Red Hat Linux v nhng bn phn phi tng t. .sit l compressed Macintosh archive c to bng StuffIt, mt chng trnh thng mi. Aladdin

Systems Inc., nh sn xut ca StuffIt, c mt tin ch gii nn free gii nn nhng tp tin ny. Bn c th ti n v t http://www.aladdinsys.com/expander/ . Lnh file thng cho bn bit tp tin l loi tp tin g. Nu bn thy gzip bo li khi bn gii nn mt tp tin, c l bn ti tp tin trong ch ASCII, trong khi phi ti trong ch BINARY. Bn phi ti li trong ch binary.

H: VFS ngha l g? : H thng tp tin o (Virtual File System - VFS). y l mt lp abstract phn cch ngi dng v cc h tp tin thc nh ext2, Minix v MS-DOS. Cng vic ca n bao gm vic xa vng m c khi pht hin c thay i trn a.
VFS: Disk change detected on device 2/0

60

Nhng cu hi thng gp v Linux

H: BogoMip l g? : BogoMips l t ghp gm Gi (Bogus) v Mips. MIPS l (ty thuc vo ngi bn hi) S triu ch th trong mt giy (Millions of Instructions per Second), hoc Ch th v ngha ca tc b x l (Meaningless Indication of Processor Speed). Con s hin th khi khi ng my l kt qu ca vic kernel timing calibration, c dng cho nhng vng lp ch cc ngn trong vi driver thit 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 liu. AMD Athlon Cha d liu. IBM S390 Cha d liu. 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

Nu s ny nh bt thng, c l bn t nt Turbo hoc t tc CPU khng ng, hoc do vn cache (xem Ti sao h thng chm 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 liu u?)

61

Nhng cu hi thng gp v Linux Wim van Dorst

H: C nhng t bo/tp ch Online/Free no cho Linux khng? : C mt 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 tc v cc kin lin quan n Linux, cp nht hng ngy. Linux Weekly News. http://lwn.net. Tin tc v Linux, cp nht hng tun. Slashdot. http://www.slashdot.org. Tin tc v free software v vn ha. Freshmeat. http://www.freshmeat.net/ . Thng bo phn mm mi v phn mm c cp nht cho Linux v cc h iu hnh khc.

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

H: C bao nhiu ngi s dng Linux? : Linux c s dng t do, v khng mt ai cn phi ng k c th s dng Linux, v th nn rt kh bit c c bao nhiu ngi s dng Linux. Vi hot ng tn ti ch nh vo vic bn v h tr Linux. Cc nhm tin Linux l mt trong nhng nhm hot ng tch cc nht trn Usenet. Rt kh c con s chnh xc, nhng s lng trong khong vi triu ti hng chc triu. Tuy nhin, mi ngi c th ng k nh l ngi s dng Linux ti d n Linux Counter, tn ti t nm 1993. n thng 10 nm 2002, d n ny cho bit c 135263 ngi dng Linux v d on s ngi dng Linux trn ton th gii vo khong t 2,7 triu n 67,6 triu ngi. Hy xem chi tit ti http://counter.li.org/ v in vo mu ng k. Nu bn khng dng Web, hy gi email n counter@counter.li.org (mailto:counter@counter.li.org) vi dng Ch l, I use Linux at home (Ti dng Linux trong nh), hoc I use Linux at work. (Ti dng Linux trong c quan). Con s thng k c gi hng thng ln comp.os.linux.misc, v lun c sn trn Web. Harald Tveit Alvestrand

: Nm 1999, Tp on D liu Quc t (International Data Corporation) pht hnh bn d bo thng mi u tin cho Linux sales. Bn bo co xc nh Linux vendor sales trong nm 1996, 1997, v 1998, v d bo ti nm 2003. c bn bo co, hy lin h IDC tictoffel@idc.com (mailto:ctoffel@idc.com). Trang Web ca h l http://www.itresearch.com/ .

62

Nhng cu hi thng gp v Linux H: Bn phn phi no l tt nht : Ci tt nht lun ty thuc vo quan im ca tng ngi. Chuyn tho lun ci tt nht nh vy thng xy ra trn Usenet. Hu ht l nhng cuc tranh lun d di. Answering is generally a waste of time. Bn hy th t nh gi kim tra trn my bn xem. Cch tt hn din t cu hi l: T c th tm .... u?

H: Pht m ch Linux nh th no? : Cu hi ny thng to ra nhng cuc tranh lun d di. Nu bn mun bit chnh Linus pht m Linux nh th no, hy ti tp tin [english.au] hoc [swedish.au] ti ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/SillySounds/. Nu bn c sound card hoc driver cho loa PC, bn c th nghe bng cch g
$ cat english.au >/dev/audio

S khc nhau khng phi bi cch pht m Linux m l cch Linus ni, hello. Vi nhng ngi khng c phng tin nghe: Linus pht m Linux gn ging vi Leenus, trong ee c pht m nh feet, nhng ngn hn, v u th ging nh eu trong tin Php nhng ngn hn (vd peur - pht m nh u trong put cng tm c).

Cc thng bo li thng gp
H: Modprobe khng th nh v mun, XXX , v nhng thng bo tng t : Nhng loi thng bo ny thng xy ra vo thi im khi ng hoc tt my. Nu modprobe, insmod, hoc rmmod than phin v vic khng th tm thy mun, hy thm dng sau vo tp tin [/etc/modules.conf] hoc [/etc/modutils/aliases] (to mi nu cha c).
$ alias <module-name> off

V dng tn ca mun xut hin trong thng bo li.

H: Unknown Terminal Type linux v nhng th tng t : Trong cc ht nhn c, terminal console mc nh c i t console sang linux. Bn phi sa [/etc/termcap] thay i line reading:
console|con80x25:

63

Nhng cu hi thng gp v Linux thnh


linux|console|con80x25:

(c th c dumb y - nu c th hy xa n.) b son tho lm vic, bn cn g:


$ TERM=console

(vi bash v ksh), hoc


$ setenv TERM console

vi csh hoc tcsh. Vi chng trnh dng [/usr/lib/terminfo] thay v [/etc/termcap]. Vi nhng chng trnh ny, bn nn nng cp gi terminfo, mt thnh phn ca ncurses. Tng t i vi X terminal. Nu bn phn phi ca bn t TERM mt gi tr l nh xterm-24-color, bn c th n gin phc hi gi tr chung bng lnh:
$ TERM="xterm"; export TERM

H: INET: Warning: old style ioctl... called! : Bn ang c dng cc tin ch cu hnh mng c. Nhng phin bn mi c ti ftp.linux.org.uk/pub/linux/Networking/PROGRAMS/NetTools/ (ch c m ngun 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 : Bn ang dng phin bn ld c. Hy ci gi binutils mi hn, cha bn nng cp cho ld. Hy tm [binutils-2.6.0.2.bin.tar.gz] trn tsx-11.mit.edu ti [/pub/linux/packages/GCC/] . H: GCC ni Internal compiler error. : If the fault is repeatable (i.e., it always happens ti 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

Nhng cu hi thng gp 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: (Ti sao my chy rt chm vi 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 cp/bin dch li ht 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 ti 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 bi 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, (Nu ti quy h thng v khng th ng nhp c th lm th no khc phc?) 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 cp/bin dch li ht 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

Nhng cu hi thng gp 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 bi getting a new version of route from the same place as the kernel source code. (Lm th no nng cp/bin dch li ht 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 ca 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 nhng bn phn phi 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 bi 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] ti the time of writing) from the usual sites. (FTP ca 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(Cnh bo EXT2-fs: n lc phi kim tra) : Kernels from 1.0 onwards support checking a file system based on the elapsed time since the last check as well as bi the number of mounts. Get the latest version of the ext2fs utilities. (EXT2-fs warning: maximal count reached) H: df ku rng, Cannot read table of mounted file systems(Khng th c bng h thng tp tin gn kt). : 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 ti boot time (in [/etc/rc.local] or [/etc/rc.d/*]), using something like
$ rm -f /etc/mtab*

66

Nhng cu hi thng gp v Linux Some old Linux nhng bn phn phi have an entry for the root partition in [/etc/mtab] made in [/etc/rc*] bi using rdev. That is incorrectthe newer versions of mount do this automatically. Some old nhng bn phn phi 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 rng, 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 vic vi a ca ti?)

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


bt u ti 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 bi 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

Nhng cu hi thng gp v Linux H: Tin ch Mtools ni rng khng th khi 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 cp/bin dch li ht nhn) H: The System Log ku rng, 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: Bn khng tn ti. 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

Nhng cu hi thng gp 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

Nhng cu hi thng gp 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 rng: 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 ti login. FTP servers in current nhng bn phn phi 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

Nhng cu hi thng gp 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 bi XFree86. See the XFree86 HOWTO for more details. Most Linux nhng bn phn phi 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 hot 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 bi 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

Nhng cu hi thng gp v Linux H: Tm tp tin [XF86Config] c sn 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 bi 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 ti 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 ti the Linux Laptop Web page (Lm th no bit Notebook c ang chy 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 ti 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 bn phn phi.

H: Mi trng ha no chy 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 nhng bn phn phi. As a starting point, download v installation information is available ti 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

Nhng cu hi thng gp 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 khi 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: Nu ti liu ny vn cha tr li cu hi ca bn.... : Vui lng c tt c cu tr li trc khi hi. ng l hi di, nhng bn s bin mnh thnh mt thng ngc tr trc 50.000 ngi v ph phm hng trm gi ca h. Bn khng ngh nn b thi gian c v lm theo nhng ch dn ny? Nu bn ngh c mt cu tr li cha hon chnh hoc khng chnh xc, vui lng gi th n pclouds@users.sourceforge.net (mailto:pclouds@users.sourceforge.net). Hy c nhng cun sch Linux Documentation Project thch hp. Hy tham kho: (Ti liu u?) Nu bn cn l lm vi Unix hoc Linux, hy c FAQ ca comp.unix.questions, news.announces.newusers, v bt 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.

73

Nhng cu hi thng gp 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 bi 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: Cn ghi g khi yu cu gip : Vui lng c nhng li khuyn sau mt cch cn thn bit cch gi th gip . To mt thng ip hon chnh s tng mt cch ng k kh nng mt chuyn gia hoc mt ngi dng khc c thng tin v ng lc tr li bn. This advice applies both to postings asking for advice v to personal E-mail sent to experts v fellow users. Hy m bo bn a ra thng tin y , chi tit v vn , bao gm:

Bn gp vn vi chng trnh no. Bao gm s phin bn nu bit v ni ly n. Nhiu lnh chun s cho bn bit s phin bn nu bn dng ty chn --version vi chng trnh . Bn phn phi bn ang dng (Red Hat, Slackware, Debian, hoc bt k ci g khc) v phin bn ca bn phn phi . Ghi chnh xc v y cc thng ip li. M t chnh xc nhng g bn lm v nhng g quan st thy. A transcript of an example session is a good way to show this. Ni dung cc tp tin cu hnh c dng bi chng trnh c hi v cc chng trnh lin quan. What version of the kernel v shared libraries you have installed. The kernel version can be found bi typing uname -a, v the shared library version bi typing ls -l /lib/libc*. Chi tit v phn cng bn dng, nu thy cn thit.

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

Nhng cu hi thng gp v Linux Ghi dng Ch r rng, chi tit.ng ghi kiu n khng chy, Linux, gip vi, hoc cu hi nu bn bit 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 ti the top of your posting. At the bottom of your posting, ask for responses bi email v say youll post a summary. Back this up bi 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 bi 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 li ca bn : 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 bn phn phi, 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 thng tp tin mng 9. khng tm thy k hiu ca vng nh o 10. tng cng - s dng - cn trng :

75

Nhng cu hi thng gp v Linux 11. bootable devices 12. dynamic library loader 13. shared library 14. symbolic link 15. alias

76

You might also like