ก Introduction to Unix
Open Source Software Network
2550
ก ก ก !ก"# $% &'()*' !ก"### ก'กก#)#+ ก# ก #, $- 6 & ก/ #-#, ก 0# ,12 + ก# ก
3#'&' &4 ก#,#!$25, (Permission) Shell
$กก vi
!'1/$#3#6&' ก' ,
$-0) #ก&'/ !7#%ก, (-&'),#! + ก# ก &,! ก7#*$/,% ) ก8&'% ) /,#)'$,# ก %#' ก,# (Client)
&'-10 2 0/ ## !ก"# 4ก#,#!'$,# (Server)
/0$ก WinSCP %ก&'()ก ก *+ก PuTTY %ก&'()ก / 0123&'()ก ' 43)56)789ก3'6 BIOS =>?5?7ก@A%ก LiveCD 06)&'()ก 4)789ก3'6 BIOS D9>67Eก3=>5?7ก@A%ก Flash Drive 56HกI ก 9'> 6/65 (Server) 5?7ก@AH) %+D120 J+5A%ก@KA)A=@A0HE กก)6 -# '#0) $ก&ก&# #ก,$$,% /*#/ ก#/ 8% (/&3# /(ก,*8 '
,# 2 $ 0* กก:# 2550
!" ##$% 1 +)37') 4 /5?7ก@A - +)37') 4 /5?7ก@A............................................................................................. 1 - /E9/+N737ก5?7ก@A............................................................................................ 1 ##$% 2 '0/HK*A+O737ก5?7ก@A - '0HE'D9/+O737ก5?7ก@AE5D3>)H................................................. 2 ##$% 3 '103>D9>')?%3ก - ก Login *+ Logout....................................................................................................... 5 - '103>ก%3EกHK*A........................................................................................................ 6 - '103>ก%3EกHEกD9>.............................................................................................. 13 - '103>ก%3Eกก9>5)ก3(?............................................................................................ 17 - '103>ก%3Eก7E60>0........................................................................................... 20 - '103>ก'2HK*A *++3กW') *E&35........................................................ 21 - '103>=X> Y................................................................................................................. 24 ##$% 4 07D87ก/J[/+K\ / ?* - 07D87ก/J[/+K\ / ?*..................................................................................... 26 ##$% 5 Shell - '0=XกD1/+O737ก5?7ก@A..................................................... 29 - +&D/**AD9>75 ^%%_3.................................................................................. 30 - ก*9>5D7`D// ?*/*+(**3=8AD9>HE%กก3Shell Script............................. 34
!" () ##$% 6 กก vi - 2%ก vi........................................................................................................... 36 - 7> กก vi........................................................................................... 37 - '103>ก*>'@A*+2%/c+5?62 E'103>........................................... 37 - '103>ก/0?62 E=7 =A/') ................................................................................ 39 - '103>=7 =A/') D32*9>5D/') (Replace)............................................... 40 - ก5ก*7ก'103> (Undo)..................................................................................................... 40 - ก*3)3กW............................ ..................................................................................... 40 - ก*3)D3E............................................................................................................... 40 - ก*/') .................................................................................................................. 41 - ก'3E*ก*+)............................................................................................................ 41 - ก'2'1....................................................................................................................... 41 - ก3D[ก/ ?**HK*A..................................................................................................... 42 ,-ก ก
กก +5_กA=>กJ65K\ / ?*.................................................. 43
,-ก
กก +5_กA=>ก/ Text Shell............................................... 53
,-ก
ก%ก(6 LiveCD........................................................................................ 57
,-ก
ก%ก_กcA01233D[ก/ ?*7E Flash Drive......................................62
1 ก
1970 ก กก ! "#$$$ก $ก %& ก'(&)* (+, $(#(-./0ก1 + 2'./!3& 1973 ก$+$( #513+.#ก('ก 3ก%& " 2!'&%'2! ก/ก3*6(' ),$ ! "#$$ "2' BSD ), System V @--A $ ก ) กก$ก$ %( Linux FreeBSD NetBSD J,J ), ก กกK& "#$$ก'(&)* (+, $ก *6 ก ,Aก'& 0+,% %( *,Aก ,Aก , ,Aก..
ก ก
ก ก $"#$2 +A(ก %&. & .$ /%ก &,KกL -/& &!$+M( .$ /3&* '$ก,+,L" .$ /3&! 'ก#( ก '2!L 3&+,L '(&* '$ก#,#ก 3+$('&.#,ก
' N ) (&ก 3&''ก Foreground ), Background .$ / )*,U' $+, 'U)# N'*' .
1
2 ! " #$% ก ก
! " # ก ก ! # %(#&ก,& "0.1993 $ก ''ก) N" &. &), "' '&ก) FSSTND (File System Standard) ('$$ก *6N" &. &+$() Filesystem Hierarchy Standard : FHS !&$N" &. &",ก $ (Tree) ),$ก -) ,3 % -).&& ! 2-1 N )ก $ ),'$, '& ก !`%Aก"'&* )Ua$ ก' # 2 .(# "2' Collection of files !&กK '$,!.$*dก ), "' structure .3+ -ก ), +'$,)Ua$&+$ & ก $.(#! 3 "2' Partitions !&)ก Physically + 2' Logically '& "' N2'+ -ก,( #/&)Ua$ ),N" &. & ก '
#$/&ก a'&ก)Ua$ -กก /& Multiple users ), File sharing #dก -กK '$,!%ก ก Aก%"2' -กK '$,)Ua$'$,+ 2' U, (file) U,"2 '.! & !
-A '$ ,, N )ก $+ 2 '' กK !` % '&ก
# #$#%A #ก ก '&/&U,+ 2''$,(& L 5U,'&N )ก $ -$($"#$ก!#'&ก )' .'&N )ก $ L &. ก $N'' %!*01! ก#( system call #+ N )ก $ ก% *2!'+.$ /-ก &!ก!#ก U,
2
/
"2' "'
ก'&ก "' ('),U, /bin
"2'N )ก $!กK !` %'&ก -%&
/boot "2' กK )Ua$! ก!#'&ก LILO %ก /dev "2' )Ua$!%กK U,'A ก p(& L /etc
"2' )Ua$กK '$, 5 Configulation
/home "2' )Ua$!กK No$ "' (& L '&`% /lib
"2' ",&N )ก $-! 3),N$,'&"' ,
/mnt "2' )Ua$!%$ (mount) '& U,),'Aก p /proc "2' ,''&"' ,),N* .(& L /root "2' "' No$'& /sbin "2' )Ua$!%กK "3.!&), (& L /tmp "2' "' %!#" #! Aก"$.dq'( /usr
"2' N )ก $(& L %( X11 , netscape , pine
/var
"2')Ua$!%กK '$,!,!),&,'#,
2-1 N" &. & "' '& ก ก) $ i File system Hierarchy Standard (FHS) N" &. &U,N" &. & U,'& ก),,AกN!# !& &" &'-- $$ก+ 2''ก#( -'(ก `), `-ก %( &" 2!'&)$(( (Server) '--$ ก ) (& home ''ก home1 ), home2 *2!'-ก ก `%)(, 5
3
('-ก 'd N" &. &'& )Ua$'$, N%"3.!&) .!&&#"3.!& (Command Line) ก .dN" &. & )Ua$'$,'& ก ,Aก N" 2!'&)$( ( (Server) !-%"2' cvs.buu.ac.th !& ก *,Aก (Burapha Linux Server) !&-$N" &. &$A$$'& "' & ! 2-2
2-2 ).&N" &. & "' '& ก *,Aก (Burapha Linux Server) N`%!3ก %&%2!' narongsak ),%&!" 2'! & CVS .M,ก1p!%- ก#( * '$ (Prompt) .&ก-ก
) ก'& ! 2-2 " 2!'&+$ / ).&3)+(&
!`%ก3,&3ก '( !- ก3)+(& / #( '& (root) ), Prompt - - #" 2!'&+$',,( $ ('-ก" 2!'&+$ $ "2'"3.!&'& ก ก (!&-ก,(# ,'(') "3.!&!*$*,&.(#'&* '$ "2' ls N"3.!&-%*2!').&'$,#( p 3)+(& ก' #'$, "' + 2'U,%2!'' & ก %& ก ก .$ /%& 2 #d "2' #d) ก-ก+-' '&" 2!'&กN & ),%N )ก $ 5 Emulator !--3,'&+''&" 2!'&)$(( N!')3ก %&N )ก $ PuTTY ( ,'ก %N )ก $ PuTTY '( 5"`#ก ) !&$'&
2-3 '"'N)ก $ PuTTY
4
3 ("
ก Login .% Logout ก Login ') ก!-'&3ก('!-%& ก ก N`! -%&-'&.( username ), password ก('ก %.$'
1 2
3 4
3-1 ).&ก .(
5
) ก!).& ! 3-1 ).&ก %&'&`%%2!' narongsak ),
! 2 -ก .( +.`( !&'*& #&"2' +-'-$($ก ).&'"#$L p!*$* & `%"# -'&&-*$* +.`(+/ก'& /*$*`ก 3 " & N )ก $-wN'N$ !& `%กK-'& กN )ก $$+$('ก" &+!& .(#! 3 ), 4 ).&'$, ,''& #$/&-3#N"#!+,2''(.3+ `% '$, 2 .(# '--$+ 2'$($กK '(ก #(`), " 2'( &"(+$ก
).&`, 'ก+ 2'$(
(" 2ก 3ก #$% (" 2ก 3ก #$% : (" ls Syntax
ls [OPTION] FILES
"3.!&!%.3+ ).&)Ua$'$, $2!' %"3.!& ls N$($&2!' -ก ).& y*%2!''&U,(&L "' @--A option !$ก%ก ls "2' -l -a
-).&`,,*d) K$ ) (Long Format) -).&)Ua$'$,&+$
1
2 3
4
3-1 +-').&ก %&"3.!& ls za ), ls zl 6
-ก ! 3-2 3)+(&! 1 $2!'*$*"3.!& ls -).&)Ua$), "' "'
@--A &3)+(&! 2 .(#3)+(&! 3 $2!'*$*"3.!& ls -l -).&'$,ก!#ก )Ua$ ), "' "' @--A N).&+!&
('+!&U,+ 2' "' ) K$ ) (long format) N) (& ,'''ก 7 "',$5 &3)+(&! 4 N-'d & ! 3-3 -3#,&"
%),.dq
ก,A($
-'&
# z #,
%2!'U,+ 2' "'
3-3 ).& ,'$2!'%"3.!& ls -l -ก ! 3-3 N)(,"',$5$"#$+$& - %),.dq - (& 'ก 5'&U, L #(% N-ก3+ 'ก 10 # !&'ก #) ก 'ก/&%'&)Ua$+ 2' "' %( d
) ก).&'&U,%2!' 17-3-50 "' .3+ 9 'ก +,& ก ก3+ก '( ก ),ก %U, !&ก3+N%"3.!& chmod - -3#,&" - 'ก+ /&-3#U,!,&"ก "' + 2'U, / "' #(&-$"( A# 2 - -'& - 'ก+ #(" -'&U,+ 2' "' %( narongsak - %2!'ก,A($ 'ก+ #( +.`%`$./'(ก,A($ - 'ก+ /&'&U,#($"#$-A(+ ( N).& (Byte) )(/ "' -$(ก 4096 (Byte) .$' - #-#, -).),#,ก )กU,+ 2' "' ,(.A - %2!'U, ).&%2!'U, + 2' "'
7
(" 2ก 3ก #$% : (" cp Syntax Example
cp [OPTION] [-T] SOURCE DEST cp [OPTION] SOURCE... DIRECTORY cp [OPTION] -t # SOURCE. cp test.txt jane.txt
"3.!&!%.3+ ก ",'กU, ) ก %"3.!& cp %2!''&U,& $# %2!''&U, (+$() ,&
1 2 3 4
3-4 +-').&ก %&"3.!& cp -ก ! 3.4 3)+(&! 1 $2!'*$*"3.!& ls -).&U,), "' &+$ "'
@--A &3)+(&! 2 &'&ก ",'กU, test.txt U, jane.txt .$ /3N% "3.!& cp &3)+(&! 3 !&$2!'%"3.!& ls 'ก" &- ก U, jane.txt *!$$
8
(" 2ก 3ก #$% : (" mv Syntax Example
mv [OPTION]... [-T] SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY mv [OPTION]... -t# SOURCE... mv test.txt welcome.txt
"3.!& mv (move) %.3+ ก )Ua$'$,), "'
#$/&ก ,!%2!'# 3&%(#ก "3.!& rename'.
1 2 3 4
3-5 +-').&ก %&"3.!& mv -ก ! 3-5 3)+(&! 1 $2!'*$*"3.!& ls N-).&U,), "' &+$ "' @--A &3)+(&! 2 &'&ก ,!%2!'U, text.txt welcome.txt .$ / 3N%"3.!& mv &3)+(&! 3 !&$2!'%"3.!& ls 'ก" &- ก #( U, text.txt $( ก N-* )(U, welcome.txt
9
(" 2ก 3ก #$% : (" rm Syntax Example
rm [OPTION] [FILE] rm test.txt
"3.!& rm (romove) $#%.3 + , U, &) U,#+ 2') ก,A($'&U, N %"3.!&*&" &#
1 2 3 4
3-6 +-').&ก %&"3.!& rm -ก ! 3-6 3)+(&! 1 $2!'*$*"3.!& ls N-).&U,), "' &+$ "' @--A &3)+(&! 2 &'&ก , U, test.txt welcome.txt .$ /3 N%"3.!& rm &3)+(&! 3 !&$2!'%"3.!& ls 'ก" &- ก #( U, test.txt /ก, ),#
10
(" 2ก 3ก #$% : (" cat (concatenate) Syntax Example
cat [OPTION] [FILE] cat HelloWorld.java
"3.!& cat (concatenate) $+!).&`, '5'&U,&-'5*
1 2 3 4
3-7 +-').&ก %&"3.!& cat -ก ! 3-7 3)+(&! 1 $2!'*$*"3.!& ls N-).&U,), "' &+$ "' @--A &3)+(&! 2 &'&ก ,''&U, HelloWorld.java .$ / 3N%"3.!& cat &3)+(&! 3 !& ,''&U,- ก ''ก&+-'
11
(" 2ก 3ก #$% : (" cat (concatenate) Syntax Example
file [OPTION] [FILE] file *
"3.!&file -3ก ).&%'&U,!$ "' !&"3.!& file -3ก '( Content ), 'ก 5'&)Ua$'$,L
) ก %"3.!& file [option]... file
1
2
3-8 +-').&ก %&"3.!& file -ก ! 3-8 3)+(&! 1 $2!'*$*"3.!& file * N -).&U,&+$ "' @--A * '$& 'ก 5'&U, &3)+(&! !& ,''&U,- ก ''ก&+-'
12
(" 2ก 3ก # (" 2ก 3ก # : (" cd Syntax Example 1 Example 2 Example 3
cd cd cd cd
[DIRECTORY] Programs ] #2# Programs .. ] ก%# # ก^ / ] # # root
"3.!& cd (Change Directory) "3.!&!%ก ,! "'
1
2 3 4 5
3-9 +-').&ก %&"3.!& cd -ก ! 3-9 3)+(&! 1 $2!'*$*"3.!& ls N-).&U,), "' &+$ "' @--A &3)+(&! 2 &'&ก "' Programs .$ /3N%"3.!& cd Programs &3)+(&! 3 !&$2!'%"3.!& ls 'ก" &- ก #( U,(&L!'( "'
Programs ),/'&ก ''ก-ก "' .$ /3N%"3.!& cd .. &3)+(&! 4 ), $2!''&ก ''ก& "' root .$ /3N%"3.!& cd \ &3)+(&! 5 !&$2!'% "3.!& ls 'ก" &- ก U,(&!'( "' root 13
(" 2ก 3ก # : (" pwd Syntax Example
pwd [OPTION] pwd
"3.!&!%.3+ ).& "' @--A (3'&#ก ก *$* cd DOS) $ -ก"3#( print work "'
1 2 3
3-10 +-').&ก %&"3.!& pwd -ก ! 3-10 3)+(&! 1 $2!'*$*"3.!& ls N-).&U,), "' &+$ "' @--A &3)+(&! 2 &'&ก !- 3)+(&'& "' .$ /3N% "3.!& pwd -).&!'('& "' @--A
14
(" 2ก 3ก # : (" mkdir Syntax Example
mkdir [OPTION] [FILE] mkdir unix
"3.!&.3+ %ก . & "' (make "' ) $2!' '&ก "' +$( +%"3.!& mkdir $#%2!' "' +$( N option .(#+M(!$%ก "2' -m -3ก ก3+ Permissioin -p -3ก . & Parent "' +#ก p!&$($ก
A "'
1 2 3 4
3-11 +-').&ก %&"3.!& mkdir -ก ! 3-11 -ก#'(&ก . & "' +$( %2!' unix 5 "'
narongsakN3)+(&! 1 $2!'*$*"3.!& ls N-).&U,), "' &+$ "'
@--A &3)+(&! 2 &'&ก . & "' unix .$ /3N%"3.!& mkdir unix &3)+(&! 3 !&$2!'%"3.!& ls 'ก" &- ก #( "' unix /ก. & '),#
15
(" 2ก 3ก # : (" rmdir Syntax Example
rmdir [OPTION] [FILE] rmdir C
"3.!&!%.3+ ก , "' (3'&#ก dos) $-ก"3#( remove "' N option !$ก%ก rmdir "2' -p -3ก , Child ), Parent "' $,3 .$$#( '&ก , "' %2!' / A / B / C /+ก "' @--A "2' / A / B -'&3$'('
1 2
3
3-12 +-').&ก %&"3.!& rmdir -ก ! 3-11 3)+(&! 1 $2!'*$*"3.!& cd B ก "' B &3)+(&! 2 &'&ก , "' c .$ /3N%"3.!& rmdir c &3)+(&! 3 !&$2!'%"3.!& ls 'ก" &- ก #( "' c /ก, '),# !&-ก#'(&
16
(" 2ก 3ก ก กc2d (" 2ก 3ก ก กc2d : (" who Syntax Example
who [OPTION] [ FILE | ARG1 ARG2 ] who
"3.!& who %*2!').($" &! login '(
1
2
3-13 +-').&ก %&"3.!& who -ก ! 3-13 3)+(&! 1 $2!'*$*"3.!& who ก ).&%2!''&`! Login '( &3)+(&! 2 -ก#'(& ).&++K#($ user !%2!' cs484243 ), narongsak ก3,& Login '(
17
(" 2ก 3ก ก กc2d : (" whoami Syntax Example
whoami [OPTION] whoami
"3.!& who am i %*2!').(`%!& login .( login #%2!''
1 2
3-14 +-').&ก %&"3.!& who -ก ! 3-14 3)+(&! 1 $2!'*$*"3.!& who am i ก ).&%2!''&`% & 3)+(&! 2 -ก#'(& ).&++K#(`% %%2!' narongsak ก Login .(
18
(" 2ก 3ก ก กc2d : (" passwd Syntax Example
passwd [OPTIONS] [LOGIN] passwd
"3.!& passwd "3.!&!%ก ,! password $2!' %"3.!& -3ก /$ password $ก(' ),#-&/$ password +$( ),+2 password 'ก" &
1 2 3
3-15 +-').&ก %&"3.!& passwd -ก ! 3-15 3)+(&! 1 $2!'*$*"3.!& passwd N -/$ +.ก(ก(' & 3)+(&! 2 -ก -+.( +.+$('ก 2 " & &3)+(&! 3 +.+$('&.(+$2'ก &.'&" & -&-.$ /,! +.+$(
19
(" 2ก 3ก ก ^"] " (" 2ก 3ก ^"] " : (" mail Syntax Example
mail mail
"3.!& mail -"3.!&!%ก .(& mail + 2' '( mail !'( ก( $2!'%"3.!&),# - prompt (" 2!'&+$ ?) .$ /.("3.!&,& %( h ).& mail !$'( +$, %.3+ ,2'ก mail ! '&ก '( d +$, %.3+ , mail q %.3+ ก - ก 3&),ก, .( UNIX prompt
1 2
3-16 +-').&ก %&"3.!& mail
20
-ก ! 3-16 3)+(&! 1 $2!'*$*"3.!& mail N -).($$,ก!y !/ก.(& $ .(&$$2!'+ ( #,( &3)+(&! 2
(" 2ก #$% .% กi%j (" 2ก #$% .% กi%j: (" which Syntax Example
which [OPTION] [--] PROG_NAME [...] which mail
"3.!& which "3.!&!%).&!'('&U,
1 2
3-17 +-').&ก %&"3.!& mail -ก ! 3-17 3)+(&! 1 $2!'*$*"3.!& which mail N -).&!'('&U, #('(! &3)+(&! 2 -ก#'(& -).&!'('&U, mail + #('( "'
+
21
(" 2ก #$% .% กi%j: (" chmod Syntax 1 Syntax 2 Syntax 3 Example
chmod chmod chmod chmod
[OPTION]... MODE[,MODE]... FILE... [OPTION]... OCTAL-MODE FILE... [OPTION]... --reference=RFILE FILE... o+w test.txt
"3.!& chmod "3.!&!%.3+ ก3+.d'&`%ก,A($(&L +.$ //&U, (&L -) (&ก,A($`%''ก 3 ก,A($#ก 1. -'& (owner) "2'`!. &U,$ )##'ก1 ( u ) 2. ก,A($ (group) "2' ก,A($`% `%!'(ก,A($#ก.$ /%&U,'&*2!' (#$ก,A($ )##'ก1 ( g ) 3. `'2! (other) "2' A"",!$('(ก,A($ + 2' $(%(-'&U, )##'ก1 ( o ) `%.$ /ก3+.d(&L+ก U, N) (&''ก 3 '(&#ก 1. read "2'.dก '(U, )##'ก1 ( r ) 2. write "2' .dก )กU, )##'ก1 ( w ) 3. execute "2' .dก %&U, )##'ก1 ( x )
,''&U,.$ /#"3.!& ls zl
#'ก1 .$ /) (&& #! 1 'ก#( "' + 2'$( /-$ #'ก1 d /$(-$" 2!'&+$ ( - ) #! 2-4 'ก#(.d'&-'&U, #! 5-7 'ก#(.d'&`%!'(ก,A($#ก #! 8-10 'ก#(.d'&`%'2!L'ก+2'-ก 2 ก,A($) ก
) ก %"3.!& chmod [ u / g / o ] [ + / - ] [ r / w / x] filename
22
1 2 3 4
3-18 +-').&ก %&"3.!& chmod -ก ! 3-18 $2!' '&ก !-,!.dq+ก U,!'&ก N3)+(&! 1 *$* "3.!& ls zl !&).&'$,ก!#ก )Ua$ ), "' "' @--A N).&+!&
('+!&U,+ 2' "' ) K$ ) (long format) &3)+(&! 2 &'&ก )กU,! %2!' test.txt /กก3+.d+`%'2!.$ /)กU, N*$*"3.!& chmod &3)+(&! 3 N -ก"3.!& ls zl -+K#(U,!%2!' test.txt /กก3+.d+`%'2!.$ /)กU, !&-ก$3$(&3)+(&! 4
23
(" p]qr] s (" 2ก 3ก #$% : (" man Syntax Example
man [COMMAND] man who
"3.!& man "3.!&).&'"#$ !'d ก %&'&"3.!& ,'(&L #$/& option !"3.!&.$ /%#
3-19 +-').&ก %&"3.!& man
24
-ก#'(&& ).& ,''&"3.!& clear ),$2!''&ก -''ก +ก q (" 2ก 3ก #$% : (" exit Syntax Example
exit exit
"3.!& exit "3.!&.3+ ''ก-ก UNIX
3-20 +-').&ก %&"3.!& exit $2!'%"3.!&),#+-'-#(&,( ),#),$($&!-3('),#
-%"3.!&กK('$2!'3& . K- '
25
4 "tก uv .$w% (Permission)
"tก uv .$w% (Permission) 2!'&-ก,Aก$ ก 3&) `%+," (Multiuser) &-&$"#$-3! '&$ก ก3+.dก /&)Ua$'$,), "' (&L N -) (& 3 ก,A($"2' "!-'&U, (User) "!'(ก,A($#ก -'&U, (Group) "!'(",ก,A($ก -'&U, (Other) $2!'%"3.!& ls -l -`,,*d''ก$&
4-1 `,,*d-กก %"3 .!& ls -l 26
+.&ก'$,-กก,A($) ก ก' ##'ก1 "2' r w x d "#$+$'&#'ก1 +,( "2' r ('$-ก read +$/& .$ /'(U, + 2' "' w ('$-ก write +$/& .$ /'$,,&U, + 2'.$ /!-ก 3ก
(&Lก "' x ('$-ก execute +$/&.$ /!- $#,`,U, + 2'.$ /!- "' d .M,ก1p*2!' 'ก+ #( "'
.M,ก1p*2!' 'ก+ #(U, "t read write execute
ก ก#$% ก ก# 2'+ '('$, '$,+ 2' %2!' ,!),& )ก2'+ . &+ 2', "' .!& execute ( $#,`,"3.&! ) ,! "+ .3-กU, "'
4-1 ).&.d'&U,), "'
"('&.dU,+!&$"( - rwx r-x r-TYPE -
r 4
USER (u) w 2
x 1
GROUP (g) r x 4 0 1
OTHER (o) r 4 0 0
4-2 ).&.d'&U,), "' ) ).& ''& - rwx r-x r--
27
.d$ &! 4-2 +$/& #) ก z 'ก+ #('$,"2'U, $(%( "'
3 #'ก1 USER (u) "2' .d!-'&3ก "2' r w x '( $#,`, 3 #'ก1 GROUP (g) "2' .d!"!'(ก,A($#ก -'&3 "2' r x '( $#,`, 3 #'ก1 OTHER (o) "2' .d!"!'((&ก,A($ก -'&3 "2' r '( /"#,-"(#,'&.dN+3"(#,$ #$ก- 754 #'(& ) '&.d - rwx --- --700 +$/& U,! -'&'( $#,`, drw- r-- r-x 645 +$/& "' !-'&'( ก,A($#ก'( ก,A($'2!'(), $#,`, - r-- r-- r-444 +$/& U,!Aกก,A($'('(&#
28
5 Shell ]q
! " p]qrก ( ก N" &. &*2iก 3&'& ก$'( 4 .(##ก "2' o )# (Hardware), "' , (Kernel), %,, (Shell) ),)'**,"% (Application) & ! 5-1 Application Shell Kernel Hardware
5-1 ).&N" &. &*2iก 3&'& ก %,, (Shell) "2' N )ก $+!& ก!3+!.(#('`% (interface)
+#(&`%ก ก ก ("' ,) !&%,,$(.(#+!&'&"' , )(% "' ,ก $#,`, ` % . $ /.! & & ก N `( &%,, ( N )ก $%,,&$"Ap.$ '& Shell Programming Language 3+`%.$ /3"3.!&(&L '&%,,$N )ก $กK U,# ก#( Shell Script
29
jd%% 2d2x33y • Bourne shell (/bin/sh) %,,A") กL !$%ก'(&)* (+, $ก ก3+ N" &. &51",L ก 51',ก' (Algo Language) .$ / shell script ),& %,,$ i!$ ก กAก# ),&.$ / shell script &ก '2!N$('&)ก' 'ก# -$ default prompt " 2!'&+$ $ • C shell (/bin/csh) %,,!*6$+,&-ก Bourne shell $ ) "3.!&), #ก p+$2'ก 51 (C Language) $U@&ก%ก 3&+,!),'(&.#ก 'ก&&.$ /"# "A$ก +,'&'$,ก#( Bourne shell ),&$"#$.$ / ก ก%"3.!&!%),# -$ default prompt " 2!'&+$ % • Korn shell (/bin/ksh) shell !*6$-) '& Bourne shell ), C shell .$ /3& function '& Bourne shell Aก'(& ก shell script 3&(),
กA$ .$ /3"3.!&!%),#ก, $ execute +$( /2'#( Korn shell ก
#$'''& Bourne shell ), C shell $##ก )($($ UNIX Aก# -$ default prompt " 2!'&+$ $ • Bourne again shell (/bin/bash + 2' /usr/local/bin/bash) ก ' Bournr shell 3ก, $ *6+$( .$ /3&) line editing ),&*!$ .d5*ก 3&'ก +,'(& bash shell $(%( standard UNIX shell )( default shell '& linux @--A -$ default prompt " 2!'&+$ $ ก ." jd%%q2 y| `%.$ / #-.' 5'&%,,&+$! ก $ N%"3.!& $ cat /etc/shells ก ." jd%% ก(%2d^2| q `%.$ / #-.' 5'&%,,!ก3,&%&'(p N%"3.!& $ echo $SHELL
30
(#3v Shell Script +A`,!'& Shell Script ก),#-'(ก `%&)(," )(N.(#$ก ),#-$+A`,ก & - Shell script .$ / '$, (Input) -ก`% U, ),).&`,,*d''ก& +-'+$2'ก ก %"3.!& (Command) N & - $ N%'(&$กก . &"3.!&!.(# A"", - ,#,ก ""3.!& - .$ /3+& &'(&'N$ - .(#+!&'&&!'N$'&`), q2ก Shell Script 1. %N )ก $ 5 editor ก Shell Script 2. *!$.d+U, Shell Script !.$ / execute #"3.!& $ chmod +x script $ chmod 755 script 3. execute U, Shell Script &ก,(# #"3.!& $ sh script ก p! Bourne shell $ bash script
ก p! Bourne again shell
$ ./script ^ 1 Shell Script clear echo "Hello $USER" echo "Today is \c ";date Example 1 echo "Number of user login : \c" ; who | wc -l echo "Calendar" cal exit 0
31
c%%pt
! 1
! 2
! 3
! 4
! 5-6
Hello nattawut Today is Tue Jul 24 15:25:08 ICT 2007 Number of user login : 1 Calendar July 2007 Su Mo Tu We Th Fr Sa 1234567 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ก ", +-').&`, ก ).&'"#$ก`%& N#) $USER -#) !%กK %2!'`%# ก ).!),#,@--A ก ).&-3#`%& p #, L ก ).& '&2'@--A ^ 2 Shell Script
Example
# # Script to read your name from key-board # echo "Your Name please:" read name echo "Hello $name, Lets be friend!"
32
c%%pt
! 1
! 2
! 3
Your Name please: *$*'$, Hello '$,!*$*%, Lets be friend! ก ).&'"#$*2!'+`%ก 'ก%2!''& ก
'$,-ก`%`(&" ' ),#กK ##) %2!'#( name ก ).&"(!'(#) name
ก ก ก3+"(+ก #) .$ /%%2!'#) ก 3ก , )(.(#'& ก ).&"(-ก#) -'&.(" 2!'&+$ $ 3+#) L # ^ 3 Shell Script
Example
c%%pt
#!/bin/sh # # Script that demos, command line args # echo "Total number of command line argument are $#" echo "$0 is script name" echo "$1 is first argument" echo "$2 is second argument" `,,*d+,&ก
# ./script A B Total number of command line argument are 2 script is script name A is first argument B is second argument
33
Shell Script &#'(&ก
"(* $' `(& command line N * $' !`% A-/กกK '(#) $1, $2 , $,3 .(#-3#'&#) ! A $ -/กกK '(#) $#
ก ,!0&'&'$,),`,,*d!-กก
Shell Script 'ก-กก
'$,`(&" ' ($#'(&! 2) ),ก ).&`,,*d! ''ก&+-' &$ ) '&ก
'$,),).&`,,*d ) '2!'ก# 1. ก % }. > ก ,!0&ก ).&`,-ก+-',&U, N$ ) '&ก %& & Example ./program > output_file `,,*d!-กก
N )ก $ -/ก,&U,!%2!'#( output_file NU, c%%pt &ก,(#$(#(-$'$,$'(+ 2'$(กK$ -/ก #`,,*d-กก
N )ก $&+$
2. ก % }. >> ก ,!0&ก ).&`,-ก+-',&U, N$ ) '&ก %& & Example ./program >> output_file `,,*d!-กก
N )ก $ -/ก,&U,!%2!'#( output_file N-ก
c%%pt ('U, ก,(#"2''$,$U, output_file &"&'(),$`,-กก
N )ก $(''$,
3. ก % }. < ก ,!0& '$,-กU,)ก
#" ' N$ ) '& ก %& & Example ./program < input_file
34
4. ก (c%%pt! .ก v #%"( ! .ก " | .$ /3'`,,*d!-กก
N )ก $! 1 '$,.3+ N )ก $! 2 N$ ) '&ก %& & Example ./program1 | ./program2 `,,*d!-กก
N )ก $ -/ก,&U,!%2!'#( output_file N-ก
c%%pt ('U, ก,(#"2''$,$U, output_file &"&'(),$`,-กก
N )ก $(''$,
ก 2dก % }q 4 .q" u2d ^ก# d^ .$ /3'`,,*d!-กก
N )ก $! 1 '$,.3+ N )ก $! 2 N$ ) '&ก %& & Example ./program < input_file > output_file -ก"3.!&&ก
N )ก $N '$,-กU, input_file ), ก (t `,-กก
N )ก $,&U, output_file
35
6 ก 2d! .ก vi ]q
3! .ก vi
6-1 +-'N )ก $ vi
ก (! .ก vi N )ก $ vi ) (&ก 3&''ก 3 N+$ "2' 1. N+$"3.!& (Command Mode) 2. N+$*$*'"#$ (Insert Mode) 3. N+$"3.!&
,(&.A (Lastline Mode)
36
)(,N+$'&N )ก $-$ ) ก 3&),+!y*!)ก(&ก )ก( 1. !(" N+$!%ก .!&+N )ก $3&(& L ก' # • "3.!&ก ,2!'"'' ),+-' • "3.!&ก .(N+$*$*'"#$ • "3.!&ก , #'ก1
• "3.!&ก ,
• "3.!&ก )!#'ก1
• "3.!&ก *!$
+$( • "3.!&ก ก,กก ก 3,(.A 2. !pp N+$!%ก *$*+ 2'a''"#$ *2!3&'& N )ก $ 3. !(" %^"y N+$!%ก .!&&N )ก $3&& • "3.!&!ก!#ก ก ก'$,,&U, • "3.!&ก "+'"#$
ก 2d! .ก vi ก .(N )ก $ vi .$ /%Nก *$*"3.!& vi <%2!')Ua$>
(" 2ก %] .% 3| ^2!(" p!'(N+$"3.!& `%.$ /,2!'"'' &3)+(&'&'ก L +-' ),.$ /,2!'+-'*2!').&'$,!.(#.(#+!&'&+-'N )ก $N %"3.!&ก ,2!'"'' & &! 5-1
37
,2!'"'' &# 1 #'ก1
,2!'"'' & 1 #'ก1
,2!'"'' &# 1 "3 ,2!'"'' & 1 "3 ,2!'"'' 1
,2!'"'' ,&,(& 1
,2!'"''
,2!'"''
,2!'"'' &# 1 N" ,2!'"'' & 1 N" ,2!'"'' ('+/ ,2!'"'' ('+ก(' ,2!'"'' &$A$ '&-' ,2!'"'' &
!'(ก!&ก,&-' ,2!'"'' &
,(&.A'&-' ,2!'+-'" !&+-' ,2!'+-',&" !&+-' ,2!'+-'+!&+-' ,2!'+-',&+!&+-' ,2!'
) ก.A ,2!'
.A
l h w b k j 0 (}) $ ) ( } { H M L Ctrl-U (up) Ctrl-D (down) Ctrl-F (forward) Ctrl-B (backward) gg G
5-1 ).&"3.!&ก ,2!'"'' ก ,2!'"'' &
!'&ก 3Nก *$*+$,
$#"3.!& G + 2' gg %( 25G + 2' 25gg +$/&ก ,2!'"'' &
! 25
38
(" 2ก "^!pp (" . ก (Insert) ก ) ก!+3)+(&"'' i ก ) ก!
I $2!'%"3.!& i + 2' I ),# `%.$ /a''"#$!'&ก ) ก $2!'. K-.ก
*$*'"#$!'&ก ) ก),# +ก)a Esc *2!'ก, .(N+$"3.!& (" pp^ (Append) ก *$*'"#$('!+,&3)+(&"'' ก *$*'"#$('!
a A
(" . ก 2^ (Open) Nก$2!''(N+$*$*'"#$$2!'`%*$*'"#$-ก !&K$
),# +ก ` % '&ก
+$(. $ /3 Nก ก)a Enter '( & กK $+ก$ ก * $ * '"#$#),# ),'&ก ) ก
+$(,& +#(&'"#$$3N,2'ก%"3.!&& ) ก
+$(
"'' o ) ก
+$(+2'
"'' O ก %"3.!& o ), O N+$"3.!&-3+ vi ) ก
#(&+),.(N+$*$* '"#$, `%.$ /*$*'"#$!'&ก ) ก
39
(" pp ]% . (Replace) $2!'`%'&ก *$*'"#$+$( '"#$$!$'( ก *$* + 2',!#'ก1
*&##%"3.!& r $2!'*$*#'ก1 !'&ก ,!),# vi -ก, .(N+$"3.!&N 'N$ +ก'&ก ,!)#'ก1 +,# %"3.!& R $2!',!) '),# `% '&ก)a Esc *2!'ก, .(N+$"3.!& ก %"3.!& R $'"# .&ก"2'+ก'"#$$#ก#( '"#$!,!) '"#$+$(.(#!ก -* $* '"#$$ +ก'"#$+$(. ก#( '"#$$ `%'&, '"#$$!+,2'#"3.!& x
ก ก%ก(" (Undo) "3.!& u %ก ก,กก 3&!"3" &.Aก('+!-%"3.!& %( `%*!&%"3.!&,
),* #(, `
.$ /ก,ก`,'&"3.!&,
N %"3.!& u !& vi -ก,ก"3.!&),3
!, ก, "2$ "3.!& u .$ /%ก,ก"3.!& .A!*!&%&*&"3.!&# .(#"3.!& U %ก ก
$!)ก" & .Aก, "2$$(#(`%-3ก ,!),&)ก'$,
'(&
ก %กi ก , #'ก1 p 3)+(&"'' %"3.!& x "3.!&.$ /% (#$ก #,).& -3##'ก1 %( 7x %, #'ก1 7 # !$!#'ก1 p 3)+(&"''
ก % ก ,
&
!$"'' '(%"3.!& dd "3.!&.$ /% (#$ก #,).&-3#
!'&ก %( 5dd %,
5
!$ p
!$"' ' '( 40
ก % ก , '"#$%"3.!& d "3.!&"3.!&!'&$ก ก3+' !'&ก , # N%"3.!&,2!'"'' #ก3+' %( d0 , '"#$&)(3)+(&"'' /&
d$ , '"#$&)(3)+(&"'' /&
d} , '"#$&)(3)+(&"'' /&.('+ dG , '"#$&)(3)+(&"'' /&U, '.&ก "3.!&+$# d "3.!&!$' $ก+ก%N$(-"#$+$N ,' '+ $ #&+$ก#,%&
ก %ก.% yy p P
",'ก'"#$
!3)+(&"'' '( #&'"#$!",'ก# p
/-ก3)+(&"'' '( #&'"#$!",'ก# p
ก('3)+(&"'' '(
ก ",'ก .$ /%#,`.$`.ก "3.!& yy # %( 5yy +$/&ก
",'ก 5
N -ก
!"'' '(
ก ( ก "+"3+ 2''"#$N )ก $ vi .$ /3N'(N+$"3.!&),#ก " 2!'&+$ / *2!'ก %"3.!&N+$
,(&.A %( /string ก "+"3#( string U, $2!'* "3&ก,(#),# +ก'&ก &"3('!'(,(&-ก3)+(&@--A +ก n ), ก N *2!'ก, "+&
& 41
ก vก%%#$% :w :wq :q!
ก ก'$,@--A ,&U, ก ก'$,@--A ,&U,),''ก-กN )ก $ ก ''ก-กN )ก $N$( ก'$,
+$+A ก %" 2!'&+$ : 3+"3.!&ก %"3.!&N+$
,(&.A ), -3&กK('$2!''(N+$"3.!&ก(' &ก %&"3.!&&ก,(#-&"# ก Esc ก('Aก" &
42
jcก ก ก 2d! .ก yกp] ก u^!.$w% ก 2d! .ก yก WinSCP 2ก u^!.$w% ก %&N )ก $ Aก WinSCP ก /(N')Ua$'$,-ก" 2!'&!$
ก ก (UNIX) $&" 2!'&"'$*#' .(# A"", + 2'ก /(N')Ua$'$,-ก " 2!'&"'$*#' .(# A"",& ก ก $'ก & 1. ,",ก ! '"' (icon)
!&'( Desktop - ก +-'&
ก-1 ).&+-'ก %&N )ก $ WinSCP -ก+ก 'ก'$, ,&%('&(& L & ! ก- 2
43
ก-2 ).&+-'ก ก 'ก'$,%('&(& L '&N )ก $ WinSCP -ก+ก 'ก'$, ,&%('&(& L & %('&! 1 Host name ก 'ก%2!'" 2!'&+ ก (Host Name) !'&ก /(N')Ua$'$, &%(#'(&*$* cvs.buu.ac.th %('&! 2 User name ก 'ก%2!'`% #'(&*$* narongsak %('&! 3 Password ก 'ก%2!' +.`( +,&-กก 'ก'$,(& L '),# ",ก!A$ Login 2. +ก.('$,/ก'& N )ก $-.(+-'ก %&/(N')Ua$'$, +#(& " 2! ' &'&` % ! & $ ก # N# . )," 2! ' & cvs.buu.ac.th ! & " 2! ' &! $
ก ก & ! ก- 3
44
ก-3 ).&+-'.3+ ก /(N')Ua$'$, -ก ! ก-3 -+K#(+-') (&''ก 2 .(# "2'.(#&).& %2!'NU,' ),)Ua$'$,!'(" 2!'&!`%ก3,&%&'( (Local Host) ),.(#&#).& %2!' "' ),)Ua$'$,!'(5" 2!'&+ ก !'( ก, (Remote Host) !&!+ ,2'ก3)+(&&@&" 2!'& Local Host ! U C: 3. +-'.3+ ก /(N')Ua$'$, (Remote Host) + 2'&@&!`%ก3,&% &'( (Local Host) -+K#($)/ " 2!'&$2'+&!&.$ /'d &
45
y
(t ).&3)+(&@--A + 2' "' @--A !ก3,&%& /'+,&ก, &3)+(&!"%&ก('+3)+(&@--A +&3)+(&!"%&$+,&3)+(&@--A ,!3)+(&&3)+(&!+2'ก#(3)+(&@--A +!& &3)+(& !$ '& )Ua$'$, - .3+ " 2!'&@& Local Host )ก( 3)+(& U %( C: - .3+ " 2!'&@& Remote Host )ก( 3)+(& Root
y
(t &3)+(& !$ '&`% - .3+ " 2!'&@& Local Host )ก( 3)+(& My document - .3+ " 2!'&@& Remote Host )ก( 3)+(& Home "' '&`%
U % A& ก )Ua$'$,+@--A w'$,!'(5- "' / NU,' ! A + 2' *!$.& "' & ก .&!%& (' %ก3++$ก ).&+ 2'('NU,' " 2!'& Local Host + 2' "' " 2!'& Remote Host
ก-1 ).&)/ " 2!'&$2'ก /(N')Ua$'$, (Remote Host) + 2'&@&!`%ก3,& %&'( (Local Host) 4. ก . & "' ),NU,' ก . & "' 3Nก %$.",ก #p!'&ก . & "' +$( N",ก!*!#$2'$2!''&ก . & "' +$(" 2!'& Remote Host + 2' ",ก!*2! $2 ' $2! ' ' &ก . &NU,' +$( " 2! ' & Local Host -ก ", ก A $ & ! ก-4
46
ก-4 ).&'ก . & "' /NU,' +$( ('-ก- ก +(&.3+ . & "' /NU,' +$( +*$*%2!' "' / NU,' !'&ก !+. & "' %2!' public_html -กกA$ OK & ! ก-5
ก-5 ).&+(&.3+ a'%2!' "' +$(!'&ก . & 5. ก '*N+, (Upload) ก '*N+,)Ua$'$,-ก" 2!'& Local host &" 2!'& Remote Host 3Nก
",ก$."&#!%2!')Ua$'$,!'&ก '*N+,+-' N!-3ก ,2'ก)Ua$ %2!'#( unix.doc -ก,ก#&#&@& Remote Host & ! ก-6
47
ก-6 ).&'ก upload )Ua$'$, +,&-ก- ก +(&).&3+(&,&!'&ก /(N'+ 2'",'ก)Ua$&
! ก-7 ",กA$ copy *2!'2 .&ก%2!')Ua$! ,2'ก-'(&@& Remote Host +ก&$( +K%2!')Ua$ ก +",ก!A$ *2!' A&'$,+@--A & ! ก-8
ก-7 ).&+(&3)+(&,&!'&ก '*N+,)Ua$'$,!'&ก
48
ก-8 ).&`,,*d! ก -กก '*N+,)Ua$ 6. ก #N+, (Download) ก #N+,)Ua$'$,-ก" 2!'& Remote Host &" 2!'& Local host 3N ก ",ก$."&#!%2!')Ua$'$,!'&ก #N+,+-'# N!-3ก
,2'ก)Ua$%2!'#( unix.doc -ก,ก#&#&@& Local host & ! ก-9
49
ก-9 ).&'ก #N+,)Ua$'$, +,&-ก- ก +(&).&3)+(&,&!'&ก /(N'+ 2'",'ก)Ua$&
! ก-10 ",ก!A$ copy *2!'2 .&ก%2!')Ua$! ,2'ก-'(&@& Remote Host +ก& $(+K%2!')Ua$ ก +",ก!A$ *2!' A&'$,+@--A
ก-10 ).&+(&3)+(&,&!'&ก #N+,)Ua$'$,!'&ก
50
7. ก ,!%2!')Ua$'$,/ "'
ก ,!%2!')Ua$/ "' 3Nก ",ก$.!%2!')Ua$'$,/ "' ! '&ก ,!%2!' ),",ก!A$ -ก- ก )/ .!%2!')Ua$'$,/ "'
-ก*$*%2!'+$(!'&ก ,& !+3ก ,!%2!')Ua$ BLS.doc Burapha.doc & ! ก-11
ก-11 ).&ก ,2'ก"3.!&ก ,!%2!')Ua$'$, 8. ก , )Ua$'$,),ก , "'
ก , )Ua$'$, / "' 3Nก ",ก,2'ก)Ua$'$,!'&ก , ),ก A$
51
9. ก ,! "'
$2!''&ก ,!3)+(& "' & "' !'( !3ก#( 3 Nก ,",ก!%2!' "' $2!''&ก ,!3)+(& "' ก, & "' !'(+2'ก#(!, 3Nก!A$ $2!''&ก ,!3)+(&& Home "' 3Nก!A$ 10. ก ก %2!'$('ก " 2!'& Remote Host 3Nก ก!A$ +ก'&ก %N )ก $!%ก ('ก `%,ก1p! Text Shell N N )ก $ Text Shell N )ก $*2iก %& .$ /%N )ก $ PuTTY !& ก,(##5"`#ก
52
jcก ก 2d! .ก yกp] ก 2d Text Shell ก 2d! .ก yก PuTTY 2ก 2d shell ก %&N )ก $ Aก PuTTY ก % shell `(&N N"',(& L N .$ /,K'ก'`(& SSH ),!.3"M'U)# N'*' . $'ก & 10. ,",ก ! '"' (icon)
!&'( Desktop - ก +-'&
- 1 ).&+-'ก %&N )ก $ PuTTY -ก+ก 'ก'$, ,&%('&(& L & %('&! 1 Host name ก 'ก%2!'" 2!'&+ ก (Host Name) !'&ก /(N')Ua$'$, #'(&*$* cvs.buu.ac.th & Port (ก 22 ), Protocol ,2'ก SSH (NN )ก $- ก3++#'(),#) -ก",ก!A$ Open & ! -2 53
-2 ).&+-'ก %N )ก $ PuTTY $2!'",ก!A$ Open ),#- ก +(&'&N )ก $ PuTTY
-3 ).&+(&'&N )ก $ PuTTY $2!' ก +(&'&N )ก $ PuTTY +ก 'ก +.`% (Username) #'(&%( narongsak & ! -4 54
-4 ).&+ login '&N )ก $ PuTTY $2!'ก 'ก +.`% (Username) '),# N )ก $-+ก 'ก +.'&`( !&-$2!' ก 'ก),#-$().&#'ก1 ),.M,ก1p L ("# *$*+/ก'&) & ! -5
-5 ).&ก ก 'ก +.`('&N )ก $ PuTTY $2!'ก 'ก'$,&+$/ก'& &%2!' Host name (" 2!'&+ ก ) , Username ( +.`() , Password ( +.`() - ก +(&!).&* K'$* $ .3+ Shell '&" 2!'&+ ก & ! -6 55
-5 ).&+(&!).&* K'$* $ .3+ Shell '&" 2!'&+ ก
56
jcก ก 2d3ก.c^ LiveCD $)`( LiveCD '& ก ,Aก !#'(&'& ก
*,Aก N('-% ก ,Aก'&"('2! L $!('&ก * +,กก %&#ก $2!'w" 2!'&"'$*#' BIOS - #-.' 'Aก p*2i!-3(' ก %& +3ก Set "( BIOS (BIOS '&" 2!'&"'$*#' $(+$2'ก !&+,กก 3& N!#-",ก N#'(& BIOS !+' phoenix) *2!'+ BIOS '('$,-ก CD N" 2!'&-)-&+ก Del (Delete) + 2' F1 -ก)a*$*),#)( A( (')3#("#
กA$ + K#) $2!'ก Del (Delete) + 2' F1 - ก +-'&
-1 ).&+(&'&ก Set BIOS $2!').&+(&'&ก Set BIOS -.&ก+K#($)/ $ +,2!'! $ Boot N%A$,ก0
& ! "-2 57
-2 ).&$ก Set BIOS .&ก!+(&'&ก Set BIOS -+K#($ก 'd A$"3.!&!%ก Set BIOS & ! "-3
-3 ).&ก 'd A$"3.!&!%ก Set Bios -ก 'd & y
'"#$%(#+,2' ''ก-กก 3& ,2'ก ก
,2'ก$ ,!3)+(& Nก + -,2!' + 2' ก - -,2!',& ก ก,&$2!''$ ก &"( ก &"( ) !" 2!'&ก3++$ ก'$, ),''ก-กก 3&
$2!',2!'
! $ Boot - ก +(& & ! "-4
58
-4 ).&+(&'&$ Boot -ก+,2!' $! ก '& CD-ROM Drive *2!''&ก + " 2!'& Boot -ก CD-ROM ), กA$ Nก" 2!'&+$ + -ก )a*$**2!'+ ก '& CD-ROM Drive ,2!'
-5 ).&+(&'&$ Boot 59
$2!',2'ก!-+" 2!'& Boot -ก CD-ROM Drive ,3 ) ก),# กA$ *2!'3ก ก),''ก-กก Setup BIOS +ก++ ก 2'ก +กA$ y -ก)a*$* -ก+" 2!'&-3ก Boot 'ก" & $.()`( CD
ก ,Aก !&! $)`( *$,Aก !& *,Aก
-6 ).&+ก Boot -ก)`( *$,Aก
-7 ).&+(&'&$ Boot
60
$2!'" 2!'& Boot -ก)`( ก *$,Aก '),# - ก + XWindows '& ก *$,Aก &
-8 ).&+ X-Windows '& ก *$,Aก
61
jcก ก 2d3กyก |"( vก%d Flash Drive $ Flash Drive '& ก ,Aก !#'(&'& ก
,Aก, N('-% ก ,Aก'&"('2! L $!('&ก * +,กก %&#ก $2!'w" 2!'&"'$*#' BIOS - #-.' 'Aก p*2i!-3(' ก %& +3ก Set "( BIOS (BIOS '&" 2!'&"'$*#' $(+$2'ก !&+,กก 3& N!#-",ก N#'(& BIOS !+' Award) *2!'+ BIOS '('$,-ก Flash Drive N" 2!'&-)-&+ก Del (Delete) + 2' F1 -ก)a*$*),#)( A( (')3#("#
กA$+ K#) $2!'ก Del (Delete) + 2' F1 - ก +-'&
-1 ).&+(&'&ก Set BIOS $2!').&+(&'&ก Set BIOS -.&ก+K#($)/ $+,2!'! $ Advanced BIOS Features N%A$,ก0
& ! &-2 62
-2 ).&ก ,2!',ก0 ! ก Advanced BIOS Features $2!',2!',ก0 & ก Advanced BIOS Features ),#+กA$ Enter !&- ก +(&'& ก Advanced BIOS Features
-3 ).&+(&'& Advanced BIOS Features
63
-ก+,2!',ก0 ! ก Hard Disk Boot Priority ),#กA$ Enter &
-4 ).&ก ,2!',ก0 ! ก Hard Disk Boot Priority $2!'กA$ Enter - ก +(&'& Hard Disk Boot Priority $ &
-5 ).&+(&'& Hard Disk Boot Priority 64
$2!'.(+(&'& Hard Disk Boot Priority +,2!',ก0 ! ก USB-HDDO : KingstonDataTraveler I -ก+กA$" 2!'&+$ #ก (+) !)a*$* *2!',2!' ก USBHDDO : KingstonDataTraveler I $,3 ) ก
-6 ).&ก ,2!'! ก USB-HDDO : KingstonDataTraveler I $2!',2'ก+ Boot -ก Flash Drive ,3 ) ก$!'&ก ),# +กA$ F10 ! )a*$*),# กA$ Exit *2!'''ก-กก %& -ก" 2!'&-3ก Boot 'ก" & N- '&.( Flash Drive !$ ก ,Aก## N" 2!'&-3ก Boot -ก Flash Drive ! $ Flash Drive '& ก ,Aก,
-7 ).&ก Boot -ก Flash Drive '& ก ,Aก, 65
$2!'" 2!'& Boot -ก Flash Drive '& ก ,Aก, '),# - ก + X-Windows '& ก ,Aก, &
-8 ).&+ X-Windows '& ก ,Aก,
66