¤ÓÊÑè§ÂÙ¹Ô¡Êì Command Line (Linux µÍ¹·Õè1)
 
ls
à»ç¹¤ÓÊÑ觷ÕèãªéÊÓËÃѺáÊ´§á¿éÁ¢éÍÁÙÅ (àªè¹à´ÕÂǡѺ dir¢Í§DOS) ÁÒ¡¨Ò¡¤ÓÇèÒ list
ÃٻẺ¤ÓÊÑè§ ls [option] [file]
option ·ÕèÁÑ¡ãªé¡Ñ¹ã¹ ls ¤×Í
-l ¨ÐáÊ´§¼ÅÅѾ¸ìẺ Long Format «Ö觨ÐáÊ´§ Permission ¢Í§á¿éÁ´éÇÂ
-a ¨ÐáÊ´§á¿éÁ¢éÍÁÙÅ·Ñé§ËÁ´
-F ¨ÐáÊ´§ / ËÅѧ Directory áÅÐ * ËÅѧá¿éÁ¢éÍÁÙÅ·Õè execute ä´é
µÑÇÍÂèÒ§¡ÒÃãªé§Ò¹  ls –l     ls -al     ls -F

adduser
¤ÓÊÑè§à¾ÔèÁ User ãËé¡ÑºÃкº Unix,Linux
ÃٺẺ¡ÒÃãªé§Ò¹ adduser -g (group) -d (Directory) (User)
µÑÇÍÂèÒ§ adduser -g root -d /home/user1 user ÊÃéÒ§ User ª×èÍ Login ¤×Í user1 à»ç¹ÊÁҪԡ㹡ÅØèÁ root

useradd
¤ÓÊÑè§à¾ÔèÁ User ãËé¡ÑºÃкº Unix,Linux (ãªéàËÁ×͹¡Ñº¤ÓÊÑè§ adduser)
ÃٺẺ¡ÒÃãªé§Ò¹ useradd -g (group) -d (Directory) (User)
µÑÇÍÂèÒ§ useradd -g root -d /home/user1 user ÊÃéÒ§ User ª×èÍ Login ¤×Í user1 à»ç¹ÊÁҪԡ㹡ÅØèÁ root

userdel
¤ÓÊÑè§Åº User ÍÍ¡¨Ò¡Ãкº Unix,Linux
ÃٺẺ¡ÒÃãªé§Ò¹ userdel [option] (Username)
µÑÇÍÂèÒ§ userdel -r root user1 ź User ª×èÍ Login ¤×Í User1 áÅÐ -r ¤×ÍãËéź Home Directory¢Í§ User1 ´éÇÂ
passwd
¤ÓÊÑ觡Ó˹´áÅÐá¡éä¢ÃËÑʼèÒ¹¢Í§ User ¢Í§Ãкº Unix,Linux
ÃٺẺ¡ÒÃãªé§Ò¹ passwd [Username]
µÑÇÍÂèÒ§ passwd user1 (¡Ó˹´ÃËÑʼèÒ¹ãËé User1 ¶éÒäÁè¾ÔÁ¾ì ª×èÍ User ÃкºUnix¨ÐËÁÒ¤ÇÒÁÇèÒá¡éä¢ÃËÑʼèÒ¹
¢Í§¤¹·ÕèLoginà¢éÒÁÒ)

alias
¤ÓÊÑ觡Ó˹´¤ÓÊÑè§Âèͧ͢Ãкº Unix,Linux (¤ÅéÒ¡Ѻ¤ÓÊÑè§ SETã¹DOSáµèÊÒÁÒöãªé໽鹤ÓÊÑè§ RUNä´é)
ÃٺẺ¡ÒÃãªé§Ò¹ alias [ª×èÍãËÁè=¢éͤÇÒÁ]
µÑÇÍÂèÒ§ alias copy=cp ¡Ó˹´ãËé¾ÔÁ¾ì copy á·¹¤ÓÊÑè§ cpä´é

bash
¤ÓÊÑè§àÃÕ¡ãªé Bourne again shell¢Í§Ãкº Unix,Linux
ÃٺẺ¡ÒÃãªé§Ò¹ bash
µÑÇÍÂèÒ§ bash [Enter] ( àÃÕ¡ãªé Bourne again shell)

bc
¤ÓÊÑè§àÃÕ¡ãªéâ»Ãá¡ÃÁ¤Ó¹Ç³àÅ¢¢Í§Ãкº Unix,Linux
ÃٺẺ¡ÒÃãªé§Ò¹ bc [-lwsqv] [option] [file]
µÑÇÍÂèÒ§ bc [Enter] 1+2 [Enter] 1^2 [Enter] a=3 [Enter] b=4 [Enter] a*b [Enter] x=2;y=5;x+y[Enter] [Ctrl-d] à¾×èÍÍÍ¡
ËÁÒÂà˵Ø:¤ÓÊÑ觹Õé¨Ðãªéä´éµéͧInstall Packet ŧ仡è͹

cp
à»ç¹¤ÓÊÑ觷ÕèãªéÊÓËÃѺÊÓà¹Òá¿éÁ¢éÍÁÙÅ (àªè¹à´ÕÂǡѺcopy¢Í§DOS) ÁÒ¨Ò¡¤ÓÇèÒ copy
ÃٻẺ¤ÓÊÑè§ cp source target
µÑÇÍÂèÒ§¡ÒÃãªé§Ò¹ #cp test.txt /home/user1

cal
¤ÓÊÑè§áÊ´§»¯Ô·Ô¹¢Í§Ãкº Unix,Linux
ÃٺẺ¡ÒÃãªé§Ò¹ cal
µÑÇÍÂèÒ§ cal [Enter](ÊÑè§ãËéÃкºáÊ´§ »¯Ô·Ô¹à´×͹ »Ñ¨¨ØºÑ¹)
cal -y [Enter](ÊÑè§ãËéÃкºáÊ´§ »¯Ô·Ô¹»Õ »Ñ¨¨ØºÑ¹)

cat
¤ÓÊÑè§áÊ´§¢éͤÇÒÁã¹File¢Í§Ãкº Unix,Linux (¤ÅéÒ¡Ѻ¤ÓÊÑè§Type¢Í§DOS)
ÃٺẺ¡ÒÃãªé§Ò¹ cat
µÑÇÍÂèÒ§ cat /home/user1 | more ÍèÒ¹¢éÍÁÙŨҡä¿Åì/home/user1¶éÒÂÒÇà¡Ô¹Ë¹éÒãËéËÂØ´·ÕÅÐ˹éÒ¨Í

C Compiler
¤ÓÊÑè§Compile ÀÒÉÒC¢Í§Ãкº Unix,Linux (¤ÅéÒ¡Ѻ¤ÓÊÑè§Type¢Í§DOS)
ÃٺẺ¡ÒÃãªé§Ò¹ cc [filename]
µÑÇÍÂèÒ§ cc /home/user1/industry.c ¨ÐÊÑè§ãËéÃкºCompile ÀÒÉÒC ä¿Åìª×èÍ industry.c ·Õè Directory /home/user1

cd
¤ÓÊÑè§Change Directory¢Í§Ãкº Unix,Linux (¤ÅéÒ¡Ѻ¤ÓÊÑè§CD¢Í§DOS)
ÃٺẺ¡ÒÃãªé§Ò¹ cd [directory]
µÑÇÍÂèÒ§ cd /etc [Enter]ä»Directory etc
cd ..[Enter] ÂéÒÂä»DirectoryÍÕ¡1ªÑé¹

chfin
¤ÓÊÑè§Change your finger information¢Í§Ãкº Unix,Linux (à»ç¹¡ÒáÓ˹´¢éÍÁÙŢͧUser
àªè¹ ª×èÍàµçÁ ·ÕèÍÂÙè àºÍÃìâ·ÃÈѾ·ì)
ÃٺẺ¡ÒÃãªé§Ò¹ chfn [username]
µÑÇÍÂèÒ§ chfn User1 ¡Ó˹´ÃÒÂÅÐàÍÕ´User1

