Upload
panupun-toboua
View
537
Download
0
Embed Size (px)
Citation preview
2550
����ก�� ������ Introduction to Unix
���
��� �������������������
Open Source Software Network
� �� �
���������ก� ���������������� ������������� ��� ��ก����� �����ก !ก"# $��%�&�'���(�)��*�'�
!ก"#�#��#����ก�'��ก��ก#��)��#������+���ก#���ก� ���������
������#,���������������� $�����-� 6 �& ���ก��/��� ��������#���-��#,����ก� 0������#�
,��12� �������+���ก#���ก� �3#��'�&�'����� �&4ก#��,�#�!�����$25�,���� (Permission) Shell
��������� $��ก������������ก� vi ��������� �!'�1/�������$�������������#���3#��6&�'�ก�'��,������
�������� $����-����0�)� �#ก&�'��/ ����!�7#�%��ก,���������������� (���-�����&�')�������,�#�!�
�����+���ก#���ก� &������,!�����ก���7#*$�/����,��%��)� ��ก�8�&�'%��)��/����,�#�)�����'��$��,�#���ก�
%�#�����'���ก,�#� (Client) &�'��-�1�0����2� ��0/� �#�#�� !ก"#�4�ก#��,�#�!�����'��$��,�#� (Server)
/���0��$ก�� WinSCP %�ก&�'(�)ก ก �*+����ก� PuTTY %�ก&�'(�)ก / 01�2�3�&�'(�)ก '
��4��3)�56��)789ก���3��'6� BIOS �=�>��?�������5?�7ก@A%�ก LiveCD 06)�&�'(�)ก � ��4�)789ก���3��'6� BIOS
D9>�6����7Eก3��=�>�������5?�7ก@A%�ก Flash Drive �56��H�กI�� ก�� 9�'��>��� 6/6�5 (Server) 5?�7ก@AH)�������
%+D1��2�0� ��J�����+�5��A%�ก@�K�A�)�A���=�@��A0HE� �กก)6�
������-����#��'���#���������������������0�)� $ก�&�ก&�#� �#ก��,������$��$��,��%/*�#/
���ก#��/ �8�%�(�/&3#��/��������(�ก,��*����8�'�
�����,�#���2� $�� 0��*���� �
ก�ก:#�� 2550
����!" �##$% 1 ��+)3�7')� ��4� �/��5?�7ก@A
- ��+)3�7')� ��4� �/��5?�7ก@A............................................................................................. 1
- /��E9/���+���N7�3�7ก��5?�7ก@A............................................................................................ 1
�##$% 2 �'��0����/��HK*A���+���O7�3�7ก��5?�7ก@A
- �'��0����HE��'D��9/���+���O7�3�7ก��5?�7ก@A�E5D3>)H�................................................. 2
�##$% 3 '1�03>�D9>')��?�%3ก
- ก�� Login �*+ Logout....................................................................................................... 5
- '1�03>���ก��%3Eก��HK*A........................................................................................................ 6
- '1�03>���ก��%3Eก��HE��กD��9>.............................................................................................. 13
- '1�03>���ก��%3Eก���ก9>5)ก3�(?����............................................................................................ 17
- '1�03>���ก��%3Eก���7E�6�0�>�0��........................................................................................... 20
- '1�03>���ก��'��2�HK*A �*+�+���3กW�')� �*�E&35........................................................ 21
- '1�03>�=���X����>� Y................................................................................................................. 24
�##$% 4 07D87ก���/��J[�/���+���K\ /�� ?*
- 07D87ก���/��J[�/���+���K\ /�� ?*..................................................................................... 26
�##$% 5 Shell ���������
- �'��0����=���X��ก��D1����/���+���O7�3�7ก��5?�7ก@A..................................................... 29
- ��+�&D/����**AD9>�75 ������^%%_�3�.................................................................................. 30
- ก����*9>5�D7`D��/��/�� ?*�/���*+(**3=8AD9>HE�%�กก���3�Shell Script............................. 34
����!" (���) �##$% 6 ก������������ก� vi ���������
- 2���%�����ก� vi........................................................................................................... 36
- ��7> ���ก������������ก� vi........................................................................................... 37
- '1�03>���ก���*�>���'��@��A�*+2���%�/c+�5?6���2 E'1�03>�........................................... 37
- '1�03>���ก���/��0?6�2 E=7 =A/��')� ................................................................................ 39
- '1�03>�=7 =A/��')� D3�2�����*9>5��D�/��')� (Replace)............................................... 40
- ก��5ก�*7ก'1�03>� (Undo)..................................................................................................... 40
- ก��*��3)�3กW�............................ ..................................................................................... 40
- ก��*��3)���D3E............................................................................................................... 40
- ก��*�/��')� .................................................................................................................. 41
- ก��'3E*�ก�*+)��............................................................................................................ 41
- ก��'��2�'1�....................................................................................................................... 41
- ก���3�D[ก/�� ?**�HK*A..................................................................................................... 42
,��-��ก ก ก���������ก� ��+5_ก�A�=�>�ก��J6�5����K\ /�� ?*.................................................. 43
,��-��ก � ก���������ก� ��+5_ก�A�=�>�ก���/�������� Text Shell............................................... 53
,��-��ก � ก��������%�ก�(6� LiveCD........................................................................................ 57
,��-��ก � ก��������%�ก�_�ก�cA01�2�3��3�D[ก/�� ?*��7E Flash Drive......................................62
���� 1
���� 1
�� ���������������������ก��
���� 1970 ���� �����ก�����ก������ก������ �������� !��"#�$���$$�ก $ ก��%�&��ก��'�(�&)*(+,�� �$(#(�-�����./��0�ก1� +2'./��� !�3�&��
���� 1973 ����� ������ก������$��+$( ��#�5�1�� �3��+�.��#ก�('ก��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'�*��'�.
���� 2
���� 2
!���"�������#$%���� ���������ก������ก��
!���"����#������������ ���������ก������ก��!�����#�
��%(#&ก,�&�� "0.1993 $ ก�''ก)��N"&.��&),����"�' �'&����ก������)�� FSSTND
(File System Standard) �('$����$ ก�*�6��N"&.��&�+$(����)�� 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 �'&������"�' N����2�'+������ �-�ก,(�#/�&)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 5�����U,��'&N�)ก$ -��$($ "#�$�ก !�#��'&ก��)'���.�'&N�)ก$�� L ���&.��� ���� �����ก�$ N'��'��%�!�*��01� !� �ก#(� system call �#��+�N�)ก$� �ก�%� �*2!'�+�.�$�/-��ก�&��� !�ก !�#ก���U,����
���� 3
����� 2-1 N"&.��&���"�' �'&���� �����ก�����ก��)��$��i�� File system Hierarchy Standard (FHS)
N"&.��&�U,�� �����N"&.��&����U,��'& ����ก��),�, �Aก��N����!#�� ��!&��&"��&'�--�
$ $�ก+2'��'�ก#(�� � -�����'��(ก�� �̀���),������� �̀�-��ก� �%(� ��&�"2!'&)$(�(�� (Server) '�--�$ ก�)�(& home ''ก���� home1 ),� home2 �*2!'-��ก�ก�� �̀��%���)�(,����5��������
/ "2' �������"�' �ก�'&����ก�� ���"�' �('�),��U,�
/bin "2'N�)ก$� !�กK�� !`���%���'&ก�-��%�&�� /boot "2' �กK�)Ua$� !�ก !�#��'&ก�� LILO �%���ก�������
/etc "2' )Ua$�กK���'$�,���5� Configulation
/home "2' )Ua$� !�กK�No$���"�' �(�& L �'&`���%������
/lib "2' ",�&N�)ก$� !-3�����),�N$��,�'&�"'���,
/mnt "2' )Ua$� !�%��$��� (mount) �'&����U,�),�'A�กp�
/dev "2' )Ua$� !�%��กK��U,�'A�กp��(�& L
/proc "2'��,��' ���'&�"'���,),�N*��.�(�& L
/root "2' ���"�' No$�'&��
/sbin "2' )Ua$� !�%��กK�"3�.�!&��),����(�& L
/tmp "2' ���"�' %�!#"�#� !�Aก"�$ .��d�q'(���� ��
/usr "2' N�)ก$�(�& L �%(� X11 , netscape , pine �������
/var "2')Ua$� !�%��กK���'$�,� !��, !��)�,&����,'��#,�
���� 4
�('��-�����ก�'d����N"&.��&�'&���)Ua$��'$�, N���%�"3�.�!&)��.�!&&����#�"3�.�!& (Command Line) ��ก�.�d��N"&.��&���)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
���� 5
���� 3
�(�"����������
ก�� Login .% Logout
ก� Login ���������'�)ก� !-���'&�3�ก('�� !-������%�&������ �����ก�����ก����� N�� �̀�� !
-��%�&��-���'&�.( username ),� password ก('�ก������%��.$'
����� 3-1 ��).�&ก�����.�(���
1
2
3
4
���� 6
����)ก� !).�&����� ! 3-1 ).�&ก������%�&���'& �̀��%�%2!' narongsak ),������� ! 2 -�����ก��.(+�. (̀�� ��!&��'*�&�#�&"2' ��+���-'-��$($ ก�).�&��'"#�$��L �p�� !*�$*� ��&�����̀��%�"#-���'&���&�-*�$*�+�. (̀���+�/�ก��'& /��*�$*� �̀��ก�� 3 "��& N�)ก$-��w�N��'��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 -�).�&`,,�*d�)����K$��)�� (Long Format) -a -�).�&)Ua$��'$�,���&+$�
����� 3-1 +���-').�&ก��%�&��"3�.�!& ls za ),� ls zl
1 2
3
4
���� 7
-�ก��� ! 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-3 ).�&��,��' ���$2!'�%�"3�.�!& ls -l
-�ก��� ! 3-3 N��)�(,�"',�$5�$ "#�$+$����&� �
- %���),�.��d�q -��(&�'ก���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'���"�'
%���),�.��d�q
-3��#�,�&"�
�-���'&
ก,A($ #�� z �#,�
���� %2!'�U,�+2'���"�'
���� 8
�(�"��2�ก��3��ก��#$%� : �(�"�� cp
Syntax
cp [OPTION] [-T] SOURCE DEST
cp [OPTION] SOURCE... DIRECTORY
cp [OPTION] -t #��������SOURCE.
Example cp test.txt jane.txt
����"3�.�!&� !�%�.3�+��ก�"��,'ก�U,� ��)��ก��%�"3�.�!& cp %2!'�'&�U,������& ��$��#�
%2!'�'&�U,� (�+$() �,����&
����� 3-4 +���-').�&ก��%�&��"3�.�!& cp
-�ก��� ! 3.4 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& ls -�).�&�U,�),����"�' ���&+$������"�' �@--A�����&�3�)+�(&� ! 2 ���&� ���'&ก�"��,'ก�U,� test.txt ���� �U,� jane.txt .�$�/�3����N���%�"3�.�!& cp ��&�3�)+�(&� ! 3 ��!&�$2!'�%�"3�.�!& ls ' ก"��&-���ก �U,� jane.txt �*�!$����$�
1
2
3
4
���� 9
�(�"��2�ก��3��ก��#$%� : �(�"�� mv
Syntax
mv [OPTION]... [-T] SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv [OPTION]... -t#��������SOURCE...
Example mv test.txt welcome.txt
"3�.�!& mv (move) �%�.3�+��ก�����)Ua$��'$�,),����"�' #$/�&ก���, !��%2!'��#�
�3�&���%(��� �#ก��"3�.�!& rename���'.
����� 3-5 +���-').�&ก��%�&��"3�.�!& mv
-�ก��� ! 3-5 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& ls N��-�).�&�U,�),����"�' ���&+$������"�' �@--A�����&�3�)+�(&� ! 2 ���&� ���'&ก���, !��%2!'�U,� text.txt ���� welcome.txt .�$�/�3����N���%�"3�.�!& mv ��&�3�)+�(&� ! 3 ��!&�$2!'�%�"3�.�!& ls ' ก"��&-���ก #(� �U,� text.txt �$(��ก N��-�*�)�(�U,� welcome.txt
1 2
3
4
���� 10
�(�"��2�ก��3��ก��#$%� : �(�"�� rm
Syntax rm [OPTION] [FILE]
Example rm test.txt
"3�.�!& rm (romove) $ �#��%�.3�+��,��U,� ���&)���U,��� �#+2')��ก,A($�'&�U,���� N��
�%�"3�.�!&�* �&"��&�� �#
����� 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 ���/�ก,���),�#
1
2
3
4
���� 11
�(�"��2�ก��3��ก��#$%� : �(�"�� cat (concatenate)
Syntax cat [OPTION] [FILE]
Example cat HelloWorld.java
"3�.�!& cat (concatenate) $ +���� !�).�&`,����' ��5�����'&�U,���&-'5�*
����� 3-7 +���-').�&ก��%�&��"3�.�!& cat
-�ก��� ! 3-7 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& ls N��-�).�&�U,�),����"�' ���&+$���
���"�' �@--A�����&�3�)+�(&� ! 2 ���&� ���'&ก�����,��' ���'&�U,� HelloWorld.java .�$�/�3����N���%�"3�.�!& cat ��&�3�)+�(&� ! 3 ��!&��,��' ���'&�U,�-���ก ''ก��&+���-'
1
2
3
4
���� 12
�(�"��2�ก��3��ก��#$%� : �(�"�� cat (concatenate)
Syntax file [OPTION] [FILE]
Example file *
"3�.�!&file -��3�ก�).�&%����'&�U,�� !$ �� ���"�' ��!&"3�.�!& file -��3�ก�'(�� Content
),��'ก���5��'&)Ua$��'$�,����L ��)��ก��%�"3�.�!& file [option]... file
����� 3-8 +���-').�&ก��%�&��"3�.�!& file
-�ก��� ! 3-8 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& file * N�����-�).�&�U,����&+$���
���"�' �@--A���*�'$���&�'ก���5��'&�U,� ��&�3�)+�(&� ! ��!&��,��' ���'&�U,�-���ก ''ก��&+���-'
1
2
���� 13
�(�"��2�ก��3��ก��#��������
�(�"��2�ก��3��ก��#�������� : �(�"�� cd
Syntax cd [DIRECTORY]
Example 1 cd Programs �]� ����#�2�#�������� Programs
Example 2 cd .. �]� ก%��#��� #��������ก^������
Example 3 cd / �]� #��� #�������� root
"3�.�!& cd (Change Directory) ����"3�.�!&� !�%���ก���, !�����"�'
����� 3-9 +���-').�&ก��%�&��"3�.�!& cd
-�ก��� ! 3-9 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& ls N��-�).�&�U,�),����"�' ���&+$������"�' �@--A�����&�3�)+�(&� ! 2 ���&� ���'&ก��������"�' Programs .�$�/�3����N���%�"3�.�!& cd Programs ��&�3�)+�(&� ! 3 ��!&�$2!'�%�"3�.�!& ls ' ก"��&-���ก #(� �U,��(�&L� !'��(�����"�' Programs ),�/����'&ก�''ก-�ก���"�' .�$�/�3����N���%�"3�.�!& cd .. ��&�3�)+�(&� ! 4 ),� �$2!'��'&ก�''ก����&���"�' root .�$�/�3����N���%�"3�.�!& cd \ ��&�3�)+�(&� ! 5 ��!&�$2!'�%�"3�.�!& ls ' ก"��&-���ก �U,��(�&� !'��(�����"�' root
5
2
3
4
1
���� 14
�(�"��2�ก��3��ก��#�������� : �(�"�� pwd
Syntax pwd [OPTION]
Example pwd
����"3�.�!&� !�%�.3�+��).�&���"�' �@--A��� (���3��'&�� �#ก��ก�*�$*� cd �� DOS) $�
-�ก"3�#(� print work���"�'
����� 3-10 +���-').�&ก��%�&��"3�.�!& pwd
-�ก��� ! 3-10 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& ls N��-�).�&�U,�),����"�' ���&+$���
���"�' �@--A�����&�3�)+�(&� ! 2 ���&� ���'&ก�� !-����3�)+�(&�'&���"�' .�$�/�3����N���%�"3�.�!& pwd ���-�).�&� !'��(�'&���"�' �@--A���
1
2
3
���� 15
�(�"��2�ก��3��ก��#�������� : �(�"�� mkdir
Syntax mkdir [OPTION] [FILE]
Example mkdir unix
����"3�.�!&.3�+���%���ก�.��&���"�' (make���"�' ) �$2!'����'&ก����"�' �+$(
�+��%�"3�.�!& mkdir ��$��#�%2!'���"�' �+$( N�� option .(#��+M(� !���$�%�ก�� "2' -m -��3�ก�ก3�+�� Permissioin -p -��3�ก�.��& Parent���"�' �+���#�กp � !��&�$($ ก���A���"�'
����� 3-11 +���-').�&ก��%�&��"3�.�!& mkdir
-�ก��� ! 3-11 -�ก��#'�(�&� �����ก�.��&���"�' �+$( %2!' unix 5��������"�'
narongsakN���3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& ls N��-�).�&�U,�),����"�' ���&+$������"�' �@--A�����&�3�)+�(&� ! 2 ���&� ���'&ก�.��&���"�' unix .�$�/�3����N���%�"3�.�!& mkdir unix ��&�3�)+�(&� ! 3 ��!&�$2!'�%�"3�.�!& ls ' ก"��&-���ก #(� ���"�' unix ���/�ก.��&� ���'�),�#
1
2
3
4
���� 16
�(�"��2�ก��3��ก��#�������� : �(�"�� rmdir
Syntax rmdir [OPTION] [FILE]
Example 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���$�����'��('��� �
����� 3-12 +���-').�&ก��%�&��"3�.�!& rmdir
-�ก��� ! 3-11 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& cd B ����ก��������"�' B ��&�3�)+�(&� ! 2
���&� ���'&ก�,����"�' c .�$�/�3����N���%�"3�.�!& rmdir c ��&�3�)+�(&� ! 3 ��!&�$2!'�%�"3�.�!& ls ' ก"��&-���ก #(� ���"�' c ���/�ก,�� ���'�),�# ��!&-�ก��#'�(�&� �
2
1
3
���� 17
�(�"��2�ก��3��ก���ก���ก��c��2d�
�(�"��2�ก��3��ก���ก���ก��c��2d� : �(�"�� who
Syntax who [OPTION] [ FILE | ARG1 ARG2 ]
Example who
"3�.�!& who �%��*2!').�&#(�$ �"���&� ! login '��(�����
����� 3-13 +���-').�&ก��%�&��"3�.�!& who
-�ก��� ! 3-13 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& who ����ก�).�&%2!'�'& �̀�� ! Login '��(�����
��&�3�)+�(&� ! 2 -�ก��#'�(�&� � ).�&�+��+K�#(�$ user � !%2!' cs484243 ),� narongsak ก3�,�& Login '��(�����
2 1
���� 18
�(�"��2�ก��3��ก���ก���ก��c��2d� : �(�"�� whoami
Syntax whoami [OPTION]
Example whoami
"3�.�!& who am i �%��*2!').�&#(� �̀��%���!& login ����.�(������� login ��#�%2!''��
����� 3-14 +���-').�&ก��%�&��"3�.�!& who
-�ก��� ! 3-14 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& who am i ����ก�).�&%2!'�'& �̀��%� ��&
�3�)+�(&� ! 2 -�ก��#'�(�&� � ).�&�+��+K�#(� �̀��%� �%�%2!' narongsak ��ก� Login ����.�(���
2 1
���� 19
�(�"��2�ก��3��ก���ก���ก��c��2d� : �(�"�� passwd
Syntax passwd [OPTIONS] [LOGIN]
Example passwd
"3�.�!& passwd ����"3�.�!&� !�%���ก���, !�� password �$2!'���%�"3�.�!&� � ���-��3�ก�/�$
password ���$ก('� ),�#-�&/�$ password �+$( ),��+��2���� password ' ก"��&
����� 3-15 +���-').�&ก��%�&��"3�.�!& passwd
-�ก��� ! 3-15 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& passwd N�����-�/�$+�.�ก(�ก('� ��&
�3�)+�(&� ! 2 -�ก�������-��+��.(+�.�+$(' ก 2 "��& ��&�3�)+�(&� ! 3 +�.�+$(��'&�.(�+$2'�ก�����&.'&"��& -�&-�.�$�/��, !��+�.�+$(���
2
3
1
���� 20
�(�"��2�ก��3��ก��ก������^�"]�"��
�(�"��2�ก��3��ก������^�"]�"�� : �(�"�� mail
Syntax mail
Example 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
����� 3-16 +���-').�&ก��%�&��"3�.�!& mail
2
1
���� 21
-�ก��� ! 3-16 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& mail N�����-�).�&#(�$ �$,�ก !y���� !/�ก.(&$� .(&$��$2!'�+( �#,���(��� ��&�3�)+�(&� ! 2
�(�"��2�ก�������#$%� .% � ����กi������%��j��
�(�"��2�ก�������#$%� .% � ����กi������%��j��: �(�"�� which
Syntax which [OPTION] [--] PROG_NAME [...]
Example which mail
"3�.�!& which ����"3�.�!&� !�%�).�&� !'��(�'&�U,�
����� 3-17 +���-').�&ก��%�&��"3�.�!& mail
-�ก��� ! 3-17 �3�)+�(&� ! 1 �$2!'*�$*�"3�.�!& which mail N�����-�).�&� !'��(�'&�U,�
#(�'��(� !�� ��&�3�)+�(&� ! 2 -�ก��#'�(�&���-�).�&� !'��(�'&�U,� mail �+�����#(�'��(�����"�' �+�
1
2
���� 22
�(�"��2�ก�������#$%� .% � ����กi������%��j��: �(�"�� chmod
Syntax 1 chmod [OPTION]... MODE[,MODE]... FILE...
Syntax 2 chmod [OPTION]... OCTAL-MODE FILE...
Syntax 3 chmod [OPTION]... --reference=RFILE FILE...
Example chmod 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
���� 23
����� 3-18 +���-').�&ก��%�&��"3�.�!& chmod
-�ก��� ! 3-18 �$2!'����'&ก�� !-���, !��.��d�q�+�ก���U,�� !��'&ก� N���3�)+�(&� ! 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
1
2
3
4
���� 24
�(�"��p]q�r���]� s
�(�"��2�ก��3��ก��#$%� : �(�"�� man
Syntax man [COMMAND]
Example man who
"3�.�!& man ����"3�.�!&).�&��'"#�$ � !'d����ก��%�&���'&"3�.�!& ��,��' ���(�&L #$/�&
option � !"3�.�!&.�$�/�%������#�
����� 3-19 +���-').�&ก��%�&��"3�.�!& man
���� 25
-�ก��#'�(�&���&��� ).�&��,��' ���'&"3�.�!& clear ),��$2!'��'&ก�-�''ก �+�ก� q
�(�"��2�ก��3��ก��#$%� : �(�"�� exit
Syntax exit
Example exit
"3�.�!& exit ����"3�.�!&.3�+��''ก-�ก��� UNIX
����� 3-20 +���-').�&ก��%�&��"3�.�!& exit
�$2!'�%�"3�.�!&� �),�#+���-'-�#(�&��,(� -��%�"3�.�!&� �กK�('�$2!'�3�&��������.K-� ���'�),�#),��$($ &��� !-��3��('),�#
���� 26
���� 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
���� 27
�+�.�&�ก���'$�,-�กก,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 ����2�'+� '(����'$�,��� ����'$�,+2'��%2!'��� write ��, !��)�,& )ก�����2�'+���� .��&+2',����"�' ��� execute .�!& execute (��$#,`,"3�.�!&)��� ��, !�� "��+� .3����-�ก�U,������"�' ������� ������� 4-1 ).�&.��d��'&�U,�),����"�'
"(��'&.��d��U,�+��!&$ "(����� - rwx r-x r-- TYPE USER (u) GROUP (g) OTHER (o)
- r w x r - x r - - 4 2 1 4 0 1 4 0 0
������� 4-2 ).�&.��d��'&�U,�),����"�' )��).�&���' ���'& - rwx r-x r--
���� 28
.��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 '(����� /��"��������#�,�-����"(���#�,��'&.��d�N���+��3�"(���#�,�$�#$ก��-�������� 754
��#'�(�&��)���'&.��d� - r w x - - - - - - 700 +$��/�& �U,�� ! �-���'&'(�� �� �� ��$#,`,��� d r w - r - - r - x 645 +$��/�& ���"�' � !�-���'&'(���� ����� ก,A($�� �#ก��'(�����
ก,A($'2!�'(��),���$#,`,��� - r - - r - - r - - 444 +$��/�& �U,�� !�Aกก,A($'(�����'�(�&�� �#
���� 29
Application Shell Kernel
Hardware
���� 5
Shell ��]q�����
!���"����p]q�r��ก���(�������� ������ก��
N"&.��&*2��i��ก��3�&���'&�������ก��$ '��( 4 .(#���#�ก�� "2' o���)#� (Hardware), �"'���, (Kernel), �%,,� (Shell) ),�)'**,��"%�� (Application) ��&��� ! 5-1
����� 5-1 ).�&N"&.��&*2��i��ก��3�&���'&�������ก�� �%,,� (Shell) "2' N�)ก$+��!&���������ก��� !�3�+���� !����.(#�����(' �̀��%� (interface)
�+#(�& �̀��%�ก������ �����ก�����ก�� (�"'���,) ��!&�%,,��$(�������.(#�+��!&�'&�"'���, )�(�%��"'���,��ก���$#,`, �̀��%�.�$�/.�!&&������ �����ก����N�� (̀����&�%,,���(����� N�)ก$�%,,���&$ "Ap.$�����'& Shell Programming Language �3��+� �̀��%�.�$�/�3�"3�.�!&�(�&L�'&�%,,�$��� ������N�)ก$�กK������U,��#���� � �ก#(� Shell Script
���� 30
�� �j�����d%%�������2d�2��x33y���
• Bourne shell (/bin/sh) �����%,,����A")กL � !$ �%�ก��'�(�&)*(+,�� $ ก�ก3�+��N"&.��&5�1�",���L ก��5�1�'�,ก' (Algo Language) .�$�/�� ������ shell script ��� ),���&���� �%,,�$���i��� !$ ������ �����ก�����ก���Aก��# ),���&.�$�/���� shell script ����&����ก�����'2!�N���$(��'&)ก���'�����' ก��#� -�$ default prompt �����"2!'&+$�� � $ �
• C shell (/bin/csh) �����%,,�� !*�6������$�+,�&-�ก Bourne shell $ ��)��"3�.�!&),��#��กp��+$2'�ก��5�1�� (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 ��� ),���&����*�!$��.��d�5�*��ก��3�&��' ก+,��'�(�& bash shell � ��$(�%( standard UNIX shell )�(���� default shell �'& linux ���@--A��� -�$ default prompt �����"2!'&+$�� � $ �
ก��."���� �j�����d%%���q����2�� �������������y|
�̀��%�.�$�/�#-.'������5��'&�%,,����&+$�� !���� �����ก�$ ���N���%�"3�.�!& $ cat /etc/shells
ก��."���� �j�����d%%���ก(�%��2d����^2��| ��q�
�̀��%�.�$�/�#-.'������5��'&�%,,�� !ก3�,�&�%�&��'��(���p����� ���N���%�"3�.�!& $ echo $SHELL
���� 31
�(�#�3v���������� Shell Script
�+�A`,� !��'&�� �� Shell Script ���� �ก��),�#-�����'��(ก�� �̀��%�&��)�(,�"� )�(N��.(#�$�ก),�#����-�$ �+�A`,��ก��� ����&� �
- Shell script .�$�/����'$�,���� (Input) -�ก �̀��%� �U,� ),�).�&`,,�*d�''ก��&+���-'����+$2'�ก��ก��%�"3�.�!& (Command) N���&
- $ ��N�%��'�(�&$�ก��ก�.��&"3�.�!&� !����.(#��A"", - ,��#,���ก�" ��"3�.�!& - .�$�/�3��+�&����&'�(�&����'��N�$������ - ����.(#�+��!&�'&&��� !����'��N�$����'& �̀���),��� -
��q����2�ก������� 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
Example 1
clear echo "Hello $USER" echo "Today is \c ";date echo "Number of user login : \c" ; who | wc -l echo "Calendar" cal exit 0
���� 32
c%%�pt�
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 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
����� ! 1 ����ก��", ��+���-').�&`, ����� ! 2 ����ก�).�&��'"#�$��ก��� �̀��%�&�� N����#)� $USER -�������#)�� !�%��กK�
%2!' �̀��%��#� ����� ! 3 ����ก�).�&#��� !),��#,��@--A��� ����� ! 4 ����ก�).�&-3��#� �̀��%�&������� p �#,����� L ����� ! 5-6 ����ก�).�&� �����'&��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!"
���� 33
c%%�pt�
Your Name please: *�$*���'$�, Hello ��'$�,� !*�$*��%����, Lets be friend!
����� ! 1 ����ก�).�&��'"#�$�*2!'�+�`���%�ก'ก%2!'�'&�� ����� ! 2 ����ก�����'$�,����-�ก �̀��%� (̀����&" ���'�� ),�#�กK��#�����#)�%2!'#(� name ����� ! 3 ����ก�).�&"(�� !'��(����#)� name ������ก�
ก�ก3�+��"(��+�ก����#)����� .�$�/�%�%2!'��#)���ก��3�����ก�����,� )�(��.(#��'&ก�).�&"(�-�ก��#)�����-���'&�.(�"2!'&+$�� $ �3�+�����#)����� L ��#�
�����̂���� 3 ��� Shell Script
Example
#!/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"
c%%�pt�
`,,�*d�+,�&ก�����#� ./script A B Total number of command line argument are 2 script is script name A is first argument B is second argument
���� 34
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
c%%�pt�
`,,�*d�� !���-�กก���N�)ก$ -�/�ก�� ��,&�U,�� !%2!'#(� output_file N���U,���&ก,(�#�����$(#(�-�$ ��'$�,���$'��(+2'�$(กK��$ -�/�ก�� �������#�`,,�*d�-�กก���N�)ก$���&+$�
2. ก����%�����}���.�� >>
����ก���, !����0��&��ก�).�&`,-�ก+���-',&�U,� N��$ ��)���'&ก��%�&�� ��&� � Example ./program >> output_file
c%%�pt�
`,,�*d�� !���-�กก���N�)ก$ -�/�ก�� ��,&�U,�� !%2!'#(� output_file N��-�����ก��� ���('�U,� ก,(�#"2'��'$�,���$���U,� output_file ��&"&'��(),�$ `,-�กก���N�)ก$�('������'$�,����
3. ก����%�����}���.�� <
����ก���, !����0��&������'$�,����-�ก�U,�)��ก�����#�" ���'�� N��$ ��)���'&ก��%�&�� ��&� � Example ./program < input_file
���� 35
4. ก���(����c%%�pt����!��.ก����v�#����������%����"(�����!��.ก����"������ |
��.�$�/�3��'�`,,�*d�� !���-�กก���N�)ก$� ! 1 ��������'$�,����.3�+��N�)ก$� ! 2 ���N��$ ��)���'&ก��%�&�� ��&� � Example ./program1 | ./program2
c%%�pt�
`,,�*d�� !���-�กก���N�)ก$ -�/�ก�� ��,&�U,�� !%2!'#(� output_file N��-�����ก��� ���('�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
�(��t���� -�ก"3�.�!&���&�������ก���N�)ก$N������'$�,����-�ก�U,� input_file ),������ก`,-�กก���N�)ก$,&���U,� output_file
���� 36
���� 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)
���� 37
)�(,�N+$��'&N�)ก$-�$ ��)��ก��3�&��),�+���� !�y*��� !)�ก�(�&ก�� ���)ก( 1. !����(�"�� ����N+$�� !�%���ก�.�!&�+�N�)ก$�3�&���(�& L ��ก'���#�
• "3�.�!&��ก��,2!'��"'��'�),�+���-'
• "3�.�!&��ก�����.�(N+$�*�$*���'"#�$
• "3�.�!&��ก�,���#'�ก1
• "3�.�!&��ก�,�����
• "3�.�!&��ก�)��� !��#'�ก1
• "3�.�!&��ก��*�!$�����+$(
• "3�.�!&��ก��ก�,�กก�ก��3�,(�.A� �������
2. !���p��p�������� ����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
���� 38
�,2!'��"'��'�����&�#� 1 ��#'�ก1 l
�,2!'��"'��'�����&���� 1 ��#'�ก1 h
�,2!'��"'��'�����&�#� 1 "3� w
�,2!'��"'��'�����&���� 1 "3� b
�,2!'��"'��'������� 1 ���� k
�,2!'��"'��'�,&,(�& 1 ���� j
�,2!'��"'��'���������� 0 (}����)
�,2!'��"'��'����������� $
�,2!'��"'��'�����&�#� 1 ��N�" )
�,2!'��"'��'�����&���� 1 ��N�" (
�,2!'��"'��'����('+���/���� }
�,2!'��"'��'����('+���ก('� {
�,2!'��"'��'�����&$A$�������'&-' H
�,2!'��"'��'�����&����� !'��(ก�!&ก,�&-' M
�,2!'��"'��'�����&����,(�&.A��'&-' L
�,2!'�+���-'����"�!&+���-' Ctrl-U (up)
�,2!'�+���-',&"�!&+���-' Ctrl-D (down)
�,2!'�+���-'����+��!&+���-' Ctrl-F (forward)
�,2!'�+���-',&+��!&+���-' Ctrl-B (backward)
�,2!'�������)ก.A� gg
�,2!'�����������.A� G
������� 5-1 ).�&"3�.�!&��ก��,2!'��"'��'�
ก��,2!'��"'��'�����&����� !��'&ก��3����N��ก�*�$*�+$���,�������$��#�"3�.�!&
G +2' gg �%(� 25G +2' 25gg +$��/�&ก��,2!'��"'��'�����&����� ! 25
���� 39
�(�"��2�ก������"�^!���p��p��������
�(�"��.��ก (Insert)
ก�)�ก� !+����3�)+�(&�"'��'� i ก�)�ก� !������� I
�$2!'�%�"3�.�!& i +2' I ),�# �̀��%�.�$�/�a'���'"#�$� !��'&ก�)�ก������� �$2!'�.K-.���ก�*�$*���'"#�$� !��'&ก�)�ก),�# �+�ก�)�a� Esc �*2!'ก,��.�(N+$�"3�.�!&
�(�"��p��p���������^� (Append)
ก�*�$*���'"#�$�('� !+,�&�3�)+�(&�"'��'� a ก�*�$*���'"#�$�('� !�������� A
�(�"��.��ก������2��^ (Open)
N���ก���$2!''��(��N+$�*�$*���'"#�$�$2!' �̀��%�*�$*���'"#�$-�ก���!&��K$����),�# +�ก�̀��%���'&ก����������+$(.�$�/�3����N��ก�ก�)�a� Enter '�(�&�กK��$+�ก$ ก�*�$*�
��'"#�$�#�),�# ),���'&ก�)�ก�����+$(,&�+#(�&��'"#�$���$�3����N���,2'ก�%�"3�.�!&��&� � )�ก�����+$(��������"'��'� o )�ก�����+$(�+�2'�����"'��'� O ก��%�"3�.�!& o ),� O ��N+$�"3�.�!&-��3��+� vi )�ก����#(�&�+�),�����.�(N+$�*�$*�
��'"#�$�,� �̀��%�.�$�/*�$*���'"#�$� !��'&ก�)�ก�������
���� 40
�(�"��p��p�������������]���%���.��������� (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 ����� !$ �"'��'�'��(
���� 41
ก��%��������
ก�,���'"#�$�%�"3�.�!& d "3�.�!&� �����"3�.�!&� !��'&$ ก�ก3�+���'����� !��'&ก�,���#� N���%�"3�.�!&�,2!'��"'��'�������#ก3�+���'���� �%(� d0 ,���'"#�$���&)�(�3�)+�(&�"'��'���/�&������� d$ ,���'"#�$���&)�(�3�)+�(&�"'��'���/�&�������� d} ,���'"#�$���&)�(�3�)+�(&�"'��'���/�&.����('+��� dG ,���'"#�$���&)�(�3�)+�(&�"'��'���/�&�����U,�
��'.�&�ก� "3�.�!&��+$#� d ����"3�.�!&� !$ '�����$�ก+�ก�%�N���$(�����-"#�$+$��N��,��' �� �'�+��$���#�&�+�$�ก�#,��%�&��
ก�����%�ก.% ���
yy "��,'ก��'"#�$����� !�3�)+�(&�"'��'�'��( p #�&��'"#�$� !"��,'ก�#� p ����/��-�ก�3�)+�(&�"'��'�'��( P #�&��'"#�$� !"��,'ก�#� p ����ก('��3�)+�(&�"'��'�'��( ก�"��,'ก���� .�$�/�%���#�,�`.$`.��ก��"3�.�!& yy �����#� �%(� 5yy +$��/�&����ก�"��,'ก 5 ����N�����-�ก����� !�"'��'�'��(
ก��������(�
ก�"��+�"3�+2'��'"#�$��N�)ก$ vi ����.�$�/�3����N��'��(��N+$�"3�.�!&),�#ก��"2!'&+$�� / �*2!'����ก��%�"3�.�!&��N+$�����,(�&.A� �%(� /string ����ก�"��+�"3�#(� �string� ���U,����� �$2!'*�"3���&ก,(�#),�# +�ก��'&ก�����&"3��('��� !'��(,(�&-�ก�3�)+�(&�@--A����+�ก� n ),�ก� N �*2!'ก,��������"��+���&�������&��
���� 42
ก������vก�����%%�#$%�
:w ก������ก��'$�,�@--A���,&�U,� :wq ก������ก��'$�,�@--A���,&�U,�),�''ก-�กN�)ก$ :q! ก�''ก-�กN�)ก$N���$(�����ก��'$�, +$���+�A ก��%��"2!'&+$�� : �3�+���"3�.�!&��������ก��%�"3�.�!&��N+$�����,(�&.A� ),�-��3�&�����กK�('�$2!''��(��N+$�"3�.�!&ก('� ��&����ก��%�&��"3�.�!&��&ก,(�#-�&"#ก� Esc ก('��Aก"��&
���� 43
j��c��ก ก
ก��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
���� 44
����� ก-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
���� 45
����� ก-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���������&� �
���� 46
�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,��'� ก�.��&���"�' �3����N��ก��%��$�.�",�ก���#p� !��'&ก�.��&���"�' �+$(
N��",�ก� !* ��� !�����#�$2'�$2!'��'&ก�.��&���"�' �+$(���"2!'& Remote Host +2' ",�ก� !*2��� !��������$2'�$2!'��'&ก�.��&NU,��'��+$(���"2!'& Local Host -�ก����",�ก�A�$
��&��� ! ก-4
���� 47
����� ก-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 �3����N��ก�
",�ก�$�.�"��&�#�� !%2!')Ua$��'$�,� !��'&ก�'�*N+,���+���-'�������� N����� !� �-��3�ก��,2'ก)Ua$%2!'#(� unix.doc -�ก����,�ก��#�&�#���&�@�& Remote Host ��&��� ! ก-6
���� 48
����� ก-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$��'$�,� !��'&ก�
���� 49
����� ก-8 ).�&`,,�*d�� !��ก -�กก�'�*N+,�)Ua$
6. ก���#��N+,� (Download) ก���#��N+,�)Ua$��'$�,-�ก�"2!'& Remote Host ����&�"2!'& Local host �3����N��
ก�",�ก�$�.�"��&�#�� !%2!')Ua$��'$�,� !��'&ก���#��N+,���+���-'�����#� N����� !� �-��3�ก��,2'ก)Ua$%2!'#(� unix.doc -�ก����,�ก��#�&�#���&�@�& Local host ��&��� ! ก-9
���� 50
����� ก-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$��'$�,� !��'&ก�
���� 51
7. ก���, !��%2!')Ua$��'$�,/���"�' ก���, !��%2!')Ua$/���"�' �3����N��ก�",�ก�$�.�� !%2!')Ua$��'$�,/���"�' � !
��'&ก���, !��%2!' ),�",�ก� !�A�$ -�ก����-���ก )/�. � !%2!')Ua$��'$�,/���"�' ���� -�ก����*�$*�%2!'�+$(� !��'&ก�,&�� ��� !� ��+��3�ก���, !��%2!')Ua$ BLS.doc ���� Burapha.doc ��&��� ! ก-11
����� ก-11 ).�&ก��,2'ก"3�.�!&��ก���, !��%2!')Ua$��'$�,
8. ก�,�)Ua$��'$�,),�ก�,����"�' ก�,�)Ua$��'$�, / ���"�' �3����N��ก�",�ก�,2'ก)Ua$��'$�,� !��'&ก�,� ),�ก�
�A�$
���� 52
9. ก���, !�����"�' �$2!'��'&ก���, !���3�)+�(&���"�' ��������&���"�' � !'��(�������!3�ก#(� �3����N��ก��������,",�ก� !%2!'���"�' ���� �$2!'��'&ก���, !���3�)+�(&���"�' ก,����������&���"�' � !'��(�+�2'ก#(�� !,����� �3����N��ก�� !�A�$ �$2!'��'&ก���, !���3�)+�(&����& Home���"�' �3����N��ก�� !�A�$
10. ก����ก��%2!'$�('ก���"2!'& Remote Host �3����N��ก�ก�� !�A�$
+�ก��'&ก������%�N�)ก$� !�%���ก�����('ก�� �̀��%���,�ก1p�� !���� Text Shell N��N�)ก$ Text Shell ����N�)ก$*2��i����ก��%�&����� .�$�/�%�N�)ก$ PuTTY ��!&ก,(�#�#���5�"`�#ก �
���� 53
j��c��ก �
ก��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 (N��N�)ก$-�ก3�+���+��#�'��(),�#) -�ก����",�ก� !�A�$ Open ��&��� ! �-2
���� 54
����� �-2 ).�&+���-'ก������%�N�)ก$ PuTTY �$2!'",�ก� !�A�$ Open ),�#-���ก +����(�&�'&N�)ก$ PuTTY
����� �-3 ).�&+����(�&�'&N�)ก$ PuTTY �$2!'��ก +����(�&�'&N�)ก$ PuTTY �+�ก'ก+�. �̀��%� (Username) ��#'�(�&�%(� narongsak ��&��� ! �-4
���� 55
����� �-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
���� 56
����� �-5 ).�&+����(�&� !).�&*K'$*� $ .3�+�� Shell �'&�"2!'&�+���ก�
���� 57
j��c��ก �
ก��2d����3�ก.c^� LiveCD
�� �$) (̀� LiveCD �'&���� �����ก�, �Aก�� ��� !� �������#'�(�&�'&���� �����ก� ��*�, �Aก�� N���(��'�-�%����� �����ก�, �Aก���'&"(��'2!� L �����$� !�(����'&ก� �*��+,�กก��%�&���� �#ก�� �$2!'��w��"2!'&"'$*�#��'� BIOS -��#-.'�'A�กp�*2��i��� !-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
���� 58
����� �-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
���� 59
����� �-4 ).�&+����(�&�'&�$�� Boot -�ก�����+��,2!'� $�� !��ก��'& CD-ROM Drive �*2!'��'&ก��+��"2!'& Boot -�ก CD-ROM ),� ก��A�$ N��ก��"2!'&+$�� + -�ก)�a�*�$*��*2!'�+���ก��'& CD-ROM Drive �,2!'�����
����� �-5 ).�&+����(�&�'&�$�� Boot
���� 60
�$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
���� 61
�$2!'�"2!'& Boot -�ก) (̀����� �����ก���*�$���, �Aก��� ���'�),�# -���ก +��� X-Windows �'&���� �����ก���*�$���, �Aก�� ��&��
����� �-8 ).�&+��� X-Windows �'&���� �����ก���*�$���, �Aก��
���� 62
j��c��ก �
ก��2d����3�ก�y�ก�|�"(���������vก�����%d��� Flash Drive
�� �$ Flash Drive �'&���� �����ก�, �Aก�� ��� !� �������#'�(�&�'&���� �����ก� , �Aก�����, N���(��'�-�%����� �����ก�, �Aก���'&"(��'2!� L �����$� !�(����'&ก� �*��+,�กก��%�&���� �#ก�� �$2!'��w��"2!'&"'$*�#��'� BIOS -��#-.'�'A�กp�*2��i��� !-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
���� 63
����� �-2 ).�&ก��,2!'�,�ก0��� !��ก� Advanced BIOS Features �$2!'�,2!'�,�ก0����&��ก� Advanced BIOS Features ),�#�+�ก��A�$ Enter ��!&-���ก�+����(�&�'&��ก� Advanced BIOS Features
����� �-3 ).�&+����(�&�'& Advanced BIOS Features
���� 64
-�ก�����+��,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
���� 65
�$2!'����.�(+����(�&�'& Hard Disk Boot Priority �+��,2!'�,�ก0��� !��ก� USB-HDDO : KingstonDataTraveler I -�ก�����+�ก��A�$�"2!'&+$���#ก (+) � !)�a�*�$*� �*2!'�,2!'���ก� USB-HDDO : 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ก�����,
���� 66
�$2!'�"2!'& Boot -�ก Flash Drive �'&���� �����ก�, �Aก�����,� ���'�),�# -���ก +��� X-Windows �'&���� �����ก�, �Aก�����, ��&��
����� �-8 ).�&+��� X-Windows �'&���� �����ก�, �Aก�����,