Linux \۷jA@ɤڭ̤]LkЩҦOAoӳ`DnتbФ@DZ`OӤwCܩCӫOԲӥγ~NbA[]ɡA̷ӫOʨӶi满CMAboӳ`DnتObNҦOJb@_AeAѰաI |
[root@test
test]# ifconfig interface
[root@test test]# ifconfig interface [options] ѼƻG interface GdNAҦp eth0, eth1... options GDnHUXӰѼ @@@network Gq @@@broadcast Gsq @@@netmask GlBn @@@up|down GҰ| dҡG [root@test root]# ifconfig # oӫObS[WdɡA|NҦeܥX eth0 Link encap:Ethernet HWaddr 00:50:FC:22:9C:57 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5793395 errors:0 dropped:0 overruns:0 frame:0 TX packets:6032143 errors:0 dropped:0 overruns:0 carrier:0 collisions:983 txqueuelen:100 RX bytes:534796148 (510.0 Mb) TX bytes:2607882970 (2487.0 Mb) Interrupt:10 Base address:0x6100 @ lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3258 errors:0 dropped:0 overruns:0 frame:0 TX packets:3258 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:170063 (166.0 Kb) TX bytes:170063 (166.0 Kb) @ [root@test root]# ifconfig eth0 192.168.0.2 netmask 255.255.255.0 \ > broadcast 192.168.0.255 WAN eth0 oӺ IP ݩʭקאּ 192.168.0.2 o IP As}]ۧܤFI [root@test root]# ifconfig eth0 # Nק粒NNܥXӤ@UI eth0 Link encap:Ethernet HWaddr 00:50:FC:22:9C:57 inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5793395 errors:0 dropped:0 overruns:0 frame:0 TX packets:6032143 errors:0 dropped:0 overruns:0 carrier:0 collisions:983 txqueuelen:100 RX bytes:534796148 (510.0 Mb) TX bytes:2607882970 (2487.0 Mb) Interrupt:10 Base address:0x6100 @ [root@test root]# ifconfig eth0 down <== eth0 d [root@test root]# ifconfig eth0 up <==Ұ eth0 dI |
[root@test
root]# ifup [interface]
[root@test root]# ifdown [interface] ѼƻG dҡG [root@test root]# ifup eth0 <==Ұ eth0 odI [root@test root]# ifdown eth0<== eth0 od |
[root@test
root]# route [-nee]
[root@test root]# route add [-net|-host] ؼХDκ [netmask] [gw|dev] [root@test root]# route del [-net|-host] ؼХDκ [netmask] [gw|dev] ѼƻG -n@@@GCXTH IP -ee@@ GCXCT add@@ GW[ѸT del@@ GR@ӸѸT -net@@GW[@ӡyzѡAҦp C Class I -host @GW[Y IP DѡI netmask GNO netmask rI gw @@ GoӬOѪqThI gw OH IP ӫظm dev @@GoӬOѪqThI dev OH ( internet ) NӫظmI dҡG [root@test root]# route<==ݸѪTI Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 140.116.141.253 * 255.255.255.255 UH 0 0 0 ppp0 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 140.116.141.253 0.0.0.0 UG 0 0 0 ppp0 @ [root@test root]# route -n <==H IP 觋ܸѡI Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 140.116.141.253 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 140.116.141.253 0.0.0.0 UG 0 0 0 ppp0 `N route, route -n oӽdҳIϥ -n P_| domain O_idߡA @ӻAڳw[W -n A]hdߥϸѡAܳt֡A ~A default gateway NO 0.0.0.0 I @ [root@test root]# route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0 # sW@ӸѳWhI @ [root@test root]# route del -net 192.168.0.0 netmask 255.255.255.0 dev eth0 # R@Ӹo @ [root@test root]# route add default gw 192.168.1.2 # W[@ default gateway OI `N@UA gw ᭱O IP A dev ᭱hO˸mNI |
[test@test
test]# ping [-b broadcast]
[test@test test]# ping [-c number] host ѼƻG -b broadcast Gn ping @ӺqɡAiHϥγoӤ觋ӡyszI -c number G᭱[W number (Ʀr)iH ping XI dҡG [test@test test]# ping -c 5 tw.yahoo.com <==FIP]iH ping domain nameI PING tw.yahoo.com (202.1.237.21) from 61.28.113.1 : 56(84) bytes of data. 64 bytes from tw.yahoo.com (202.1.237.21): icmp_seq=0 ttl=245 time=7.133 msec 64 bytes from tw.yahoo.com (202.1.237.21): icmp_seq=1 ttl=245 time=7.497 msec 64 bytes from tw.yahoo.com (202.1.237.21): icmp_seq=2 ttl=245 time=6.625 msec 64 bytes from tw.yahoo.com (202.1.237.21): icmp_seq=3 ttl=245 time=6.457 msec 64 bytes from tw.yahoo.com (202.1.237.21): icmp_seq=4 ttl=245 time=6.434 msec @ --- tw.yahoo.com ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/mdev = 6.434/6.829/7.497/0.421 ms @ [test@test test]# ping -b 192.168.1.255 -c 2 <==o̥Os} WARNING: pinging broadcast address PING 192.168.1.255 (192.168.1.255) from 192.168.1.254 : 56(84) bytes of data. 64 bytes from 192.168.1.36: icmp_seq=0 ttl=255 time=191 usec 64 bytes from 192.168.1.45: icmp_seq=0 ttl=255 time=492 usec (DUP!) 64 bytes from 192.168.1.254: icmp_seq=0 ttl=255 time=531 usec (DUP!) @ --- 140.116.44.255 ping statistics --- 2 packets transmitted, 2 packets received, +6 duplicates, 0% packet loss round-trip min/avg/max/mdev = 0.134/0.811/2.094/0.647 ms |
[root@test
root]# traceroute [-i interface] [-g gateway]
[host|IP]
ѼƻG -i Gϥγo interface ӳsXhIҦp eth0, ppp0 I -g Gϥγo gateway ӳsXhIҦp 192.168.1.2, 140.116.141.29 I dҡG [root@test root]# traceroute tw.yahoo.com traceroute to tw.yahoo.com (202.1.237.21), 30 hops max, 38 byte packets 1 140.116.141.253 (140.116.141.253) 123.958 ms 96.357 ms 97.810 ms 2 140.116.140.253 (140.116.140.253) 103.548 ms 87.607 ms 78.227 ms 3 163.28.112.253 (163.28.112.253) 99.522 ms 84.379 ms 79.858 ms 4 210.242.251.246 (210.242.251.246) 104.429 ms 86.622 ms 79.857 ms 5 211.22.226.50 (211.22.226.50) 97.897 ms 86.031 ms 87.177 ms 6 TaiPei-TANET-P1.BR.HiNet.NET (168.95.207.242) 101.981 ms 58.149 ms 60.231 ms 7 168.95.17.162 (168.95.17.162) 69.198 ms 63.294 ms 58.594 ms 8 210.65.200.10 (210.65.200.10) 65.950 ms 67.336 ms 63.503 ms 9 211.22.35.169 (211.22.35.169) 67.572 ms 92.535 ms 83.105 ms 10 211.22.41.89 (211.22.41.89) 106.855 ms 92.540 ms 87.201 ms 11 alteon6.tpe.yahoo.com (202.1.237.253) 122.347 ms 92.235 ms 91.266 ms |
[root@test
root]# netstat [-r] [-i interface]
[root@test root]# netstat [-antulp] ѼƻG -r GܥX route NF -i GܥX interface eA ifconfig աI -a GܥXثeҦsuAI -n Gw]pAܥX host |H host name {AY n hiH port P host HƦr -t G tcp ʥ]su欰 -u G udp ʥ]suA -l G LISTEN e -p GPܦ@su PID I(`NGu root ~Ϧ\I) dҡG [root@test root]# netstat -r # KKIܥXثeѪIP route O\ۦPC Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 140.116.141.253 * 255.255.255.255 UH 40 0 0 ppp0 192.168.1.0 * 255.255.255.0 U 40 0 0 eth0 192.168.0.0 * 255.255.255.0 U 40 0 0 eth0 127.0.0.0 * 255.0.0.0 U 40 0 0 lo default 140.116.141.253 0.0.0.0 UG 40 0 0 ppp0 @ [root@test root]# netstat -i eth0 # ݬݩUܥXeAO_ ifconfig eth0 rIH Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 077199373 0 0 169616342 0 0 0 BMRU lo 16436 0 1130485 0 0 0 1130485 0 0 0 LRU @ [root@test root]# netstat -an<==ܩҦsuAAåBHƦrA [root@test root]# netstat -tul <== LISTEN tcp P udp suAApUG Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:mysql *:* LISTEN tcp 0 0 *:netbios-ssn *:* LISTEN tcp 0 0 *:pop3 *:* LISTEN tcp 0 0 *:http *:* LISTEN tcp 0 0 *:ftp *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:smtp *:* LISTEN udp 0 0 *:netbios-ns *:* `NGW LISTEN ܸ port Owgb ť AȰաIӥ䪺 tcp O tcp ʥ]I @ [root@test root]# netstat -anp | more <==oӫOܱ`UFIаOoI |
[root@test
root]# host [-a] domain_name
ѼƻG -a GܥXҦT dҡG [root@test root]# host tw.yahoo.com <==ܥXD IP tw.yahoo.com. has address 202.1.237.21 @ [root@test root]# host -a tw.yahoo.com <==ҦDTܡI Trying "tw.yahoo.com." ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59138 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 5 ;; QUESTION
SECTION:
;; ANSWER SECTION:
;; AUTHORITY
SECTION:
;; ADDITIONAL
SECTION:
Received 216 bytes from 163.28.112.1#53 in 10 ms |
[root@test
root]# nslookup [domain_name|IP]
ѼƻG dҡG [root@test root]# nslookup tw.yahoo.com <== domain name d IPI Note: nslookup is deprecated and may be removed from future releases. Consider using the `dig' or `host' programs instead. Run nslookup with the `-sil[ent]' option to prevent this message from appearing. Server: 163.28.112.1 Address: 163.28.112.1#53 Non-authoritative
answer:
[root@test root]#
nslookup
202.1.237.21 <== IP d domain name
Non-authoritative
answer:
Authoritative
answers can be found from:
|
[root@test
root]# telnet [-8] [host|IP] [port]
ѼƻG -8 GiHֶýXp portGAȪfIҦp POP3 110 ASMTP 25 port Itelnet iHΨӰI dҡG [root@test root]# telnet -8 bbs.sayya.org bbs.sayya.org ? SayYA Linux T ? 140.113.22.98 w{i SayYA T jثeuWH [41] H i SayYa Linux's BBS x j
@ӥH Linux BѡBʪAȤM~ BBS
[αbGguestAӽзsbGnew пJNGguest
[root@test root]#
telnet
localhost 110
|
[root@test
root]# ftp [-p] host [port]
ѼƻG -p GҰ PASSIVE ҦI dҡG [root@test root]# ftp localhost @@@@<==w]OH port 21 Ӷisu [root@test root]# ftp localhost 1354 @ # pGz]w ftp port DW 21 AhiHoˡI @ [root@test root]# ftp localhost@@<==s컷ݥD Connected to localhost (127.0.0.1). 220 localhost FTP server (Version wu-2.6.1-20) ready. Name (127.0.0.1:test): test <==Jb 331 Password required for test. Password: <==JKX 230 User test logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> dir @@@@@@@@@<==ܻDe ftp> cd @@@@@@@@@ <==ܴݥDؿ ftp> close or bye or exit@<==}ݥD ftp> get file@@@@@@@<==oݥDɮ ftp> mget file@@@@@@ <==oҦɮסA get nΡIҦp mget .bash* ftp> put file@@@@@@@<==Naɮ file 컷ݥDW ftp> mputfile@@@@@@ <==N@ɮפWǫ ftp> delete file@ @@@@<==ݥD file ɮ ftp> help@@@@@@@@@<==ܨDϫOI ftp> mkdir dir@@@@@@ <==bݥDWإߥؿ ftp> lcd@@@@@@@@@ <==ܴaݸ|I ftp> ascii or binary@@@ <==H ASCII Ҧ BINARY ҦơIH |
[root@test
root]# ncftp [host]
[root@test root]# ncftp [ftp://domain.name/path] ѼƻG iHs host DA]iHsDYӸ|UA۷K dҡG [root@test root]# ncftp ftp.nsysu.edu.tw@@<==s줤sj FTP [root@test root]# ncftp ftp://ftp.nsysu.edu.tw/Linux # s FTP Ḓ Linux ؿUI # LUe]gLsAҥHͤFýXb Putty UO`I NcFTP 3.0.3 (April 15, 2001) by Mike Gleason (ncftp@ncftp.com). Copyright (c)
1992-2001 by Mike Gleason.
Connecting to ftp.nsysu.edu.tw... ======================================================================
========================================================================
ݥD@ǪAȫOG
aݥD@ǫO\G
|
[root@test
root]# lynx http://web.site
ѼƻG dҡG [root@test root]# lynx http://tw.yahoo.com tw.yahoo.com cookie: B=b7hd3jkukeu1e&b=2 Allow? (Y/N/Always/neVer) A # WJ A NiH cookie FI Yahoo!_ (p1 of 5) [USEMAP:yk_masthead_142.gif]
p~^y 9p]@@ k `Hƪ5dH@@ nv-
pRLXnӤH
ij [auc_ani.gif]
|
[root@test
root]# vi /etc/lynx.cfg
.... ....쩳UTr ##CHARACTER_SET:iso-8859-1 @@@<==jb 394 B #ASSUME_CHARSET:iso-8859-1@@@ <==jb 409 B #PREFERRED_LANGUAGE:en@@@@@ <==jb 537 B @ NWT檺 # ŸAåB令UoˡG CHARACTER_SET:big5@@@@@@@ <==oNO Big5 媺sX ASSUME_CHARSET:big5@@@@@@@<==W@ˡI PREFERRED_LANGUAGE:zh_TW@@@@ <==oӴNOyt䴩I yt䴩譱AziHdݤ@U /etc/sysconfig/i18n oɮסA zh_TW NOxWIFW]wANiHݤoI |
[root@test root]# lynx -dump http://the.site.doname.name/xxx.gif > file.gif |
[root@test
root]# wget http://domain.name/file
[root@test root]# wget http://ftp.nsysu.edu.tw/Unix/Web/counter/Count2.6/Count2.6/download/src/wwwcount2.6.tar.gz --14:54:45-- http://ftp.nsysu.edu.tw/Unix/Web/counter/Count2.6/Count2.6/download/src/wwwcount2.6.tar.gz => `wwwcount2.6.tar.gz' Connecting to ftp.nsysu.edu.tw:80... connected! HTTP request sent, awaiting response... 200 OK Length: 433,312 [application/x-gzip]
0K .......... .......... .......... .......... .......... 11% @ 746.27
KB/s
14:54:46 (780.73 KB/s) - `wwwcount2.6.tar.gz' saved [433312/433312] |
[root@test
root]# vi /etc/wgetrc
.... ....쩳Ur #http_proxy = http://proxy.yoyodyne.com:18023/ <==b 75 B #use_proxy = on@@@@@@@@@@@@@@@@<==b 78 B @ NW檺 # ŸAåB令UoˡG http_proxy = http://proxy.ncku.edu.tw:3128/ use_proxy = no |
[root@test
root]# wget http://www.svgalib.org/svgalib-1.4.3.tar.gz
[root@test root]# wget http://jmcce.slat.org/DOWNLOAD/jmcce-1.4RC2.tar.gz |
1. w svgalib
1.1 pGH RPM w˪(ij)G [root@test root]# rpm -ivh svgalib-*.rpm o˴N OK FI @ 1.2 pGH Tarball w˪(ijw˼Ҧ)G [root@test root]# cd /usr/local/src [root@test src]# tar -zxvf /root/svgalib-1.4.3.tar.gz [root@test src]# cd svgalib-1.4.3 [root@test svgalib-1.4.3]# cd utils/ [root@test utils]# ln -s ../src/vga.h vga.h [root@test utils]# vi Makefile # 쩳Uo@( b 16 )G CFLAGS = $(WARN) $(OPTIMIZE) -I../include # ק令G CFLAGS = $(WARN) $(OPTIMIZE) -I../include -L../sharedlib [root@test utils]# cd .. [root@test svgalib-1.4.3]# make install [root@test svgalib-1.4.3]# cd /usr/lib [root@test lib]# ln -s /usr/local/lib/libvga.so.1 . # |@ǿ~TALuP man ASYILhI @ 2. Aw jmcce oӮMaI [root@test root]# rpm -e libtool autoconf automake # @ǸsMI @ 2.1 autoconf [root@test root]# cd /usr/local/src [root@test src]# tar -zxvf /root/autoconf-2.13.tar.gz [root@test src]# cd autoconf-2.13 [root@test autoconf-2.13]# ./configure --prefix=/usr/local [root@test autoconf-2.13]# make && make install @ 2.2 w automake [root@test autoconf-2.13]# cd /usr/local/src [root@test src]# tar -zxvf /root/automake-1.4.tar.gz [root@test src]# cd automake-1.4 [root@test automake-1.4]# ./configure --prefix=/usr/local [root@test automake-1.4]# make && make install @ 2.3 w libtool [root@test automake-1.4]# cd /usr/local/src [root@test src]# tar -zxvf /root/libtool-1.4.2.tar.gz [root@test src]# cd libtool-1.4.2 [root@test libtool-1.4.2]# ./configure --prefix=/usr/local [root@test libtool-1.4.2]# make && make install @ 2.4 w jmcce [root@test libtool-1.4.2]# cd /usr/local/src [root@test src]# tar -zxvf /root/jmcce-1.4RC2.tar.gz [root@test src]# cd jmcce-1.4RC2/ [root@test jmcce-1.4RC2]# LANG=zh_TW.Big5 [root@test jmcce-1.4RC2]# vi /etc/sysconfig/i18n # iHNL令ܳIUҼ˭ק LANG="zh_TW.Big5" [root@test jmcce-1.4RC2]# vi genconf.sh # o@G bin_PATH="/usr/bin" # NL令G bin_PATH="/usr/local/bin" [root@test jmcce-1.4RC2]# ./genconf.sh ; ./genconf.sh # oӰʧ@nhXAMѬO@ǩǩǪ~TI # ̫٬O|X{@ӿ~TANOUˤlG configure.in: 13: required file `build/ltconfig' not found # LoӰT|vT̫᪺sĶGAҥHNnޥLFI [root@test jmcce-1.4RC2]# ./configure --prefix=/usr \ > --sysconfdir=/etc/chinese/jmcce [root@test jmcce-1.4RC2]# make && make install @ 3. ȦsɮסANsMw˦^ӡI [root@test jmcce-1.4RC2]# cd /usr/local/src/autoconf-2.13/ && make uninstall [root@test autoconf-2.13]# cd /usr/local/src/automake-1.4/ && make uninstall [root@test automake-1.4]# cd /usr/local/src/libtool-1.4.2/ && make uninstall # X쪩СAw autoconf, automake P libtool aI |
jmcce
({̲{ locale ۰ʨMwcҦ)
jmcce -b (ʱjH BIG5Xc餤ާ@) jmcce -g (ʱjH GBX²餤ާ@) jmcce -d (ܤӤJJkAcҦ۰) @ CTRL-SPACE ===> ^ CTRL-ALT-0-9 ===> Jk CTRL-ALT-1 ===> ܾeJk CTRL-ALT-2 ===> ²Jk CTRL-ALT-3 ===> `Jk (Linux/CXterm DzΡus`Jkv) CTRL-ALT-4 ===> OwJk (֬OwʹѡAtTQUJֳtJ) CTRL-ALT-5 ===> CJk CTRL-ALT-6 ===> ^ֿJk (֬ѡAjT}^~Jk) CTRL-ALT-7 ===> ŭJk (z`J) CTRL-ALT-8 ===> Jk (PTѡAiΫJҦWPTU~rJ) CTRL-ALT-9 ===> L̿Jk (un۳ƦXkӪYi[Ұ) CTRL-ALT-0 ===> XJk |
|
MTU |
EtherNet (@몺Ao]Ow]) | 1500 |
PPPoE(ADSLΪ) | 1492 |
Dial-up(modem) | 576 |
C:\WINDOWS>
ping
-f -l 1500 192.168.1.2
Pinging 192.168.1.2 with 1500 bytes of data: Packet needs
to be fragmented but DF set.
Ping statistics
for 192.168.1.2:
|
C:\WINDOWS>
ping -f -l 1464 192.168.1.2
Pinging 192.168.1.2 with 1464 bytes of data: Reply from 192.168.1.2:
bytes=1464 time=10ms TTL=128
Ping statistics
for 192.168.1.2:
|
[root@test
root]# ping -c 3 -M do -s 1472 192.168.1.2
PING 192.168.1.2 (192.168.1.2) from 192.168.1.13 : 1472(1500) bytes of data. 1480 bytes from 192.168.1.2: icmp_seq=0 ttl=255 time=2.408 msec 1480 bytes from 192.168.1.2: icmp_seq=1 ttl=255 time=2.392 msec 1480 bytes from 192.168.1.2: icmp_seq=2 ttl=255 time=2.440 msec @ --- 192.168.1.2 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/mdev = 2.392/2.413/2.440/0.044 ms @ [root@test root]# ping -c 3 -M do -s 1473 192.168.1.2 PING 192.168.1.2 (192.168.1.2) from 192.168.1.13 : 1473(1501) bytes of data. ping: sendto: Message too long ping: sendto: Message too long ping: sendto: Message too long --- 192.168.1.2
ping statistics ---
|
[root@test root]# ifconfig eth0 mtu 1500 |