chgrp
¤ÓÊÑè§Change Group¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃà»ÅÕ蹡ÅØèÁà¨éҢͧä¿Åì)
ÃٺẺ¡ÒÃãªé§Ò¹ chgrp [-chfRv] (Group) (File)
µÑÇÍÂèÒ§ chgrp root /root/* à»ÅÕè¹GroupãËé¡Ñºä¿Åì·Ø¡ä¿Åìã¹ä´àä·ÍÃÕè /root ãËéà»ç¹ Group root

chmod
¤ÓÊÑè§Change Mode¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃà»ÅÕè¹ÊÔ·¸Ô¡ÒÃà¢éÒ¶Ö§ä¿Åì)
ÃٺẺ¡ÒÃãªé§Ò¹ chmod [ÊÔ·¸Ô] (File)
µÑÇÍÂèÒ§ ¡Ó˹´ÊÔ·¸ÔãËé¡Ñºä¿Åìª×èÍtest ¤×Í chmod 754 test ËÃ×Í chmod go +r-w testãËé¡Ñºä¿Åì·Ø¡ä¿Åì chmod o-r *
µÑÇàÅ¢Mode rwx = 7 ; rw - =6 ; r-x =5 ; r- - = 4 ; - wx = 3 ; - w - = 2 ; - - x = 1 ; - - = 0
¡ÒáÓ˹´ÊÔ·¸Ô¡Ó˹´ä´é2ÅѡɳФ×Í
1.¡Ó˹´â´ÂãªéÍÑ¡ÉÃÂèÍ¡ÅØèÁ
2.ãªéÃËÑÊàÅ¢°Ò¹2á·¹ÊÔ·¸Ô (1 ¤×Í͹حҵ)
¡ÅØèÁ¼Ùéãªé User Group Other = ugo àªè¹ go-r-w+x ¤×Í¡ÅØèÁ áÅФ¹Í×è¹äÁèÁÕÊÔ·¸ÔÍèÒ¹à¢Õ¹áµèRunä´é
ÊÔ·¸Ôì¡ÒÃãªé -rwx rwx rwx = Read Write Execute
ÃËÑÊàÅ¢°Ò¹ 111 101 100 = 754 ¤×Íà¨éҢͧä¿Åìãªéä´é¤Ãº ¤¹ Group à´ÕÂǡѹÍèÒ¹Executeä´é¹Í¡¹Ñé¹ÍèÒ¹ä´éÍÂèÒ§à´ÕÂÇ

chown
¤ÓÊÑè§Change Owner¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃà»ÅÕè¹à¨éҢͧä¿Åì)
ÃٺẺ¡ÒÃãªé§Ò¹ chown [«×èÍà¨éҢͧä¿Åì] (ª×èÍFile)
µÑÇÍÂèÒ§ chown user1 filename ¤×Íà»ÅÕè¹à¨éҢͧä¿Åìª×èÍ filename à»ç¹User1
chown -R user1.root dirname ¤×Íà»ÅÕè¹·Ñé§à¨éҢͧä¿ÅìáÅСÅØèÁ仾ÃéÍÁ¡Ñ¹·Ø¡ä¿Åìã¹ Sub dirname.

chsh
¤ÓÊÑè§chsh¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃà»ÅÕè¹Shell ãËé User)
ÃٺẺ¡ÒÃãªé§Ò¹ chsh [Username]
µÑÇÍÂèÒ§ chsh user1 [Enter] /bin/bash [Enter]

clear
¤ÓÊÑè§clear¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃź¢éͤÇÒÁº¹¨ÍÀÒ¾ ¤ÅéÒ¡Ѻ¤ÓÊÑè§ clsã¹ dos)
ÃٺẺ¡ÒÃãªé§Ò¹ clear
µÑÇÍÂèÒ§ clear [Enter]

cal
¤ÓÊÑè§áÊ´§»¯Ô·Ô¹¢Í§Ãкº Unix,Linux
ÃٺẺ¡ÒÃãªé§Ò¹ cal
µÑÇÍÂèÒ§ cal [Enter](ÊÑè§ãËéÃкºáÊ´§ »¯Ô·Ô¹à´×͹ »Ñ¨¨ØºÑ¹)
cal -y [Enter](ÊÑè§ãËéÃкºáÊ´§ »¯Ô·Ô¹»Õ »Ñ¨¨ØºÑ¹)

mesg
mesg ´Ù status ¡ÒÃÃѺ¡ÒõԴµèͧ͢ terminal
mesg y à»Ô´ãËé terminal ÊÒÁÒöÃѺ¡ÒõԴµèÍä´é
mesg n »Ô´äÁèãËé terminal ÊÒÁÒöÃѺ¡ÒõԴµèÍä´é

date
ãªéáÊ´§ Çѹ·Õè áÅÐ àÇÅÒ
µÑÇÍÂèÒ§ date 17 May 2004

df
¤ÓÊÑè§df ¢Í§Ãкº Unix,Linux (à»ç¹¡ÒõÃǨÊͺ¡ÒÃãªé¾×è¹·Õ躹ÎÒÃì´´ÔÊ¡ì)
ÃٺẺ¡ÒÃãªé§Ò¹df [option] [file]
µÑÇÍÂèÒ§ df [Enter]

dmesg
¤ÓÊÑè§dmesg¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃãËéáÊ´§¼ÅàËÁ×͹µÍ¹ Boot)
ÃٺẺ¡ÒÃãªé§Ò¹ dmesg
µÑÇÍÂèÒ§ dmesg | more [Enter]
ËÁÒÂà赯 ¤ÓÊÑ觹Õé ãªéµÃǨÊͺ àÁ×èÍà¡Ô´»Ñ­ËÒ àªè¹ Linux äÁèÃÙé¨Ñ¡ Driver CD-Rom ËÃ×ͻѭËÒÍ×è¹æ

echo
¤ÓÊÑè§echo¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃãËéáÊ´§¢éͤÇÒÁ àËÁ×͹¡Ñº ECHO¢Í§DOS)
ÃٺẺ¡ÒÃãªé§Ò¹ echo (¢éͤÇÒÁ·Õèµéͧ¡ÒÃãËéáÊ´§¼Å)
µÑÇÍÂèÒ§ echo my name is user1
echo Hello > /dev/tty2 Ê觢éͤÇÒÁ Hello ä»ÍÍ¡¨Íà·ÍÃìÁÔ¹ÍÅ·Õè2

ed
¤ÓÊÑè§ ed ¢Í§Ãкº Unix,Linux (â»Ãá¡ÃÁá¡é䢢éͤÇÒÁã¹ Text file àËÁ×͹¡Ñº¤ÓÊÑè§ edlin¢Í§DOS)
ÃٺẺ¡ÒÃãªé§Ò¹ ed (fileName)
µÑÇÍÂèÒ§ ed /home/user/test (ÍÍ¡¡´q)
ÊÓËÃѺ¤¹·ÕèäÁ趹Ѵ¤ÓÊÑ觹Õéá¹Ð¹ÓãËéãªé¤ÓÊÑè§ picoËÃ×Ívi ËÃ×Íemacsá·¹ä´éàªè¹¡Ñ¹

emacs
¤ÓÊÑè§ emacs ¢Í§Ãкº Unix,Linux (â»Ãá¡ÃÁá¡é䢢éͤÇÒÁã¹ Text file )
ÃٺẺ¡ÒÃãªé§Ò¹ emacs (fileName)
µÑÇÍÂèÒ§ emacs /home/user/test (help ¡´ Ctrl - h ; ÍÍ¡¡´ Ctrl - x Ctrl - c)

exit
¤ÓÊÑè§ exit ¢Í§Ãкº Unix,Linux (ÍÍ¡¨Ò¡ÃкºÂÙ¹Ô¡Êì )
ÃٺẺ¡ÒÃãªé§Ò¹ exit
µÑÇÍÂèÒ§ exit

finger
¤ÓÊÑè§ finger ¢Í§Ãкº Unix,Linux (áÊ´§ª×èÍUser·Õè¡ÓÅѧLoginà¢éÒÁÒáµè¤ÓÊÑè§ Who¨ÐãËéÃÒÂÅÐàÍÕ´´Õ¡ÇèÒ)
ÃٺẺ¡ÒÃãªé§Ò¹ finger [username]
µÑÇÍÂèÒ§ finger user1 áÊ´§ª×èÍáÅÐÃÒÂÅÐàÍÕ´ user1

fsck
¤ÓÊÑè§ fsck ¢Í§Ãкº Unix,Linux (à»ç¹¤ÓÊÑè§ µÃǨÊͺáÅЫèÍÁá«Á Linux file system àËÁ×͹¡Ñº
¤ÓÊÑè§Scandisk ¢Í§Dos)
ÃٺẺ¡ÒÃãªé§Ò¹ fsck [option]
µÑÇÍÂèÒ§ /sbin/fsck -a /dev/hd1

ftp
¤ÓÊÑè§ ftp ¢Í§Ãкº Unix,Linux (à»ç¹â»Ãá¡ÃÁÃѺ-Êè§ä¿Åì )
ÃٺẺ¡ÒÃãªé§Ò¹ ftp (IP or Name of FTP Server )
µÑÇÍÂèÒ§ ftp 132.209.1.2 [Enter]

Login:anonymous , Password: Username@YourDomain.com
¤ÓÊÑ觷Õèà¡ÕèÂÇ¢éͧ ls - ´Ùä¿Åì ; pwd -´Ùdir. ·ÕèÍÂÙè ;cd - à»ÅÕè¹ dir ;lcd - à»ÅÕè¹ local dir ;mput* -Êè§ä¿Åì ;mget – ÃѺ
ä¿Åì ;bye - ÍÍ¡

grep
¤ÓÊÑè§ grep ¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃÊÑè§ãËé¤é¹ËÒµÒÁà§×èÍ¹ä¢ )
ÃٺẺ¡ÒÃãªé§Ò¹ grep (option)
µÑÇÍÂèÒ§ grep -i ftp /etc/test ¤é¹ËÒºÃ÷Ѵ·ÕèÁÕ¤ÓÇèÒ "ftp"äÁèʹ㨾ÔÁ¾ìàÅç¡-ãË­è ¨Ò´ä¿Åì /etc/test

groupadd
¤ÓÊÑè§ groupadd ¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃà¾ÔèÁÃÒª×èÍ¡ÅØèÁ¢Í§ User)
ÃٺẺ¡ÒÃãªé§Ò¹ groupadd (GroupName )
µÑÇÍÂèÒ§ #groupadd staff ÊÃéÒ§¡ÅØèÁ¢Í§ User ª×èÍ Staff à¾ÔèÁãËéÃкº

groupdel
¤ÓÊÑè§ groupdel ¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃźÃÒª×èÍ¡ÅØèÁ¢Í§ User)
ÃٺẺ¡ÒÃãªé§Ò¹ groupadd (GroupName )
µÑÇÍÂèÒ§ #groupdel staff ź¡ÅØèÁ¢Í§ User ª×èÍ StaffÍÍ¡¨Ò¡Ãкº

gzip/gunzip
¤ÓÊÑè§gzip/gunzip¢Í§Ãкº Unix,Linux (à»ç¹¡ÒúպÍÑ´ä¿ÅìËÃ×Í¢ÂÒºպÍÑ´ä¿Åì)
ÃٺẺ¡ÒÃãªé§Ò¹ gzipËÃ×Ígunzip (-cdfhlLnNrtv19 ) [file]
µÑÇÍÂèÒ§ #gzip -9vr /home/samba/* ºÕºÍÑ´ä¿Åì¢éÍÁÙÅ·Ø¡ä¿Åì ã¹Sub /home/samba ¨Ðà»ÅÕè¹à»ç¹¹ÒÁÊØ¡Å .gz
#gunzip -dvr /home/samba/* ¤ÅÒ¡ÒúպÍÑ´ä¿Åì¢éÍÁÙÅ·Ø¡ä¿Åì·ÕèÊ¡ØÅ .gz ã¹Sub /home/samba

halt
¤ÓÊÑè§ halt ¢Í§Ãкº Unix,Linux (à»ç¹¡ÒÃÊÑè§ãËéà¤Ã×èͧËÂØ´·Ó§Ò¹)
ÃٺẺ¡ÒÃãªé§Ò¹ halt [-n] [-w] [-d] [-f] [-I] [-p]
µÑÇÍÂèÒ§ #halt
¤ÓÊÑ觷Õèà¡ÕèÂÇ¢éͧ ¤×Í Shutdown ; init0 , reboot

history
¤ÓÊÑè§ history ¢Í§Ãкº Unix,Linux (à»ç¹¡ÒôٻÃÐÇѵԡÒÃãªé¤ÓÊÑè§ã¹Command line ¤ÅéÒ¡Ѻ
¡Òá´F7ã¹DOS¤×ÍàÃÕ¡ãªé¤ÓÊÑè§Dos key)
ÃٺẺ¡ÒÃãªé§Ò¹history [n] [-r wan [filename] ]
µÑÇÍÂèÒ§ #history 20 ´Ù¤ÓÊÑ觷Õèà¾Ôè§ãªéä»20¤ÓÊÑ觷ÕèáÅéÇ

ifconfig
¤ÓÊÑè§ history ¢Í§Ãкº Unix,Linux (à»ç¹¡ÒõÃǨÊͺ¡Ó˹´¤èÒNetwork¢Í§Lan Card)
ÃٺẺ¡ÒÃãªé§Ò¹ ifconfig [option]
µÑÇÍÂèÒ§ #ifconfig

ipchains
¤ÓÊÑè§ ipchains ¢Í§Ãкº Unix,Linux (à»ç¹¤ÓÊÑè§ÊÓËÃѺ¡Ó˹´¤Çº¤ØÁ ¡ÒÃÃѺÊ觼èÒ¹¢éÍÁÙŢͧ Firewall)
ÃٺẺ¡ÒÃãªé§Ò¹ ipchains [parameter] command [option]
µÑÇÍÂèÒ§ #ipchains -L ´ÙʶҹСÒà Set IPchains㹻Ѩ¨ØºÑ¹

jobs
¤ÓÊÑè§ jobs ¢Í§Ãкº Unix,Linux (à»ç¹¤ÓÊÑè§ÊÓËÃѺ¡Ó˹´¤Çº¤ØÁ ¡ÒÃÃѺÊ觼èÒ¹¢éÍÁÙŢͧ Firewall)
ÃٺẺ¡ÒÃãªé§Ò¹ jobs
µÑÇÍÂèÒ§ #sleep 20 & jobs

kill
¤ÓÊÑè§ kill ¢Í§Ãкº Unix,Linux (à»ç¹¤ÓÊÑè§ÊÓËÃѺ¡àÅÔ¡ Process)
ÃٺẺ¡ÒÃãªé§Ò¹ kill [option] (process ID)
µÑÇÍÂèÒ§ ps -A ´ÙËÁÒÂàÅ¢·Õèªèͧ PID¢Í§Process ·Õèµéͧ¡ÒÃź
Kill -9

login
¤ÓÊÑè§ login ¢Í§Ãкº nnn á·¹nnn´éÇÂËÁÒÂàÅ¢PID -9 ¤×ͺѧ¤Ñº¦èÒãËéµÒÂ
Unix,Linux (à»ç¹¤ÓÊÑ觡ÒÃà¢éÒÃкºËÃ×Íà»ÅÕè¹ User Login) ÃٺẺ¡ÒÃãªé§Ò¹ login [fp] (UserName)
µÑÇÍÂèÒ§ #login:root

mkdir
à»ç¹¤ÓÊÑ觷ÕèãªéÊÓËÃѺ¡ÒÃÊÃéÒ§ directory (㹷ӹͧà´ÕÂǡѺ dos) ÁÒ¨Ò¡¤ÓÇèÒ make directory
ÃٻẺ¢Í§¤ÓÊÑè§mkdir mkdir [option] [file]
â´Â option ·ÕèÁÑ¡ãªé¡Ñ¹ã¹ mkdir ¤×Í
-m ¨Ð·Ó¡ÒáÓ˹´ Permissioin (ãËé´Ù¤ÓÊÑè§ chmod à¾ÔèÁàµÔÁ)
-p ¨Ð·Ó¡ÒÃÊÃéÒ§ Parent Directory ãËé´éÇ¡óշÕèÂѧäÁèÁÕ¡ÒÃÃÐºØ directory ã¹·Õè¹ÕéÍÒ¨à»ç¹ relative
ËÃ×Í absolute path ¡çä´é
µÑÇÍÂèÒ§
mkdir /home
mkdir -p -m755 ~/éhome/user1

mv
à»ç¹¤ÓÊÑ觷ÕèãªéÊÓËÃѺ¡ÒÃÂéÒÂá¿éÁ¢éÍÁÙÅáÅÐ Directory ÃÇÁ¶Ö§¡ÒÃà»ÅÕ蹪×èÍ´éÇ (㹷ӹͧà´ÕÂǡѺ dos)
ÁÒ¨Ò¡¤ÓÇèÒ move
ÃٻẺ¤ÓÊÑè§ mv source target
µÑÇÍÂèÒ§ mv *.tar /backup
mv test.txt old.txt
mv bin oldbin

more
¤ÅéÒ¡Ѻ¤ÓÊÑè§ cat äÁèàËÁÒСѺ¡Òô٢éÍÁÙÅ·ÕèÁÕ¤ÇÒÁÂÒÇÁÒ¡æ ´Ñ§¹Ñé¹ ¨Ö§ä´éÁÕ¡ÒþѲ¹Ò more ¢Öé¹
à¾×èͪèÇÂãËéÊÒÁÒö´Ù¢éÍÁÙÅ·ÕèÁÕ¢¹Ò´ÂÒÇä´éà»ç¹ªèǧæ
ÃٻẺ¤ÓÊÑè§ more file
ÀÒÂã¹â»Ãá¡ÃÁ more ¨ÐÁÕ¤ÓÊÑè§à¾×èÍãªé§Ò¹¤ÃÒÇæ ´Ñ§¹Õé
= áÊ´§àÅ¢ºÃ÷Ѵ
q ÍÍ¡¨Ò¡â»Ãá¡ÃÁ
àÅ×è͹ä»Âѧ˹éÒ¶Ñ´ä» àÅ×è͹ä»ÂѧºÃ÷Ѵ¶Ñ´ä»
h áÊ´§ help
µÑÇÍÂèÒ§ more test.txt

man
¤ÓÊÑè§ man ¢Í§Ãкº Unix,Linux (à»ç¹¤ÓÊÑè§áÊ´§¢éͤÇÒÁ ͸ԺÒ¡ÒÃãªé¤ÓÊÑè§)
ÃٺẺ¡ÒÃãªé§Ò¹man (Command)
µÑÇÍÂèÒ§ #man ls
ËÁÒÂà赯 àÁ×è͵éͧ¡ÒÃÍÍ¡ ¡´ q ;ãªé[Spacebar] àÅ×è͹˹éÒ¶Ñ´ä» ; ãªéÅÙ¡ÈâÖé¹´Ù˹éÒ¼èÒ¹ÁÒ

mount
¤ÓÊÑè§ mount ¢Í§Ãкº Unix,Linux (à»ç¹¤ÓÊÑè§àª×èÍÁµèÍÍØ»¡Ã³ìà¢éҡѺÃкº)
ÃٺẺ¡ÒÃãªé§Ò¹ mount (-t type) DeviceDriver MountPoint
µÑÇÍÂèÒ§ # ¡Òà MountẺ·Õè1 CdRom mount -t iso9660 /dev/cdrom /mnt/cdrom
#¡Òà Mount CdRom Ẻ·Õè2 mount /dev/cdrom (àÁ×èÍmountáÅéÇCD¨ÐÍÂÙè·Õè /mnt/CdRom ¡àÅÔ¡´Ù¤ÓÊÑè§ Unmount)

rmdir
à»ç¹¤ÓÊÑ觷ÕèãªéÊÓËÃѺ¡ÒÃź directory (㹷ӹͧà´ÕÂǡѺ dos) ÁÒ¨Ò¡¤ÓÇèÒ remove directory
â¤Ã§ÊÃéÒ§¤ÓÊÑè§
rmdir [option] [file]
â´Â option ·ÕèÁÑ¡ãªé¡Ñ¹ã¹ mkdir ¤×Í -p ¨Ð·Ó¡ÒÃź Child áÅÐ Parent Directory µÒÁÅӴѺ
directory ã¹·Õè¹ÕéÍÒ¨à»ç¹ relative ËÃ×Í absolute path ¡çä´é µÑÇÍÂèÒ§ rmdir /home

tar
à»ç¹¤ÓÊÑè§à¾×èÍ¡Òà backup áÅÐ restore file ·Ñ駹Õé¡Òà tar ¨Ðà¡çº·Ñé§â¤Ã§ ÊÃéÒ§ directory áÅÐ file permission ´éÇÂ
(àËÁÒÐÊÓËÃѺ¡ÒÃà¤Å×è͹ÂéÒ ËÃ×Íᨡ¨èÒÂâ»Ãá¡ÃÁº¹Ãкº UNIX) ÁÒ¨Ò¡¤ÓÇèÒ tape archive
ÃٻẺ¤ÓÊÑè§ tar [option]... [file]...
â´Â option ·ÕèÁÑ¡ãªé¡Ñ¹ã¹ echo ¤×Í
-c ·Ó¡ÒÃÊÃéÒ§ãËÁè (backup)
-t áÊ´§ÃÒª×èÍá¿éÁ¢éÍÁÙÅã¹á¿éÁ·Õè backup äÇé
-v µÃǨÊͺ¤ÇÒÁ¶Ù¡µéͧ¢Í§¡ÒûÃÐÁÇżÅ
-f ¼ÅÅѾ¸ì¢Í§ÁÒ·Õè file
-x ·Ó¡ÒÃ restore
µÑÇÍÂèÒ§ tar -xvf data.tar

talk
¤ÓÊÑ觷ÕèãªéÊÓËÃѺ¡Òþٴ¤ØÂÃÐËÇèÒ§¼Ùéãªé´éÇ¡ѹº¹Ãкº «Ö觼Ùéãªé·Ñ駷Ñé§ 2 ½èÒ¨еéͧ¾ÔÁ¾ì¤ÓÊÑè§ Talk ¶Ö§¡Ñ¹¡è͹ ¨Ö§¨ÐàÃÔèÁ¡ÒÃʹ·¹Òä´é
ÃٻẺ¤ÓÊÑè§ talk user[@host] [tty]
¡Ã³ÕäÁèÃÐºØ host â»Ãá¡ÃÁ¨Ð¶×ÍÇèÒËÁÒ¶֧à¤Ã×èͧ»Ñ¨¨ØºÑ¹ (¹Í¡¨Ò¡¹ÕéÂѧÁÕ¤ÓÊÑè§ ytalk «Öè§ÊÒÁÒö¾Ù´¤ØÂä´é¾ÃéÍÁ
¡Ñ¹ÁÒ¡¡ÇèÒ 2 ¤¹) «Ö§ºÒ§¡Ã³ÕàÃÒÍÒ¨¨ÐµéͧÃÐºØ tty ´éÇÂËÒ¡ÁÕ¼Ùéãªé Log in à¢éÒÊÙèÃкº´éǪ×èÍà´ÕÂǡѹÁÒ¡¡ÇèÒ 1 ˹éÒ¨Í
µÑÇÍÂèÒ§ talk m2k@nanastreet.com

write
¤ÓÊÑè§ãªéà¾×èÍ¡ÒÃÊ觢éÍÁÙÅ·Ò§à´ÕÂǨҡ¼Ùéà¢Õ¹件֧¼ÙéÃѺº¹à¤Ã×èͧà´ÕÂǡѹà·èÒ¹Ñé¹
ÃٻẺ¤ÓÊÑè§ write user [tty]
àÁ×èÍÁÕ¡ÒþÔÁ¾ì¤ÓÊÑè§ write ¼Ùéãªé¨ÐàËç¹¢éͤÇÒÁ«Ö觨ÐáÊ´§ÇèÒ¢éͤÇÒÁ´Ñ§¡ÅèÒǶ١Êè§ÁÒâ´Âã¤Ã «Öè§ËÒ¡¼ÙéÃѺµéͧ¡ÒÃ
µÍº¡ÅѺ ¡ç¨Ðµéͧãªé¤ÓÊÑè§ write àªè¹¡Ñ¹ àÁ×è;ÔÁ¾ìàÊÃç¨áÅéÇãËé¾ÔÁ¾ìµÑÇÍÑ¡Éà EOF ËÃ×Í ¡´ CTRL+C à¾×èÍà»ç¹
¡Òà interrupt ·Ñ駹Õé¢éͤÇÒÁ·Õè¾ÔÁ¾ìËÅѧ¨Ò¡ write ¨Ð¶Ù¡Êè§ËÅѧ¨Ò¡¡Òá´ Enter à·èÒ¹Ñé¹
µÑÇÍÂèÒ§ write m2k

who am i
¤ÓÊÑè§ãªéà¾×èÍáÊ´§ÇèÒ¼Ùéãªé«Öè§ login à¢éÒÊÙèÃкº¹Ñé¹ (µÑÇàÃÒàͧ) login ´éǪ×èÍÍÐäÃ
ÃٻẺ¤ÓÊÑè§/µÑÇÍÂèÒ§ whoami ËÃ×Í who am i (º¹ SUN OS ËÃ×Í UNIX ºÒ§µÑÇà·èÒ¹Ñé¹)

file
¤ÓÊÑè§fileº¹Ãкº DOS/Windows ¹Ñé¹ »ÃÐàÀ·¢Í§á¿éÁ¢éÍÁÙŨж١ÃкشéǹÒÁÊ¡ØÅ áµèã¹ UNIX ¨ÐäÁèÁÕ
¹ÒÁÊ¡ØÅà¾×èÍãªéÃкػÃÐàÀ·¢Í§á¿éÁ¢éÍÁÙÅ ´Ñ§¹Ñ鹡ÒÃËÒ»ÃÐàÀ·¢Í§á¿éÁ¢éÍÁÙŨд٨ҡ Context ÀÒÂã¹
¢Í§á¿éÁ «Ö觤ÓÊÑè§ file ¨Ð·Ó¡ÒÃÍèÒ¹ Content áÅк͡»ÃÐàÀ·¢Í§á¿éÁ¢éÍÁÙŹÑé¹æ
ÃٻẺ¤ÓÊÑè§ file [option]... file
µÑÇÍÂèÒ§ file /bin/sh file report1.doc

free
áÊ´§Ë¹èǤÇÒÁ¨Ó·ÕèàËÅ×ÍÍÂÙ躹Ãкº
â¤Ã§ÊÃéÒ§¤ÓÊÑè§ free [-b|-k|-m]
â´Â option ·ÕèÁÑ¡ãªé¡Ñ¹ã¹ free ¤×Í
-b áÊ´§¼ÅÅѾ¸ìà»ç¹Ë¹èÇ byte
-k áÊ´§¼ÅÅѾ¸ìà»ç¹Ë¹èÇ kilobyte
-m áÊ´§¼ÅÅѾ¸ìà»ç¹Ë¹èÇ megabyte
µÑÇÍÂèÒ§ free     free –b  free -k

pwd
à»ç¹¤ÓÊÑ觷ÕèãªéÊÓËÃѺáÊ´§ Directory »Ñ¨¨ØºÑ¹ (㹷ӹͧà´ÕÂǡѺ¡ÒþÔÁ¾ì cd º¹ DOS) ÁÒ¨Ò¡¤ÓÇèÒ print work directory
ÃٻẺ¤ÓÊÑè§ / µÑÇÍÂèÒ§ pwd

uname
¤ÓÊÑè§áÊ´§ ª×èÍáÅÐÃØ蹢ͧ OS ª×èÍáÅÐÃØ蹢ͧ cpu ª×èÍà¤Ã×èͧ
µÑÇÍÂèÒ§ uname -a

hostname
¤ÓÊÑè§áÊ´§ª×èÍà¤Ã×èͧ·ÕèãªéÍÂÙè
µÑÇÍÂèÒ§ hostname

tty
áÊ´§ËÁÒÂàÅ¢ terminal ·Õèãªé§Ò¹ÍÂÙè
µÑÇÍÂèÒ§ tty

id
ãªéáÊ´§ª×èÍáÅСÅØèÁÁ¢Í§¼Ùéãªé§Ò¹
µéÇÍÂèÒ§ id

 

 

¤ÓÊÑ觢Ñé¹ÊÙ§ LINUX áÅÐ UNIX (Linux µÍ¹·Õè2)
 

1.1 ¤ÓÊÑè§ ls : ãªéáÊ´§ÃÒª×èÍá¿éÁ·Ñé§ËÁ´ã¹ home directory

--------------------------------------------------------------------------------
·Ø¡·èÒ¹·ÕèÁÕ account ã¹ linux ¨ÐÁÕ home directory ¢Í§µ¹àͧ à¾×èÍãªéà¡çºá¿éÁµèÒ§ æ ÀÒÂãµéÃкº
linux àÁ×è͵éͧ¡Ò÷ÃÒºÇèÒÁÕá¿éÁÍÐä÷Õèà¡çºäÇéºéÒ§ ÊÒÁÒöãªé¤ÓÊÑè§ ls ä´é áÅÐÊÒÁÒö¡Ó˹´ parameter ä´éËÅÒµÑÇ àªè¹ -al --sort à»ç¹µé¹
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹


ls -alt :: à¾×èÍáÊ´§ÃÒª×èÍá¿éÁ·Ñé§ËÁ´ áÅШѴàÃÕ§µÒÁàÇÅÒ ãËéÅͧźÍÑ¡ÉÃÍÍ¡·ÕÅеÑǨҡ alt ´Ù¹Ð¤ÃѺ
ls -alt | more :: à¾×èÍáÊ´§ÃÒª×èÍá¿éÁ·Ñé§ËÁ´ áµèËÂØ´·ÕÅÐ˹éÒ àÁ×èÍÁըӹǹá¿éÁà¡Ô¹·Õè¨ÐáÊ´§ä´é ã¹ 1 ˹éÒ
ls -al --sort=time | more :: áÊ´§ÃÒª×èÍá¿éÁàÃÕ§µÒÁàÇÅÒ á¡·ÕÅÐ˹éÒ â´ÂÅÐàÍÕ´
ls -R | more :: áÊ´§ÃÒª×èÍã¹·Ø¡ directory ã¹Ëéͧ»Ñ¨¨ØºÑ¹
¶éÒÊѧࡵ¹Ð¤ÃѺ á¿éÁ·ÕèÁÕ . ˹éÒª×èÍá¿éÁ ¨ÐËÁÒ¶֧á¿éÁ·Õè«è͹äÇé ¶éÒãªé¤ÓÊÑè§ ls ËÃ×Í ls -l ¨ÐäÁèàËç¹á¿éÁàËÅèÒ¹Õé
¶éÒÁÕÍÑ¡Éà D ·Õè Column áá 㹵͹áÊ´§ª×èÍá¿éÁ ´éǤÓÊÑè§ ls -al ¡ç¨ÐËÁÒ¶֧ directory äÁèãªèá¿éÁ¸ÃÃÁ´Ò

--------------------------------------------------------------------------------
1.2 ¤ÓÊÑè§ chmod : ãªéà»ÅÕè¹ÊÔ·¸Ôì¢Í§á¿éÁ à¨éҢͧ(Owner), ¤¹ã¹¡ÅØèÁ(Group), ¤¹Í×è¹(Other) ÊÒÁÒö·ÓÍÐäÃä´éºéÒ§
--------------------------------------------------------------------------------
àÁ×èÍãªé¤ÓÊÑè§ ls ·èÒ¹¨ÐàËç¹µÑÇÍÑ¡Éà RWXRWXRWX ËÃ×ͷӹͧ¹Õé˹éÒª×èÍá¿éÁ «Öè§à»ç¹¡ÒáÓ˹´
ÊÔ·¸Ôì¢Í§áµèÅÐá¿éÁ ÇèÒ ÍèÒ¹ä´é à¢Õ¹ä´é áÅлÃÐÁÇżÅä´é â´Âá¡à»ç¹Êèǹ¢Í§ à¨éҢͧ ¡ÅØèÁ ¤¹Í×è¹
«Öè§à»ç¹¤ÓÊÑ觷Õè¨Óà»ç¹ÁÒ¡ÊÓËÃѺ webmaster 㹡ÒôÙáÅÃкº áÅзèÒ¹·Õèµéͧ¡ÒÃà¢Õ¹ CGI
¨ÐµéͧÃÙé¤ÓÊÑ觹Õé à¾ÃÒÐ àÁ×èÍÊè§á¿éÁ CGI à¢éÒä»ã¹ server áÅеéͧ¡ÒÃãË餹·ÑèÇä»à¢éÒÁÒãªéºÃÔ¡ÒÃ
â»Ãá¡ÃÁ¢Í§µ¹·Õèà¢Õ¹¢Öé¹´éÇ Perl ¨ÐäÁèÊÒÁÒöãªéä´é ¶éÒäÁè¡Ó˹´ãË餹Í×è¹ ÊÒÁÒö»ÃÐÁÇżÅä´é (x)
¨Ö§¨Óà»ç¹µéͧãªé¤ÓÊÑè§ àªè¹ chmod 755 hello.pl ËÃ×Í chmod 775 fileforyou.pl ËÃ×Í chmod +x test.pl à»ç¹µé¹ ã¹áµèÅСÅØèÁ¨ÐÁÕ¡ÒáÓ˹´ÊÔ·¸Ôä´é 3 Ẻ
µÑÇÍÑ¡Éà R ÁÒ¨Ò¡ Read ËÁÒ¶֧ ÍèÒ¹
µÑÇÍÑ¡Éà W ÁÒ¨Ò¡ Write ËÁÒ¶֧ à¢Õ¹
µÑÇÍÑ¡Éà X ÁÒ¨Ò¡ Execute ËÁÒ¶֧ »ÃÐÁÇżÅ
µÑÇÍÂèÒ§àªè¹
--- : äÁèÁÕÊÔ·¸ÔÍÐäÃàÅ (àÅ¢·Õèãªé¤×Í 0)
--X : »ÃÐÁÇżÅä´éÍÂèÒ§à´ÕÂÇ (àÅ¢·Õèãªé¤×Í 1)
R-- : ÍèÒ¹ä´éÍÂèÒ§à´ÕÂÇ (àÅ¢·Õèãªé¤×Í 4)
RW- : ÍèÒ¹ áÅÐà¢Õ¹ä´é (àÅ¢·Õèãªé¤×Í 6)
R-X : ÍèÒ¹ áÅлÃÐÁÇżÅä´é (àÅ¢·Õèãªé¤×Í 5)
RWX : ÍèÒ¹ à¢Õ¹ áÅлÃÐÁÇżÅä´é (àÅ¢·Õèãªé¤×Í 7)  ¤ÇÒÁËÁÒ¢ͧ RWXRWXRWX ¨ÐàËç¹ÇèÒÁÕÍÑ¡Éà 9 µÑÇ
3 µÑÇááËÁÒ¶֧ à¨éҢͧ
3 µÑÇ·ÕèÊͧËÁÒ¶֧ ¡ÅØèÁ
3 µÑÇ·ÕèÊÒÁËÁÒ¶֧ ¤¹Í×è¹
µÑÇÍÂèÒ§àªè¹
RWX------ : à¨éҢͧà·èÒ¹Ñé¹·ÕèÁÕÊÔ·¸Ô·Ø¡ÍÂèÒ§ (àÅ¢·Õèãªé¤×Í 700)
RWXRWX--- : à¨éҢͧ áÅÐÊÒÁÒªÔ¡¡ÅØèÁà´ÕÂǡѹÁÕÊÔ·¸Ô·Ø¡ÍÂèÒ§ (àÅ¢·Õèãªé¤×Í 770)
RWXR-XR-X : à¨éҢͧ·Óä´éËÁ´ Êèǹ¡ÅØèÁáÅФ¹Í×è¹ÍèÒ¹áÅлÃÐÁÇżÅä´é (àÅ¢·Õèãªé¤×Í 755)
R--R--R-- : ·Ø¡¤¹ÍèÒ¹ä´éÍÂèÒ§à´ÕÂÇ (àÅ¢·Õèãªé¤×Í 444)

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
chmod 777 index.php :: ·ÓãËéá¿éÁ¹Õé ÍèÒ¹ à¢Õ¹ áÅлÃÐÁÇżŠâ´Â·Ñé§ 3 ¡ÅØèÁ
chmod 755 * -Rf :: ·ÓãËé·Ø¡á¿éÁ ·Ø¡ direcroty ã¹Ëéͧ»Ñ¨¨ØºÑ¹ à»ÅÕè¹µÒÁ·Õè¡Ó˹´

--------------------------------------------------------------------------------
1.3 ¤ÓÊÑè§ man : à»ç¹¤ÓÊÑ觷ÕèÊӤѭÁÒ¡ à¾ÃÒШЪèÇÂãËé͸ԺÒ¤ÓÊÑ觵èÒ§ æ ãËé·èÒ¹ä´é (Manual)
--------------------------------------------------------------------------------
¼Áàª×èÍÇèÒ·Ø¡¤¹·Õèãªé unix ËÃ×Í linux µéͧà¤Âãªé¤ÓÊÑ觹ÕéÁÒ¡è͹ à¾ÃÒШÐà»ç¹¤ÓÊÑ觷ÕèªèÇÂ͸ԺÒÂ˹éÒ·Õè¢Í§¤ÓÊÑè§
¾ÃéÍÁ¡ÑºáÊ´§ parameter ·ÕèÊÒÁÒöãªéä´é·Ñé§ËÁ´¢Í§¤ÓÊÑ觹Ñé¹ áÅÐÂѧÁÕµÑÇÍÂèÒ§¡ÒÃãªé áÅФÓÊÑ觷Õèà¡ÕèÂÇ¢éͧÍÕ¡
·ÓãËé»ÃÐËÂÑ´àÇÅÒ㹡Òäé¹àÍ¡ÊÒÃä´éÍÂèÒ§ÁÒ¡ ºÒ§·èÒ¹ÍÒ¨ÈÖ¡ÉÒ linux ´éÇ¡ÒÃÍèÒ¹¨Ò¡ man
ÍÂèÒ§à´ÕÂÇàÅ¡çÁչФÃѺ â´ÂäÁèµéͧä»ËÒ«×éÍ˹ѧÊ×Í·Õèä˹ÁÒÍèÒ¹¡ç·Óä´é
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
man man :: à¾×èÍ͸ԺÒ¤ÓÊÑè§ man àͧ ÇèÒµÑǤÓÊÑ觹ÕéãªéÍÂèÒ§äÃ
man ls :: à¾×èÍ͸ԺÒ¤ÓÊÑè§ ls ÇèÒãªéÍÂèÒ§äÃ
man useradd :: à¾×èÍ͸ԺÒ¤ÓÊÑè§ useradd ÇèÒãªéÍÂèÒ§äÃ

--------------------------------------------------------------------------------
1.4 ¤ÓÊÑè§ mkdir, rmdir, cd : §Ò¹µèÒ§ æ à¡ÕèÂǡѺ directory
--------------------------------------------------------------------------------
¼Ùéãªé¤ÍÁ¾ÔÇàµÍÃì·Õèãªé dos ÁÒ¡è͹µéͧ¤Øé¹à¤Â¡Ñº directory á¹è¹Í¹ ÊÓËÃѺ¤ÓÊÑè§à¡ÕèÂǡѺ directory
ã¹·Õè¹ÕéÁÕ 3 ¤ÓÊÑè§ mkdir ËÁÒ¶֧ ÊÃéÒ§ directory (Make directory) rm ËÁÒ¶֧ ź directory
(Remove directory) áÅФÓÊÑ觹ÕéÂѧãªéźá¿éÁµÒÁ»¡µÔä´éÍÕ¡´éÇ cd ËÁÒ¶֧à»ÅÕè¹ directory (Change directory)
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
mkdir hello :: ÊÃéÒ§ directory ª×èÍ hello ã¹Ëéͧ»Ñ¨¨ØºÑ¹
rmdir hello.htm :: ¨Ðźá¿éÁª×èÍ hello.htm
cd / :: ÂéÒ directory ä»Âѧ root ËÃ×ÍËéͧ¹Í¡ÊØ´
cd .. :: ÂéÒ directory Í͡仢éÒ§º¹ 1 ÃдѺ
cd ~/x :: à¢éÒä»ÂѧËéͧ x ¢Í§ home directory àªè¹ /home/thaiall/x ¶éÒ home directory ¤×Í /home/thaiall

--------------------------------------------------------------------------------
1.5 â»Ãá¡ÃÁ pico : à»ç¹ editor ·ÕèãªéÊÓËÃѺá¡éä¢á¿éÁẺ text ¤ÅéÒ vi áµèÁÕ»ÃÐÊÔ·¸ÔÀÒ¾¡ÇèÒÁÒ¡
--------------------------------------------------------------------------------
à¾Õ§áµè¾ÔÁ¾ì¤ÓÇèÒ pico áÅéÇ enter ¡çãªé§Ò¹ä´éàÅ ¡ÒèШѴà¡çº ËÃ×ͧҹµèÒ§ æ ·ÕèÁÕºÃÔ¡ÒÃäÇéÁÒ¡ÁÒÂ
·èÒ¹ÊÒÁÒöÍèÒ¹ä´é¨Ò¡àÁ¹Ù´éÒ¹ÅèÒ§ «Öè§à¤Ã×Íè§ËÁÒ ^ ËÁÒ¶֧¡Òá´»ØèÁ Ctrl »ÃСͺÍÑ¡ÉõèÒ§ æ ¹Ñè¹àͧ
¼Á¤Ô´ÇèÒ·èÒ¹¹èҨоÍÍèÒ¹ÃÙéàÃ×èͧ ËÃ×ͨоÔÁ¾ìÇèÒ pico xx ¡ç¨Ðà»ç¹¡ÒÃÊÃéÒ§á¿éÁª×èÍ xx ãËé·Ñ¹·Õ áµèËÒ¡ÁÕáÅéÇ
¡ç¨Ðà»Ô´á¿éÁ xx ÁÒãËéá¡éä¢ã¹â»Ãá¡ÃÁ xx àÁ×èÍ·èÒ¹µéͧ¡ÒÃàÅÔ¡¡ç·Óä´éâ´Â¡´»ØèÁ Ctrl-X à»ç¹ÍѹàÃÕºÃéÍÂ
ËÒ¡·èÒ¹ã´à¤Âãªé vi àÁ×èÍÅͧãªéâ»Ãá¡ÃÁ¹Õé¨ÐµÔ´ã¨ÍÂèÒ§á¹è¹Í¹ à¾ÃÒÐãªé§Ò¹ä´é§èÒ¡ÇèÒ ËÅÒÂà·èҹѡ ËÅÒ¤ÃÑé§
·Õè¾ÔÁ¾ì¤ÓÇèÒ pico áÅéÇäÁèÁÕã¹à¤Ã×èͧ ¡çà¾ÃÒÐäÁèä´éŧâ»Ãá¡ÃÁ pine àÁ×è͵éͧ¡ÒÃãªé pico ¡çµéͧµÔ´µÑé§â»Ãá¡ÃÁ
pine à¢éÒä»ã¹à¤Ã×èͧ ¨Ò¡á¼è¹ CD ´éǤÓÊÑè§ rpm -i pine*
--------------------------------------------------------------------------------
1.6 â»Ãá¡ÃÁ emacs : à»ç¹ editor ·ÕèãªéÊÓËÃѺá¡éä¢á¿éÁẺ text ¤ÅéÒ vi áµèÁÕ»ÃÐÊÔ·¸ÔÀÒ¾¡ÇèÒÁÒ¡
--------------------------------------------------------------------------------
·Ó§Ò¹ä´é¤ÅéÒÂ æ ¡Ñº pico áµèËÅÒ¤¹ºÍ¡ÇèÒ µÑǹÕé·Ó§Ò¹ä´é´Õ¡ÇèÒ áµè¼ÁÇèÒ pico ãªé§Ò¹ä´é§èÒ¡ÇèҡѹàÂÍÐàÅÂ
à¾ÃÒÐàËç¹àÁ¹Ù´éÒ¹ÅèÒ§ áµè¢Í§ emacs ¨Ðãªé ctrl-h ´ÙÊèǹªèÇÂàËÅ×Í áÅС´ ctrl-x + ctrl-c ¨Ö§¨ÐÍÍ¡¨Ò¡â»Ãá¡ÃÁ
ÍÒ¨à»ç¹à¾ÃÒмÁãªéäÁèªÓ¹Ò­Áѧ¤ÃѺ ã¹àÁ×èͼÁãªé pico à»ç¹ editor ¼Á¤§äÁè¨Óà»ç¹µéͧÈÖ¡ÉÒ emacs à¾ÔèÁàµÔÁáÅéÇ
¡àÇé¹ÇèÒÊÑ¡ÇѹÍÒ¨ÁÕà˵بÓà»ç¹·Õè¤ÇÒÁÊÒÁÒö¢Í§ pico ãËéäÁèä´é áµè emacs ãËéä´é¡çà»ç¹ä´é
Welcome to GNU Emacs, one component of a Linux-based GNU system.
Get help           C-h  (Hold down CTRL and press h)
Undo changes       C-x u       Exit Emacs               C-x C-c
Get a tutorial     C-h t       Use Info to read docs    C-h i
Ordering manuals   C-h RET
Activate menubar   F10  or  ESC `  or   M-`
(`C-' means use the CTRL key.  `M-' means use the Meta (or Alt) key.
If you have no Meta key, you may instead type ESC followed by the character.)


--------------------------------------------------------------------------------
1.7 â»Ãá¡ÃÁ vi : à»ç¹ editor ·ÕèãªéÊÓËÃѺá¡éä¢á¿éÁẺ text
--------------------------------------------------------------------------------
Text editor ·Õèãªé§Ò¹ä´éÂÒ¡ áµèÁÕã¹ linux ·Ø¡ÃØè¹ ã¹ºÒ§à¤Ã×èͧäÁèÁÕ pico à¾ÃÒÐäÁèä´éµÔ´µÑé§ mail ËÃ×Í pine ¨Ö§¨Óà»ç¹µéͧãªéâ»Ãá¡ÃÁ vi ÊÓËÃѺá¡é䢢éÍÁÙÅã¹á¿éÁµèÒ§ æ ¢Í§ linux àªè¹¡ÒÃãªé¤ÓÊÑè§ man ¡ç¤×Í¡ÒÃãªé¤ÇÒÁÊÒÁÒö¢Í§ vi 㹡ÒùӢéÍÁÙÅÁÒáÊ´§¼Å¹Ñè¹àͧ
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
esc     ¡ÅѺä»ÂѧâËÁ´¤ÓÊÑè§
enter   ÂéÒÂä»Âѧµé¹ºÃ÷Ѵ¢Í§ºÃ÷Ѵ¶Ñ´ä»
i       ãÊè¢éͤÇÒÁ¡è͹à¤ÍÃìà«ÍÃì
a       ãÊè¢éͤÇÒÁËÅѧà¤ÍÃìà«ÍÃì
A       ãÊè¢éͤÇÒÁ·Õè·éÒºÃ÷Ѵ»Ñ¨¨ØºÑ¹
dd      źºÃ÷Ѵ»Ñ¨¨ØºÑ¹·Ñ駺Ã÷Ѵ
x       źÍÑ¡Éà 1 µÑÇÍÑ¡ÉÃ
cw      à»ÅÕè¹¢éͤÇÒÁ
:w      ºÑ¹·Ö¡á¿éÁ
:q!     ÍÍ¡â´ÂäÁè à»ÅÕè¹á»Å§ã´ æ
:wq     ºÑ¹·Ö¡á¿éÁ áÅÐÍÍ¡¨Ò¡â»Ãá¡ÃÁ vi


--------------------------------------------------------------------------------
1.8 ¤ÓÊÑè§ id, finger, who, w : ·Ø¡¤ÓÊÑ觢éÒ§µé¹ãªéÊÓËÃѺµÃǨÊͺ¼Ùéãªé áµè¨ÐãËéÃÒÂÅÐàÍÕ´µèÒ§¡Ñ¹ä»
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
id uname :: ãªéµÃǨ´ÙÇèÒÁÕ account uname ¹Õéã¹ÃкºËÃ×ÍäÁè ãËé¼ÅÊÑé¹
finger uname :: ãªéµÃǨ´ÙÇèÒÁÕ account uname ¹Õéã¹ÃкºËÃ×ÍäÁè ãËé¼ÅÅÐàÍÕ´ ·Ñé§ last login ËÃ×Í email ©ºÑºÅèÒÊØ´
finger @www.isinthai.com :: ãªéáÊ´§ÃÒª×èÍ·Ø¡¤¹ã¹Ãкº·Õè¡ÓÅѧ login ÍÂÙèã¹Ãкº ãªéä´é¡Ñº·Ø¡Ãкº·ÕèäÁè»Ô´ºÃÔ¡ÒùÕé
who |grep thai :: ãªéáÊ´§ÃÒª×èÍ·Ø¡¤¹ã¹Ãкº áµèãªé¹Í¡Ãкºµ¹àͧäÁèä´é áÅÐàÅ×͡੾ÒкÃ÷Ѵ·ÕèÁÕÍÑ¡Éà thai
w :: ãªéáÊ´§ÃÒª×èÍ·Ø¡¤¹ã¹Ãкº áµèãªé¹Í¡Ãкºµ¹àͧäÁèä´é

--------------------------------------------------------------------------------
1.9 ¤ÓÊÑè§ cat : áÊ´§¢éÍÁÙÅã¹á¿éÁ ¤ÅéÒ¤ÓÊÑè§ type ã¹Ãкº DOS
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
cat /etc/passwd :: áÊ´§¢éÍÁÙÅã¹á¿éÁ /etc/passwd
cat /etc/passwd | more :: áÊ´§¢éÍÁÙÅã¹á¿éÁ /etc/passwd ·ÕÅÐ˹éÒ
µÑÇÍÂèÒ§¢éÍÁÙÅã¹á¿éÁ passwd suwit:x:500:500:Suwit:/home/suwit:/bin/bash prasert:x:501:501::
/home/prasert:/bin/bash bcom101:x:502:502::/home/bcom302:/bin/bash

--------------------------------------------------------------------------------
1.10 ¤ÓÊÑè§ ifconfig : áÊ´§¢éÍÁÙÅà¡ÕèÂǡѺ Network interface áÅÐáÊ´§ ip µèÒ§ æ ·ÕèÁÕ¡ÒÃà¾ÔèÁà¢éÒä»ã¹ server ä´é
--------------------------------------------------------------------------------

´Ù¼Å¡Ò÷ӧҹ¢Í§¤ÓÊÑè§ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:20:18:C0:06:C4
inet addr:202.29.78.12  Bcast:202.29.78.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:673054 errors:0 dropped:0 overruns:0 frame:0
TX packets:666268 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:74892865 (71.4 Mb)  TX bytes:680121131 (648.6 Mb)
Interrupt:9 Base address:0xcf00
eth0:1    Link encap:Ethernet  HWaddr 00:20:18:C0:06:C4
inet addr:202.29.78.1  Bcast:202.29.78.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
Interrupt:9 Base address:0xcf00

à¾ÔèÁ ip ãËÁèÍÕ¡ 1 ip àªè¹ #/sbin/ifconfig eth0:1 202.29.78.1
ÊÒÁÒö´ÙÇÔ¸Õà¾ÔèÁËÅÒ IP 㹤ÍÁ¾ÔÇàµÍÃìà¤Ã×èͧà´ÕÂÇ ä´é¨Ò¡ËÑÇ¢éÍ 9.10 ´éÇ¡ÒÃá¡éä¢á¿éÁ /etc/rc.d/rc.local

--------------------------------------------------------------------------------
1.11 ¤ÓÊÑè§ netstat : áÊ´§Ê¶Ò¹Ð¢Í§à¤Ã×Í¢èÒÂÇèÒÁÕâ»Ãá¡ÃÁã´à»Ô´ãËéºÃÔ¡ÒÃ
--------------------------------------------------------------------------------

´Ù¼Å¡Ò÷ӧҹ¢Í§¤ÓÊÑè§ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:mysql                 *:*                     LISTEN
tcp        0      0 *:http                  *:*                     LISTEN
tcp        0      0 *:ftp                   *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 *:smtp                  *:*                     LISTEN
tcp        0      0 *:https                 *:*                     LISTEN
tcp        0      0 www.isinthai.com:ssh    202.29.78.200:1225      ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     STREAM     LISTENING     855    /var/lib/mysql/mysql.sock
unix  2      [ ACC ]     STREAM     LISTENING     119    /dev/log
unix  2      [ ]         STREAM     CONNECTED     3007
unix  2      [ ]         STREAM     CONNECTED     859


--------------------------------------------------------------------------------
1.12 ¤ÓÊÑè§ service : ´ÙʶҹТͧºÃÔ¡ÒõèÒ§ æ ÇèÒ¶Ù¡à»Ô´ËÃ×Í running ÍÂÙèËÃ×ÍäÁè
--------------------------------------------------------------------------------

´Ù¼Å¡Ò÷ӧҹ¢Í§¤ÓÊÑè§ service --status-all
httpd (pid 2160 2159 2158 2155 2114 583 579 578 577 576 575 573) is running...
mysqld (pid 446 429 427 414) is running...
sendmail (pid 1700 1690) is running...
sshd (pid 2970 358) is running...
xinetd (pid 3923 369) is running...


--------------------------------------------------------------------------------
1.13 ¤ÓÊÑè§ xinetd : ´ÙºÃÔ¡ÒÃÀÒÂã¹ xinetd ÇèÒÍÐäÃà»Ô´ÍÂÙèºéÒ§ ·ÓãËéà¢éÒä»à»Ô´·ÕèËéͧ /etc/xinetd.d
áÅéÇàÅ×Í¡à»Ô´ºÃÔ¡ÒÃ੾ÒзÕèµéͧ¡Òà àªè¹á¡éá¿éÁ talk à¾×èÍãËéà»Ô´ºÃÔ¡Òà talk ã¹ server à»ç¹µé¹
--------------------------------------------------------------------------------

´Ù¼ÅºÒ§Êèǹ¨Ò¡¡Ò÷ӧҹ¢Í§¤ÓÊÑè§ xinetd -d
Service configuration: ftp
id = ftp
flags = IPv4
socket_type = stream
Protocol (name,number) = (tcp,6)
Nice = 10
Groups = no
Bind = All addresses.
Server = /usr/sbin/vsftpd
Server argv = vsftpd
Only from: All sites
No access: No blocked sites
Logging to syslog. Facility = authpriv, level = info
Log_on_success flags = HOST PID
Log_on_failure flags = HOST


--------------------------------------------------------------------------------
1.14 ¤ÓÊÑè§ whereis : ¤é¹ËÒá¿éÁ·Õèµéͧ¡ÒÃÇèÒÍÂÙè·ÕèËéͧ㴠áµè¤é¹ä´é੾ÒзÕè¡Ó˹´äÇéã¹ PATH à·èÒ¹Ñé¹ ËÒ¡µéͧ¡Òä鹷Ñé§à¤Ã×èͧµéͧãªé¤ÓÊÑè§ find
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
whereis usermod :: áÊ´§Ëéͧ·Õèà¡çº¤ÓÊÑè§ usermod ·ÓãËéÊÒÁÒöÊÑè§ run ¨Ò¡Ëéͧ·Õèà¡çº¤ÓÊÑè§â´ÂµÃ§ä´é
whereis ifconfig :: áÊ´§Ëéͧ·Õèà¡çº¤ÓÊÑè§ ifconfig ·ÓãËéãªé¤ÓÊÑè§àªè¹ /sbin/ifconfig ä´éâ´ÂµÃ§

--------------------------------------------------------------------------------
1.15 ¤ÓÊÑè§ cp, rm, mv : ¨Ñ´¡ÒÃá¿éÁàªè¹ ¤Ñ´ÅÍ¡ ź áÅÐÂéÒÂ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
cp x y :: à´ÔÁÁÕá¿éÁª×èÍ x µéͧ¡ÒÃá¿éÁ y ·ÕèàËÁ×͹ x ¢Öé¹ÁÒãËÁè ÊÒÁÒöãªé¤ÓÊÑè§ cp
rm y :: źá¿éÁ y ÍÍ¡¨Ò¡à¤Ã×èͧ «Öè§ÍÂÙèã¹ directory »Ñ¨¨ØºÑ¹
rm -r directoryname :: ¨Ðź directory ã¹à¤Ã×èͧ sun áÅÐá¿éÁ·Ñé§ËÁ´ã¹ directory ¹Ñé¹ áÅСÒÃźá¿éÁ ¨ÐÁÕ¡ÒöÒÁ confirm ·Ø¡á¿éÁàÊÁÍ
rm -rf directoryname :: ¨Ðź directory ãªéã¹ Redhat áÅÐá¿éÁ·Ñé§ËÁ´ã¹ directory ¹Ñé¹ áÅСÒÃźá¿éÁ ¨ÐÁÕ¡ÒöÒÁ confirm ·Ø¡á¿éÁàÊÁÍ
rm -f * :: źá¿éÁ·Ñé§ËÁ´â´ÂäÁè¶ÒÁ yes
mv x /root :: ÂéÒÂá¿éÁ x ¨Ò¡Ëéͧ»Ñ¨¨ØºÑ¹ä»äÇéã¹Ëéͧ /root

--------------------------------------------------------------------------------
1.16 ¤ÓÊÑè§ ping : µÃǨÊͺ ip ¢Í§à¤Ã×èͧà»éÒËÁÒ áÅСÒÃàª×èÍÁµèÍ internet
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
ping www.thaiall.com :: µÑÇÊͺ¡ÒÃÁÕÍÂÙè¢Í§ www.thaiall.com áÅÐáÊ´§àÅ¢ IP ¢Í§àÇ纹Õé
ping 202.29.78.100 -c 5 :: áÊ´§¼Å¡Ò÷´Êͺà¾Õ§ 5 ºÃ÷Ѵ
ping 202.29.78.2 :: ¼Å´Ñ§¢éÒ§ÅèÒ§¹Õé áÊ´§ÇèÒäÁ辺à¤Ã×èͧ·ÕèÁÕàÅ¢ ip ´Ñ§¡ÅèÒÇ PING 202.29.78.2 (202.29.78.2)
from 202.29.78.12 : 56(84) bytes of data. From 202.29.78.12 icmp_seq=1
Destination Host Unreachable From 202.29.78.12 icmp_seq=2 Destination
Host Unreachable From 202.29.78.12 icmp_seq=3 Destination Host Unreachable

--------------------------------------------------------------------------------
1.17 ¤ÓÊÑè§ env : áÊ´§¤èÒ environment »Ñ¨¨ØºÑ¹
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
env

HISTSIZE=1000
SSH_CLIENT=202.29.78.100 1091 22
OLDPWD=/usr/sbin
QTDIR=/usr/lib/qt3-gcc3.2
SSH_TTY=/dev/pts/0
USER=burin
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;.... :
PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
MAIL=/var/spool/mail/burin
PWD=/etc
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
HOME=/root
SHLVL=2
LOGNAME=burin
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env

--------------------------------------------------------------------------------
1.18 ¤ÓÊÑè§ lynx : Text browser ·Õèãªé§Ò¹§èÒ ãªé´Ù source ËÃ×Í download ä´é
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
lynx www.thaiall.com :: à¾×èÍà»Ô´àÇçº www.thaiall.com Ẻ text mode
lynx http://www.yonok.ac.th :: à¾×èÍà»Ô´àÇçº www.yonok.ac.th Ẻ text mode
lynx -dump http://www.yonok.ac.th :: à¾×èÍáÊ´§¼ÅÅѾ¸ìẺäÁè interactive ¤×Í¡Òà view ¼ÅáÅéÇËÂØ´·Ñ¹·Õ
lynx -dump -width=500 http://piology.org/.procmailrc.html|grep '^|'|cut -c3- :: µÑÇÍÂèÒ§¡ÒùÓä»ãªé

--------------------------------------------------------------------------------
1.19 ¤ÓÊÑè§ nslookup : áÊ´§¢éÍÁÙÅà¡ÕèÂǡѺ name server ¨Ò¡ ip ËÃ×Í domain name
--------------------------------------------------------------------------------

¤ÓÊÑ觹Õé ¶Ù¡»ÃСÒÈÇèÒµèÍä»ÍÒ¨äÁ辺㹠Redhat ÃØè¹ãËÁè ¶éÒµéͧ¡ÒÃãªé¤ÓÊÑè§áºº¹ÕéÊÒÁÒöãªé dig ËÃ×Í host á·¹ä´é àªè¹ host yn1.yonok.ac.th ËÃ×Í dig yn1.yonok.ac.th àÁ×èÍà¢éÒä»ã¹ nslookup ÊÒÁÒöÍÍ¡ÁÒä´é´éÇ¡ÒþÔÁ¾ì¤ÓÊÑè§ exit ËÅѧà¤Ã×èͧËÁÒ >
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
nslookup 202.28.18.65
Non-authoritative answer:
65.18.28.202.in-addr.arpa  name = mars.uni.net.th.
Authoritative answers can be found from:
18.28.202.in-addr.arpa  nameserver = mars.uni.net.th.
18.28.202.in-addr.arpa  nameserver = ns.netserv.chula.ac.th.
mars.uni.net.th internet address = 202.28.18.65
nslookup www.thaiall.com
Name:   www.thaiall.com
Address: 66.150.1.141


--------------------------------------------------------------------------------
1.20 ¤ÓÊÑè§ tail : áÊ´§Êèǹ·éÒ¢ͧá¿éÁ·ÕèÁÕ¢¹Ò´ãË­è µéͧ¢éÒÁ¡Ñº cat ·Õè´ÙµÑé§áµèàÃÔèÁá¿éÁ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
tail index.html :: ´ÙÊèǹ·éÒ¢ͧá¿éÁ index.html ã¹ Current directory
tail --lines=5 /var/log/messages :: ´ÙÊèǹ·éÒ¢ͧá¿éÁ /var/log/messages áµèµéͧà»ç¹ root ¨Ö§¨Ð´Ùä´é
tail /var/log/html/access.log :: ´ÙÊèǹ·éÒÂà¾Õ§ 10 ºÃ÷Ѵ «Öè§à»ç¹¤èÒ default ·ÕèäÁèä´é¡Ó˹´¨Ó¹Ç¹ºÃ÷Ѵ
tail --lines=100 /var/log/html/access_log > access_bak :: à»ç¹¡Òà backup ã¹¢Ñé¹áá ¡è͹ãªé mv ÂéÒÂ价Ѻá¿éÁà´ÔÁ

--------------------------------------------------------------------------------
1.21 ¤ÓÊÑè§ telnet : ãªéµÔ´µèÍà¢éÒ server µèÒ§ æ µÒÁ port ·Õèµéͧ¡Òà áµè»Ñ¨¨ØºÑ¹ server µèÒ§ æ »Ô´ºÃÔ¡Òà telnet áµèà»Ô´ SSH á·¹
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
telnet 202.202.202.202 :: ¢ÍµÔ´µèÍà¢éÒà¤Ã×èͧ 202.202.202.202 ¡ÒÃäÁè¡Ó˹´ port ¤×Íà¢éÒ port 23
telnet www.school.net.th 21 :: ¢ÍµÔ´µèͼèÒ¹ port 21 «Öè§à»ç¹ FTP port
telnet mail.loxinfo.co.th 25 :: µÃǨ smtp Çèҵͺʹͧ¡ÅѺÁÒ ËÃ×ÍäÁè
telnet class.yonok.ac.th 110 :: ·´Êͺ pop service ¢Í§ windows server 2003 Microsoft Windows POP3 Service Version 1.0 ready. USER aa@class.yonok.ac.th +OK PASS xxxxxxx +OK User successfully logged on

--------------------------------------------------------------------------------
2.1 ¤ÓÊÑè§ df : áÊ´§¡ÒÃà¹×éÍ·Õèãªé§Ò¹·Ñé§ËÁ´¢Í§ Harddisk ÇèÒàËÅ×Íà·èÒã´
--------------------------------------------------------------------------------
ªèÇÂãËé¼Ùé´ÙáÅÃкºÃÙéÇèҵ͹¹Õéà¹×éÍ·Õèã¹ Harddisk àËÅ×ÍÍÂÙèà·èÒã´ áÅÐÍÒ¨ãªéµÃǨÊͺä´éÇèÒ ÁÕã¤ÃáͺÁÒ upload á¿éÁ¢¹Ò´ãË­èäÇéËÃ×ÍäÁè ¨Ðä´éµÃǨÊͺã¹ÃÒÂÅÐàÍÕ´¢Í§áµèÅÐ user µèÍä» (¼Áàͧ¡çãªéºèÍ à¾ÃÒжéÒ server àÅç¡ æ ¨ÐàµçÁºèͤÃѺ µéͧ¤Í clear àÊÁÍ)
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
df :: à¾×èÍáÊ´§ÃÒ§ҹÊÃØ»¡ÒÃãªéã¹áµèÅÐÊèǹ
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda5               505605     82764    396737  18% /
/dev/hda1               101089      9180     86690  10% /boot
/dev/hda3              1423096     41956   1308848   4% /home
none                     30740         0     30740   0% /dev/shm
/dev/hda2              3889924   1551872   2140456  43% /usr
/dev/hda6              1027768    952876     22684  98% /var

--------------------------------------------------------------------------------
2.2 ¤ÓÊÑè§ du : áÊ´§¡ÒÃà¹×éÍ·Õèãªé§Ò¹ ¢Í§áµèÅÐ directory â´ÂÅÐàÍÕ´
--------------------------------------------------------------------------------
ªèÇÂãËé¼Ùé´ÙáÅÃкºÃÙéÇèÒ directory ã´ ãªéà¹×éÍ·Õèã´ ËÃ×Íãªé´ÙÃÇÁ æ ÇèÒ ¼ÙéãªéáµèÅФ¹ãªéà¹×éÍ·Õèà¡çº¢éÍÁÙšѹà·èÒã´ à¾ÃÒмÙéãªé»¡µÔ¨Ðãªé¡Ñ¹äÁèàÂÍÐ áµè¶éÒµÃǨÊͺáÅéÇàÂÍмԴ»¡µÔ ¡ç¨Ðà¢éÒä»´ÙÇèÒ àÂÍÐà¾ÃÒÐÍÐäà ¨Ðä´éá¡éä¢ä´é
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
du :: à¾×èÍáÊ´§ÃÒª×èÍ directory áÅÐà¹×éÍ·Õè·Õèãªéä»
du -all :: à¾×èÍáÊ´§â´ÂÅÐàÍÕ´ÇèÒáµèÅÐá¿éÁÁÕ¢¹Ò´à·èÒã´ ã¹ directory »Ñ¨¨ØºÑ¹
du | sort -g :: áÊ´§¡ÒÃãªé¾×é¹·Õè¢Í§áµèÅÐ directory ¾ÃéÍÁ sort ¨Ò¡¹éÍÂä»ÁÒ¡ ÁÕ˹èÇÂà»ç¹ Kb
du -b :: áÊ´§Ë¹èÇÂà»ç¹ byte ¢Í§áµèÅÐ directory

--------------------------------------------------------------------------------
2.3 ¤ÓÊÑè§ ps : áÊ´§ Process ËÃ×Íâ»Ãá¡ÃÁ·Õè»ÃÐÁÇżÅÍÂÙèã¹Ãкº¢³Ð¹Ñé¹
--------------------------------------------------------------------------------
ªèÇÂãËé¼Ùé´ÙáÅÃкº µÔ´µÒÁä´éÇèÒÁÕâ»Ãá¡ÃÁÍÐä÷ÕèäÁè¶Ù¡µéͧ run ÍÂÙè ËÃ×Íâ»Ãá¡ÃÁÍÐäà ·Õè¼ÙéÈÖ¡ÉÒÅͧ»ÃÐÁÇżÅáÅéǤéÒ§ÍÂÙè ¨Ðä´é·Ó¡ÒÃá¡éä§ ÁÔ©¹Ñé¹Ãкº¡ç¨Ð·Ó§Ò¹¤éÒ§ à¾ÃÒÐâ»Ãá¡ÃÁ·ÕèäÁè¤ÇÃÍÂÙèã¹Ãкº ¡ÓÅѧ»ÃÐÁÇżÅâ´ÂäÁè¨Óà»ç¹ â´Â੾Òоǡ bot ¨Ð·ÓãËé server ÅèÁ§èÒÂÁÒ¡
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
ps :: áÊ´§ª×èÍ process µèÒ§ æ ·Õè·Ó§Ò¹ÍÂÙèÍÂèÒ§ÊÑé¹
ps -ef :: áÊ´§¢éÍÁÙŢͧ process â´ÂÅÐàÍÕ´
ps -ax :: áÊ´§¢éÍÁÙŢͧ process ¾ÃéÍÁª×èÍâ»Ãá¡ÃÁä´éÅÐàÍÕ´
ps -aux :: áÊ´§¢éÍÁÙŢͧ process ¾ÃéÍÁª×èÍâ»Ãá¡ÃÁ áÅЪ×èͼÙéÊÑè§ä´éÅÐàÍÕ´ÁÒ¡

--------------------------------------------------------------------------------
2.4 ¤ÓÊÑè§ kill : àÁ×èÍ·ÃÒºÇèÒ process ã´·ÕèÁջѭËÒ ¡ç¨ÐàËç¹àÅ¢»ÃÐ¨Ó process ¤ÓÊÑè§ kill ¨ÐÊÒÁÒö process ÍÍ¡¨Ò¡Ãкºä´é
--------------------------------------------------------------------------------
ªèÇ¡àÅÔ¡ process ·ÕèäÁè¶Ù¡µéͧÍÍ¡¨Ò¡Ãкº ¶éÒ¢³Ð¹Ñé¹¼Ùéãªé¤¹Ë¹Ö觡ÓÅѧãªé§Ò¹ÍÂÙè ËÒ¡ process ËÅÑ¡¢Í§à¢Ò¶Ù¡ kill ¨Ð·ÓãËé¼Ùéãªé·èÒ¹¹Ñé¹ ËÅØ´ÍÍ¡¨Ò¡Ãкº·Ñ¹·Õ (ÊÓËÃѺ¤ÓÊÑ觹Õé¨Ð¶Ù¡ãªéâ´Â super user à·èÒ¹Ñé¹ ¼Ùéãªé¸ÃÃÁ´ÒäÁèÁÕÊÔ·¸Ôì)
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
kill -9 àÅ¢»ÃШÓprocess :: àÅ¢»ÃÐ¨Ó process ·èÒ¹¨Ðä´é¨Ò¡¡ÒÃãªé ps -ef ÍÂÙèáÅéÇ
kill -9 1255 :: ź process ·Õè 1255 ÍÍ¡¨Ò¡Ãкºä»

--------------------------------------------------------------------------------
2.5 ¤ÓÊÑè§ find : àÁ×èÍä¿Åì·Õèµéͧ¡ÒÃÇèÒÍÂÙèã¹ directory ¢Í§à¤Ã×èͧàÃÒËÃ×ÍäÁè
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
find / -name hello.pl :: ãªé¤é¹ËÒá¿éÁ hello.pl ã¹·Ø¡ directory
find / -name hello* :: ãªé¤é¹ËÒá¿éÁ·Õè¢Ö鹵鹴éǤÓÇèÒ hello
find /bin -size 626188c :: ãªé¤é¹ËÒá¿éÁ·ÕèÁÕ¢¹Ò´ 626188 ¶éÒà»ç¹ RH8 ¨Ð¾ºá¿éÁ bash

--------------------------------------------------------------------------------
2.6 ¤ÓÊÑè§ gzip : ãªéÊÓËÃѺᵡá¿éÁ·Õè¶Ù¡ºÕºÍÑ´ áÅéǹÒÁÊ¡ØÅ gz ËÃ×Í z áµè·ÑèÇä»à¢Òá¹Ð¹ÓãËéãªé tar ÊÓËÃѺʡØÅ .tar.gz
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
gzip -d x.tar.gz :: ãªéᵡá¿éÁ·Õè¹ÒÁÊ¡ØÅ gz
man gzip :: ãªé´ÙÇèÒ gzip ãªé§Ò¹ÍÐäÃä´éºéÒ§
gzip -d radius-1.16.1.tar.Z :: ä´éá¿éÁ¹Õé¨Ò¡ ftp.livingston.com/pub/le/radius/ à»ç¹ÃкºÃѺâ·ÃÈѾ·ìà¢éÒà¤Ã×Í¢èÒÂ
gzip -dc x.tar.Z|tar xvf - :: »ÃÐËÂÑ´¢Ñ鹵͹㹡ÒÃãªé¤ÓÊÑè§ 2 ¤ÃÑé§ à¾ÃÒФÓÊÑ觪ش¹Õé¨Ðãªé·Ñé§ gzip áÅÐ tar ¡Ñº x.tar.z ä´éµÒÁÅӴѺ

--------------------------------------------------------------------------------
2.7 ¤ÓÊÑè§ tar : ãªéÊÓËÃѺᵡá¿éÁ·Õè¶Ù¡ºÕºÍÑ´ áÅéǹÒÁÊ¡ØÅ tar
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
tar xvf x.tar :: ãªéÊÓËÃѺᵡá¿éÁ·Õè¹ÒÁÊ¡ØÅ tar »¡µÔáÅéǨÐÁÕ¡ÒÃÊÃéÒ§ directory ¢Í§á¿éÁ¾ÃéÍÁâ»Ãá¡ÃÁÍÕ¡à¾Õº
tar xvfz squid-2.3-200103110000-src.tar.gz :: ¨Ð¤ÅÒ gz ¾ÃéÍÁ¡Ñºãªé¤ÓÊÑè§ tar ä´é¾ÃéÍÁ æ ¡Ñ¹ äÁèµéͧãªé gzip áÅÐÁÒãªé tar
man tar :: ãªé´ÙÇèÒ tar ãªé§Ò¹ÍÐäÃä´éºéÒ§
tar zcvf abc.tar.gz /etc :: ãªé copy /etc à¡çºà»ç¹á¿éÁ abc.tar.gz ẺºÕºÍÑ´
tar zxvf abc.tar.gz :: ãªé¤ÅÒÂá¿éÁ abc.tar.gz «Ö觨Ðä´é directory /etc ÍÍ¡ÁÒ·Ñé§ËÁ´

--------------------------------------------------------------------------------
2.8 ¤ÓÊÑè§ last : ãªéáÊ´§ÃÒª×èͼÙé login à¢éÒÁÒÅèÒÊØ´
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
last |grep reboot :: ãªé´ÙÃкº¶Ù¡ reboot àÁ×èÍã´ºéÒ§
last |more :: ãªéÃÒª×èͼÙé login à¢éÒÁÒã¹ÃкºÅèÒÊØ´·ÕÅÐ˹éÒ

--------------------------------------------------------------------------------
2.9 ¤ÓÊÑè§ grep : ãªéÊÓËÃѺàÅ×Í¡¢éÍÁÙÅ੾ÒкÃ÷Ѵ·Õèµéͧ¡ÒÃ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
more /etc/passwd|grep thaiall :: ãªéáÊ´§¢éÍÁÙÅã¹á¿éÁ /etc/passwd áµèàÅ×͡੾ÒкÃ÷Ѵ·ÕèÁÕ¤ÓÇèÒ thaiall
rpm -qa|grep ftp :: ãªé´ÙÇèÒÃкºÅ§â»Ãá¡ÃÁ ftp ËÃ×ÍÂѧ àÇÍÃìªÑè¹ã´ºéÒ§
last |grep reboot :: ãªé´ÙÃкº¶Ù¡ reboot àÁ×èÍã´ºéÒ§

--------------------------------------------------------------------------------
2.10 ¤ÓÊÑè§ date : ãªé´ÙÇѹ·Õè ËÃ×Íà»ÅÕè¹Çѹ·Õè áÅÐàÇÅÒä´é date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
date +%x :: ´ÙÇѹ·Õè»Ñ¨¨ØºÑ¹ àªè¹¡ÒÃáÊ´§àÅ¢ 04/27/01 ÍÍ¡ÁÒ
date +%d :: ´ÙÇѹ·Õè»Ñ¨¨ØºÑ¹ àªè¹¡ÒÃáÊ´§àÅ¢ 27 ÍÍ¡ÁÒ
date 04271340 :: ¡Ó˹´Çѹ·ÕèãËÁèãËéà»ç¹ Çѹ·Õè 27 à´×͹ 4 àÇÅÒ 13.40 ¹. (mmddhhmmccyy)
hwclock --systohc :: àÁ×èÍà»ÅÕè¹àÇÅÒ´éÇ date ËÒ¡ restart à¤Ã×èͧàÇÅҨмԴàËÁ×͹à´ÔÁµéͧãªé¤ÓÊÑ觹Õé à¾×èÍà¢Õ¹àÇÅÒŧä»ã¹ hardware clock ¨Ö§¨Ðà»ÅÕè¹àÇÅÒ hardware ä´é

--------------------------------------------------------------------------------
2.11 ¤ÓÊÑè§ top : ãªéáÊ´§Ê¶Ò¹Ð¡ÒÃãªé·ÃѾÂÒ¡Ã ÀÒÂã¹à¤Ã×èͧ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
top :: áÊ´§¡ÒÃãªé·ÃѾÂҡâͧà¤Ã×èͧ ¨Ò¡áµèÅÐ process ·´Êͺ¤ÓÊÑ觹Õéã¹ Redhat 8.0
µÑÇÍÂèÒ§¼Å¢Í§¡ÒÃãªé¤ÓÊÑè§
CPU states:  0.5% user,  1.3% system,  0.0% nice, 98.0% idle
Mem:    31328K av,   28872K used,    2456K free,       0K shrd,    1032K buff
Swap: 1718912K av,    2608K used, 1716304K free                   16528K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
18306 root      14   0   852  852   672 R       0  1.5  2.7   0:00 top
18229 root       1   0  1684 1536  1240 S       0  0.3  4.9   0:00 sshd
1 root       0   0   160  116    92 S       0  0.0  0.3   0:08 init
2 root       0   0     0    0     0 SW      0  0.0  0.0   0:01 kflushd


--------------------------------------------------------------------------------
2.12 ¤ÓÊÑè§ ntsysv ËÃ×Í setup : ãªéà»Ô´-»Ô´ ºÃÔ¡Òâͧà¤Ã×èͧ·ÕèÊдǡÃÇ´àÃçÇ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
setup :: áÊ´§¡ÒõÑÇàÅ×Í¡ãËé¡Ó˹´ºÃÔ¡ÒõèÒ§ æ »¡µÔ¨ÐàÅ×Í¡ system services ºÃÔ¡Ò÷Õèà»Ô´ã¹ server ¢Í§¼Á»ÃСͺ´éÇ httpd, imap, ipop3, iptables, named, network, sendmail, servers, services, vsftpd, xinetd à¾×èÍãËéºÃÔ¡Òà web, mail, ftp áÅÐ dns
ntsysv :: ãªéà»Ô´-»Ô´ºÃÔ¡Òà ãËé¼ÅàËÁ×͹ setup, services (áµè¤ÓÊÑ觹Õé¶Ù¡Â¡àÅÔ¡ã¹ RH ÃØè¹ãËÁè)

--------------------------------------------------------------------------------
2.13 ¤ÓÊÑè§ route : ãªéàÊé¹·Ò§¡ÒÃàª×èÍÁà¤Ã×Í¢èÒÂ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
# route

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
202.29.78.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         202.29.78.254   0.0.0.0         UG    0      0        0 eth0


--------------------------------------------------------------------------------
2.14 ¤ÓÊÑè§ shutdown, reboot : ãªé»Ô´à¤Ã×èͧ ËÃ×Í »Ô´áÅÐà»Ô´à¤Ã×èͧãËÁèÍÂèÒ§¶Ù¡ÇÔ¸Õ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
shutdown -h now ËÃ×Í halt :: ÊÑ觻Դà¤Ã×èͧ·Ñ¹·Õ (áµèãªéàÇÅÒ»ÃÐÁÒ³ 1 ¹Ò·Õà¾×èͻԴºÃÔ¡ÒõèÒ§ æ)
reboot ËÃ×Í shutdown -r now :: »Ô´ áÅÐà»Ô´à¤Ã×èͧãËÁè ËÒ¡µÔ´µÑé§â»Ãá¡ÃÁºÒ§µÑÇ áÅÐ clear ¤èÒµèÒ§ æ ËÒ¡äÁèá¹èã¨

--------------------------------------------------------------------------------
2.15 ¤ÓÊÑè§ runlevel : ¤Ùè¡Ñºá¿éÁ /etc/inittab à¾×èͺ͡ÇèһѨ¨ØºÑ¹ÍÂÙèã¹ level ã´ : ¶éÒµéͧ¡ÒÃà»ÅÕè¹ level µéͧãªé¤ÓÊÑè§ chkconfig ãËé´Ùà¾ÔèÁàµÔÁ¨Ò¡ 2.18
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#/sbin/runlevel :: áÊ´§ level »Ñ¨¨ØºÑ¹
#cat /etc/inittab :: áÊ´§µÒÃÒ§ ¡Ó˹´¡ÒÃÊÑè§à¤Ã×èͧ ÇèÒãªé level ã´

--------------------------------------------------------------------------------
2.16 ¤ÓÊÑè§ fsck : «èÍÁá«ÁÃкºá¿éÁã¹ linux
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#fsck / :: ãªé«èÍÁ harddisk ã¹Ëéͧ / àÁ×èÍ¡Òà harddisk à¡Ô´»Ñ­ËÒà¡ÕèÂǡѺ¡ÒûԴà»Ô´
#fsck /dev/hdc :: ãªé«èÍÁ harddisk ·Õèª×èÍ /dev/hdc ¶éÒµèÍ harddisk äÇéËÅÒµÑÇ

--------------------------------------------------------------------------------
2.17 ¤ÓÊÑè§ chown, chgrp : à»ÅÕè¹à¨éҢͧ ËÃ×Íà»ÅÕ蹡ÅØèÁ
--------------------------------------------------------------------------------
µÒÁËÑÇ¢éÍ 1.2 àÃ×èͧ¤ÓÊÑè§ chmod ·ÓãËé·ÃÒºÇèÒ á¿éÁáµèÅÐá¿éÁÁÕ 3 Êèǹ ¤×Íà¨éҢͧ ¡ÅØèÁ áÅзÑèÇä» àÁ×è͵éͧ¡ÒÃà»ÅÕ蹤ÇÒÁà»ç¹à¨éҢͧ ËÃ×Í¡ÅØèÁ ¡çÊÒÁÒö·Óä´é «Öè§à»ç¹ËÅÑ¡¡ÒçèÒ æ äÁèÂØè§ÂÒ¡
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#chown burin:users x :: à»ÅÕè¹à¨éҢͧ¢Í§á¿éÁ x ãËéà»ç¹ burin áÅÐÍÂÙè㹡ÅØèÁ¢Í§ users
#chgrp users y :: à»ÅÕ蹡ÅØèÁ¢Í§á¿éÁ x ãËéà»ç¹ users

--------------------------------------------------------------------------------
2.18 ¤ÓÊÑè§ chkconfig : ¡Ó˹´ ËÃ×ÍáÊ´§ ºÃÔ¡Ò÷ÕèÊÑ觻ÃÐÁÇżÅã¹ level µèÒ§ æ ¢³Ðà»Ô´à¤Ã×èͧ
--------------------------------------------------------------------------------
¤ÓÇèÒ level ¤×ÍÃдѺ㹡ÒÃà»Ô´à¤Ã×èͧ ´Ùä´é¨Ò¡á¿éÁ /etc/inittab â´Ââ»Ãá¡ÃÁµèÒ§ æ ·ÕèÊÑè§ãËé»ÃÐÁÇżŠÊÒÁÒöàÅ×Í¡ãËé·Ó§Ò¹ã¹ level ã´ä´é ËÒ¡ÊÑè§ãËé»ÃÐÁÇżŻԴ level àÁ×èÍÁÕ¡Òà start linux ã¹ level ˹Öè§ â»Ãá¡ÃÁ·Õè¤Ô´ÇèÒÊÑè§ãËé·Ó§Ò¹¢³Ðà»Ô´à¤Ã×èͧ ¡ç¨ÐäÁè·Ó§Ò¹
# /etc/inittab
# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#id:5:initdefault:
id:3:initdefault:

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#/sbin/chkconfig --add mysql :: ÊÑè§ãËéà¾ÔèÁ mysql à¢éÒä»ã¹Ãкº system services
#/sbin/chkconfig --list :: áÊ´§ÃÒ¡ÒÃâ»Ãá¡ÃÁ·Ñé§ËÁ´ ·ÕèÊÑè§ãËé·Ó§Ò¹ã¹ level µèÒ§ æ
#/sbin/chkconfig --level 3 sendmail on :: ÊÑè§â»Ãá¡ÃÁ sendmail ·Ó§Ò¹ã¹ level 3 (Text mode)
#/sbin/chkconfig --level 5 sendmail on :: ÊÑè§â»Ãá¡ÃÁ sendmail ·Ó§Ò¹ã¹ level 5 (X Windows)

--------------------------------------------------------------------------------
2.19 ¤ÓÊÑè§ mount, umount : ÊÑè§àª×èÍÁµèÍÍØ»¡Ã³ì ËÃ×Í partition àªè¹ Diskette ËÃ×Í Handy drive à»ç¹µé¹
--------------------------------------------------------------------------------
¡ÒÃãªé mount à»ç¹ÊÔ觷Õè¼Ùé´ÙáÅÃкºµéͧà¢éÒã¨ËÅÑ¡¡ÒÃãËéä´é à¾ÃÒÐà»ç¹ªèͧ·Ò§ã¹¡ÒõԴµè͡ѺÍØ»¡Ã³ìµèÒ§ æ ÅèÒÊØ´ ¼ÁµèÍ harddisk à¢éÒä»ã¹à¤Ã×èͧ server à¾ÔèÁÍÕ¡ 1 µÑÇ «Öè§ÃкºÁͧ harddisk µÑÇ·Õèà¾ÔèÁà¢éÒä»à»ç¹ hdc ´éǤÓÊÑè§ fdisk -l àÁ×è͵éͧ¡Òà partition ·Õè 1 ¢Í§ hdc ÁÒà»ç¹Ëéͧ /x ¡çà¾Õ§áµèãªé¤ÓÊÑè§ÊÃéÒ§Ëéͧ¤×Í #mkdir /x ÊÓËÃѺ¤ÃÑé§áá áÅéÇãªé¤ÓÊÑè§ #mount /dev/hdc1 /x ¡ç¨ÐãªéËéͧ /x «Öè§ÍÂÙèã¹ harddisk ÍÕ¡µÑÇ˹Öè§ä´é·Ñ¹·Õ
¤ÓÊÑ觷Õèà¡ÕèÂÇ¢éͧ¡Ñº¤ÓÊÑè§ mount
#cat /etc/fstab : ´Ù file system table à¾×èͺ͡ÇèÒÁÕÍÐäà mount äÇéáÅéǺéÒ§
#cat /etc/mtab : ´ÙÃÒÂÅÐàÍÕ´¡Òà mount ã¹ÍÕ¡ÃٻẺ˹Öè§
#cat /proc/mounts : ºÍ¡ÇèÒÁÕÍÐäà mount äÇéáÅéǺéÒ§
#cat /proc/partitions : ºÍ¡ª×èÍ áÅТ¹Ò´¢Í§áµèÅÐ partitions
#cat /proc/filesystems : ºÍ¡»ÃÐàÀ·¢Í§ filesystems ·ÕèÁÕ¡ÒÃʹѺʹع
#/sbin/fdisk -l : áÊ´§ partition ¨Ò¡ harddisk ·Ø¡µÑÇ·Õèàª×èÍÁµèÍã¹à¤Ã×èͧ¹Ñé¹

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#mount --bind /var/www /home/yourname/www
#mount áÊ´§¢éÍÁÙÅ·Õèà¤Â mount äÇé·Ñé§ËÁ´

ÇÔ¸Õãªéá¼è¹ Floppy Disk ã¹ linux
#mkdir /floppy
#mkfs -t ext3 /dev/fd0 1440
#mount -t ext3 /dev/fd0 /floppy
- or -
#mkdir /floppy
#mkfs -t msdos /dev/fd0 1440
#mount -t msdos /dev/fd0 /floppy
µèÍä»ã¹Ëéͧ /floppy ¡ç¤×Íá¼è¹ disk ã¹ drive A Êèǹ /dev/fd1 ¡ç¤×Í drive B áµèµéͧàÃÔèÁ·ÓãËÁè¹Ð¤ÃѺ
ÇÔ¸Õãªé Handy Drive àªè¹ Apacer (µéͧ umount ¡è͹´Ö§ apacer ÍÍ¡¡è͹àÊÁÍ)
#mkdir /mnt/apacer (Just first time)
#mount /dev/sda1 /mnt/apacer
...
#cd /
#umount /dev/sda1
- and -
#pico /etc/fstab Add: /dev/sda1 /mnt/apacer auto noauto,user 0 0
ÇÔ¸ÕàÃÕ¡ãªéá¿éÁã¹ Partition Í×è¹ àªè¹ WindowsXP
cd / :: ÂéÒµÑÇàͧä»Âѧ root directory
mkdir hd :: ÊÃéÒ§Ëéͧª×èÍ hd «Öè§à»ç¹Ëéͧà»ÅèÒäÁèÁÕÍÐäÃ
fdisk -l :: ´ÙÇèÒÁÕ partition ÍÐäÃã¹à¤Ã×èͧºéÒ§ ·Õèµéͧ¡Òà mount à¢éҡѺ /hd
mount /dev/hdb2 /hd :: ·ÓãËéàÃÕ¡ãªé /dev/hdb2 ¨Ò¡ /hd ä´é àªè¹ cd /hd/etc ¶éÒã¹ hdb2 ÁÕËéͧª×èÍ etc
umount /hd :: ¡àÅÔ¡¡Òà mount /hd

ÇÔ¸Õãªé CDROM
mount :: áÊ´§ÃÒ¡ÒÃÍØ»¡Ã³ì ËÃ×ÍËéͧµèÒ§ æ ·Õè¶Ù¡ mount äÇéáÅéÇ
mount -t ext3 :: áÊ´§ãËéàËç¹ÇèÒ partition Ẻ ext3 ÁÕÍÐäö١ mount äÇéºéÒ§
mount -t vfat :: áÊ´§ãËéàËç¹ÇèÒ partition Ẻ vfat ÁÕÍÐäö١ mount äÇéºéÒ§
mount /dev/cdrom :: ãªéµÔ´µèÍ CD ROM àÁ×èÍà¢éÒä»ãªéàªè¹ #cd /mnt/cdrom áÅÐãªé #ls
umount /dev/cdrom :: à¾×èÍàÅÔ¡ãªé CD ROM ËÃ×͵éͧ¡Òô֧á¼è¹ÍÍ¡ áµè·èÒ¹µéͧÍÍ¡ÁÒ¡è͹´éǤÓÊÑè§ #cd / à»ç¹µé¹
eject :: ¶éÒäÁè umount ´éÒ¹ÅèÒ§ ¡çÊÑè§ eject à¾×èÍ´Õ´ CD-ROM ÍÍ¡ä´éàŤÃѺ áÅÐäÁèµéͧÊÑè§ umount ËÃ×ÍÍÍ¡¨Ò¡Ëéͧ¡è͹¹Ð

µÑÇÍÂèÒ§¼Å¡ÒÃãªé¤ÓÊÑè§ #mount ã¹ server µÑÇ˹Öè§ /dev/hda5 on / type ext3 (rw) none on /proc type proc (rw) /dev/hda1 on /boot type ext3 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) /dev/hda3 on /home type ext3 (rw) none on /dev/shm type tmpfs (rw) /dev/hda2 on /usr type ext3 (rw) /dev/hda6 on /var type ext3 (rw)

--------------------------------------------------------------------------------
2.20 ¤ÓÊÑè§ mkbootdisk : ÊÃéÒ§á¼è¹ boot disk à¾×èÍãªé boot Ãкº linux ¢Öé¹ÁÒÀÒÂËÅѧ áÅÐÁÕ¡Ò÷ӧҹẺ stand alone
--------------------------------------------------------------------------------
¤ÓÊÑ觹Õé¼Áà¤ÂãªéµÍ¹¤Ñ´ÅÍ¡ harddisk ·Õèà»ç¹ linux 2 µÑÇ áµèµÑÇÅÙ¡àÁ×è͹Óä»àÊÕºà¢éÒà¤Ã×èͧãËÁè ¾ºÇèÒ boot ´éǵ¹àͧäÁèä´é ¨Ö§µéͧËÒá¼è¹ boot ¨¹à¢éÒä»ã¹ harddisk ä´é ¨Ò¡¹Ñ鹡çÊÑè§ #lilo à¾×èÍãËé¡Òà boot ¤ÃÑ駵èÍä»ÊÒÁÒö·Ó§Ò¹µÒÁ /etc/lilo.conf ä´éµÒÁ»¡µÔ ÊèǹµÑÇàÅ¢ 2.4.18-14 à»ç¹àÅ¢ÃØ蹢ͧ kernel ã¹ Redhat 8.0 ÊѧࡵàÅ¢¹Õéä´éµÍ¹ boot à¤Ã×èͧ
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
mkbootdisk --device /dev/fd0 2.4.18-14 :: ÊÃéÒ§á¼è¹ disk à¾×èÍãªé boot à¢éÒ linux 㹡óշÕèÃкº boot ¢Í§à¤Ã×èͧÁջѭËÒ

--------------------------------------------------------------------------------
2.21 ¤ÓÊÑè§ traceroute : áÊ´§àÅ¢ ip ¢Í§à¤Ã×èͧ·Õè¶Ù¡àª×èÍÁµèÍ·Ñé§ËÁ´ ä»Âѧ»ÅÒ·ҧ·Õèµéͧ¡ÒÃ
--------------------------------------------------------------------------------
µÑÇÍÂèÒ§¢éÒ§ÅèÒ§¹ÕéáÊ´§ãËéàËç¹ÇèÒ àÁ×èÍã¹ÇÔ·ÂÒÅÑÂ⹡à»Ô´àÇçº www.thai.net ¨ÐµéͧµÔ´µèͼèÒ¹à¤Ã×èͧºÃÔ¡Òà 8 µÑÇ ´Ñ§µÑÇÍÂèÒ§ÅèÒ§¹Õé ¶éÒà»Ô´àÇçºä«µìµèÒ§»ÃÐà·È ¡ç¨ÐÁըӹǹà¤Ã×èͧ㹡ÒõԴµèÍÁÒ¡¢Öé¹ä»´éÇ à¤Ã×èͧºÃÔ¡ÒÃã¹·Õè¹Õé ÁÑ¡à»ç¹ÍØ»¡Ã³ì·ÕèàÃÕ¡ÇèÒ router áÅÐ router ·Ø¡µÑǨÐÁÕ ip áÅФÇÒÁÊÒÁÒö੾ÒеÑÇ·ÕèµèÒ§¡Ñ¹ä» â´Â˹éÒ·ÕèËÅÑ¡¢Í§ router ¡ç¤×Í¡ÒáÓ˹´àÊ鹷ҧ㹡ÒõԴµè͹Ñè¹àͧ
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
/usr/sbin/traceroute www.thai.net
traceroute to www.thai.net (203.150.13.2), 30 hops max, 38 byte packets
1  door.yonok.ac.th (202.29.78.254)  2.046 ms  1.962 ms  2.532 ms
2  202.28.29.41 (202.28.29.41)  3.703 ms  3.294 ms  3.760 ms
3  UniNet-BKK2-ATM1-0-0.700.uni.net.th (202.28.28.129)  14.185 ms  13.226 ms  14.614 ms
4  202.28.28.18 (202.28.28.18)  13.705 ms  13.227 ms  14.130 ms
5  202.47.255.2 (202.47.255.2)  13.222 ms  13.890 ms  13.210 ms
6  202.129.63.182 (202.129.63.182)  16.649 ms  14.960 ms  15.659 ms
7  juliet-vlan-2.bkk.inet-th.net (203.150.14.22)  14.817 ms  15.573 ms  15.610 ms
8  www.thai.net (203.150.13.2)  15.628 ms  14.775 ms  14.222 ms


--------------------------------------------------------------------------------
2.22 ¤ÓÊÑè§ rpm : ãªéµÃǨÊͺ à¾ÔèÁ ËÃ×Íź package ¢Í§Ãкº linux à¡×ͺ·Ñé§ËÁ´
--------------------------------------------------------------------------------
㹡óշÕè·èÒ¹ÁÕâ»Ãá¡ÃÁµÑÇãËÁèÁÒ ÊÒÁÒö·Õè¨Ðźâ»Ãá¡ÃÁà¾ÔèÁâ´Âãªé¤ÓÊÑè§ rpm ä´é ËÃ×͵éͧ¡ÒõÃǨÊͺÇèÒ ÁÕ package ºÒ§µÑÇ install ÍÂÙèËÃ×ÍäÁè ËÃ×ͨСàÅÔ¡â»Ãá¡ÃÁºÒ§µÑÇÍÍ¡¨Ò¡Ãкº¡ç·Óä´é ËÃ×ͨÐáÊ´§ÃÒª×èÍ package ·Ñé§ËÁ´ã¹Ãкº¡ç·Óä´éÍÕ¡ ÃÇÁ·Ñ駡ÒõÃǨ version ¢Í§ package áµèÅеÑÇ ¨Ò¡»ÃÐʺ¡Òóì äÁèá¹èã¨ÇèÒà¡Ô´¨Ò¡ÍÐäà àÁ×èÍŧ Redhat 7.2 áÅéÇ áµèÃкºäÁèºÃÔ¡Òà pop3 ¨Ö§ä´é·Ó¡Òà mount /dev/cdrom ¨Ò¡¹Ñ鹡ç·Ó¡Òà install package pop à¾ÔèÁà¢éÒä» ·ÕèÃÙéà¾ÃÒÐÅͧãªé¤ÓÊÑè§ telnet localhost 110 áÅéÇ error ¨Ö§µéͧ·Ó¡ÒÃà¾ÔèÁ package pop à¢éÒä»ãËÁè â´Âãªé¤ÓÊÑè§ rpm -i imap-4.7-5.i386.rpm ·ÕèÃÙéà¾ÃÒÐä´éãªé cd à¢éÒä»ã¹Ëéͧ /mnt/cdrom/RedHat/RPMS ¨Ö§¾ºá¿éÁÁÒ¡ÁÒ·ÕèÊÒÁÒö install à¾ÔèÁä´é
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
rpm -i imap-4.7-5.i386.rpm :: ãªé install package pop à¢éÒä»ã¹ linux ãËÁè à¾ÃÒÐäÁèÁÕ áÅÐãËé´Ùà¾ÔèÁàµÔÁ¨Ò¡ 8.99 à¡ÕèÂǡѺ¡ÒõԴµÑé§â»Ãá¡ÃÁ¨Ò¡ CD-ROM
rpm -qa|grep imap :: ãªé´ÙÇèÒÁÕ package ÍÐäúéÒ§·Õè¢Ö鹵鹴éÇ imap
rpm -qa :: ãªé´ÙÃÒª×èÍ package ·Ø¡µÑÇ·Õè install äÇéáÅéÇ
rpm -q telnet :: ãªéµÃǨÇèÒÁÕ package ª×èÍ telnet ÍÂÙèËÃ×ÍäÁè
rpm -qpl imap-4.7-5.i386.rpm :: áÊ´§ª×èÍá¿éÁã¹ package áµèµéͧà¢éÒä»·Õè /mnt/cdrom/RedHat/RPMS ¡è͹¹Ð¤ÃѺ
rpm -qf /usr/sbin/vi :: ¨ÐáÊ´§ vim-minimal-5.6-11 «Öè§à»ç¹ÃØ蹢ͧ vi ¹Ñé¹
rpm -qf /usr/sbin/httpd :: ¨Ðä´é apache-1.3.12-2 «Öè§à»ç¹ÃØè¹·ÕèµÔ´µÑé§ÁÒã¹ linux 6.2
rpm -e apache-1.3.12-2 :: ź ËÃ×Í erase â»Ãá¡ÃÁ apache-1.3.12-2 ÍÍ¡¨Ò¡à¤Ã×èͧ
rpm -Fvh openssl-0.9.5a-2.6.x.i386.rpm :: Upgrade â»Ãá¡ÃÁ áµèµéͧŧâ»Ãá¡ÃÁ¡è͹ÁÔàªè¹¹Ñé¹ äÁèÊÓàÃ稹ФÃѺ
rpm -qi vsftpd :: áÊ´§ÃÒÂÅÐàÍÕ´¢Í§ Application àªè¹ ¢¹Ò´ ÇѹµÔ´µÑé§ ÃØè¹ ¼Ùé¼ÅÔµ à»ç¹µé¹

--------------------------------------------------------------------------------
2.23 ¤ÓÊÑè§ SU : ¢Íà»ÅÕè¹µ¹àͧà»ç¹ Super user ËÃ×Í root à¾×èÍãªéÊÔ·¸ÔìÊÙ§Êش㹡ÒúÃÔËÒÃÃкº ·Õè¼Ùéãªé»¡µÔ·ÓäÁèä´é
--------------------------------------------------------------------------------
¡ÒèÐãªé su ä´é¨Ðµéͧà»ç¹¼ÙéãªéµÒÁ»¡µÔ àÁ×è;ÔÁ¾ì su áÅéÇÃкº¨Ð¶ÒÁÃËÑʼèÒ¹¢Í§ user root ËÒ¡¾ÔÁ¾ìÃËÑʼèÒ¹¶Ù¡µéͧ ·èÒ¹¡ç¨ÐÊÒÁÒö¡ÃзӡÒÃã´ æ ¡çä´é 㹰ҹРroot à¾ÃÒÐ root ËÃ×Í super user ¤×ͼÙé·ÕèÁÕÍÓ¹Ò¨ÊÙ§ÊØ´ã¹Ãкº àªè¹ à¾ÔèÁ¼Ùéãªé·èÒ¹ãËÁè ź¼Ùéãªé¤¹à´ÔÁ à»ç¹µé¹ (à¾Õ§áµè¾ÔÁ¾ì¤ÓÇèÒ su ·èÒ¹¡çÊÒÁÒöà»ÅÕè¹ÊÔ·¸Ôìä´éáÅéÇ ¶éÒ·èÒ¹ÁÕÃËÑʼèÒ¹¢Í§ su) à´ÔÁ¼Áãªéá¤è¤ÓÇèÒ su µèÍÁҤس»ÃÐàÊÃÔ° á¹Ð¹ÓÇèÒµéͧãªé su - ¨Ö§¨ÐÊÁºÙÃ³ì ¾Í·´Êͺ¡ç¾ºÇèÒ $PATH ·Õèä´éᵡµèÒ§¡Ñ¹¨ÃÔ§
µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#su - :: à»ÅÕè¹µ¹àͧà»ç¹ super user à¾×èÍ¡ÃзӡÒÃã´ æ ¡çä´é¡ÑºµÑÇÃкº
#su prasert :: äÁèÇèÒ¢³Ð·Õè login à»ç¹ user ã´ àÁ×è͵éͧ¡ÒÃà»ÅÕè¹à»ç¹ user prasert ¡çäÁèµéͧ logout áÅéÇ login ãËÁè ãªé¤ÓÊÑ觹Õéä´éàÅÂ

--------------------------------------------------------------------------------
2.24 ¤ÓÊÑè§ useradd : à¾ÔèÁ¼ÙéãªéÃÒÂãËÁèà¢éÒä»ã¹Ãкº
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#useradd theman :: à¾ÔèÁ¼ÙéãªéÃÒÂãËÁèà¢éÒä»ã¹Ãкºª×èÍ theman 㹡ÅØèÁ theman áÅÐÁÕ home directory à»ç¹ /home/theman
#useradd -g users -d /home/theman -c "user name here" theman :: à¾ÔèÁ¼ÙéãªéÃÒÂãËÁèà¢éÒä»ã¹Ãкºª×èÍ theman

--------------------------------------------------------------------------------
2.25 ¤ÓÊÑè§ userdel : ź¼ÙéãªéÃÒÂà´ÔÁ ÍÍ¡¨Ò¡Ãкº
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#userdel -r theman :: ź theman áÅÐ home directory ¢Í§ theman ÍÍ¡ËÁ´

--------------------------------------------------------------------------------
2.26 ¤ÓÊÑè§ usermod : á¡é䢢éÍÁÙŢͧ¼Ùéãªéä´é
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#usermod -s /rbin/menu theman :: ¡Ó˹´ãËé shell ÊÓËÃѺ user ·Õèª×èÍ theman ãËÁè à¾×èͨӡѴÊÔ·¸Ôì㹡ÒÃà¢éÒãªé shell
#usermod -d /home/theman theman :: ¡Ó˹´ãËé theman ÁÕ homedirectory ÍÂÙè·Õè /home/theman
#usermod -c "Mr.Suwit Somsupabrungyod" theman :: ¡Ó˹´ãËé comment ËÃ×ͪ×èÍ à»ç¹ Mr.Suwit Somsupabrungyod «Öè§ comment ¨Ðä»áÊ´§¼ÅãËéàË繪ѴਹµÍ¹·Õèãªé pine àÁ×è;ÔÁ¾ì¤ÓÇèÒ theman 㹪èͧ to ¢³Ð·Õè¡ÓÅѧ compose ¨ÐáÊ´§ comment ˹éÒ email ãËé·Ñ¹·Õ

--------------------------------------------------------------------------------
2.27 ¤ÓÊÑè§ crontab : µÑé§àÇÅÒÊÑ觧ҹ¤ÍÁ¾ÔÇàµÍÃì
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#crontab -l :: áÊ´§¡Ó˹´¡Òâͧ¡ÒÃÊÑè§ãËé¤ÍÁ¾ÔÇàµÍÃì·Ó§Ò¹ÍÂèÒ§Íѵâ¹ÁÑµÔ µÒÁàÇÅÒ·Õè¡Ó˹´
#cat /etc/crontab :: áÊ´§µÒÃÒ§ crontab ã¹à¤Ã×èͧ

--------------------------------------------------------------------------------
2.28 ¤ÓÊÑè§ lspci : µÃǨÊͺÍØ»¡Ã³ì·Õèàª×èÍÁµèÍÀÒÂã¹à¤Ã×èͧ
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#lspci
00:00.0 Host bridge: Intel Corp . 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03)
00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)
00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller : Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:0f.0 PCI bridge: Digital Equipment Corporation DECchip 21152 (rev 03)
00:11.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 24)
01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP 1X/2X (rev 5c)


--------------------------------------------------------------------------------
2.29 ¤ÓÊÑè§ nmap : µÃǨÊͺà¤Ã×Í¢èÒÂẺ¡ÇÒ´·Ñé§ã¹à¤Ã×èͧ áÅÐ class C
--------------------------------------------------------------------------------

µÑÇÍÂèÒ§¤ÓÊÑè§ áÅСÒÃãªé§Ò¹
#nmap -sP 202.29.78.*
Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Host   (202.29.78.0) seems to be a subnet broadcast address (returned 1 extra pings).
Note -- the actual IP also responded.
Host www.isinthai.com (202.29.78.1) appears to be up.
Host course.yonok.ac.th (202.29.78.5) appears to be up.
Host yonok.ac.th (202.29.78.12) appears to be up.
Host w2kdhcp.yonok.ac.th (202.29.78.17) appears to be up.
Host  (202.29.78.31) appears to be up.
Host  (202.29.78.32) appears to be up.
Host  (202.29.78.33) appears to be up.

#nmap -sT www.yonok.ac.th (on TCP)
Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Interesting ports on yonok.ac.th (202.29.78.12):
(The 1590 ports scanned but not shown below are in state: closed)
Port       State       Service
21/tcp     open        ftp
22/tcp     open        ssh
25/tcp     open        smtp
53/tcp     open        domain
80/tcp     open        http
109/tcp    open        pop-2
110/tcp    open        pop-3

#nmap www.yonok.ac.th -sU (on UDP)
Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Interesting ports on yn1.yonok.ac.th (202.29.78.12):
(The 1465 ports scanned but not shown below are in state: closed)
Port       State       Service
53/udp     open        domain
111/udp    open        sunrpc
867/udp    open        unknow