Professional Documents
Culture Documents
คู่มือประกอบการอบรม Ubuntu Administrator PDF
คู่มือประกอบการอบรม Ubuntu Administrator PDF
26 .. 2554
www.lanna-oss.org
2/37
50%
Server
Ubuntu Administrator
Ubuntu
Server
Text Mode
Server
(www.lanna-oss.org) 08-7185-0920
3/37
ubuntu
Ubuntu Server
6
10
command line
23
shell script
35
vi
(www.lanna-oss.org) 08-7185-0920
34
37
4/37
Mac
GUI Graphics User Interface
mouse
Unix
(Linus Benedict
Torvalds) Unix
(http://en.wikipedia.org/wiki/Linus_Torvalds)
Driver
Printer
(http://en.wikipedia.org/wiki/Richard_Stallman)
(www.lanna-oss.org) 08-7185-0920
5/37
(Mark Shuttleworth)
(Canonical)
I am what I am because of who we
all are.
(http://www.ubuntu.com/project/about-ubuntu)
Server
50% Server
Serve
6/37
Hardware
Hardware
Hardware Kernel
(Application)(Hardware)
Kernel
www.kernel.org
shell x-windows
Application
Application
(www.lanna-oss.org) 08-7185-0920
7/37
Unix
DOS
1.
(File Name) Case Sensitive
Mydata mydata
FAT32 NTFS
External drive
copy
copy
FAT32 NTFS
2. (Permission)
DOS
FAT32 NTFS
(Read only) (Hidden File)
(www.lanna-oss.org) 08-7185-0920
8/37
Unix
(Multi User)
(Owner)
(Group)
Other
read
write
execution (run program)
(www.lanna-oss.org) 08-7185-0920
9/37
ls -l
ls -l ternmal
ouychai@ouychai-desktop:~/C$ ls -l
total 44
-rw-r--r-- 1 ouychai ouychai 864 2009-12-13 10:29 myfirsttime.c
-rw-r--r-- 1 ouychai ouychai
0 2009-12-13 10:29 myfirsttime.c~
-rwxr-xr-x 1 ouychai ouychai 8260 2010-01-15 06:47 test2
-rw-r--r-- 1 ouychai ouychai
88 2010-01-15 06:46 test2.c
-rw-r--r-- 1 ouychai ouychai 209 2010-01-15 06:45 test2.c~
-rwxr-xr-x 1 ouychai ouychai 8260 2010-01-15 06:47 test3
-rw-r--r-- 1 ouychai ouychai
84 2010-01-15 06:47 test3.c
-rw-r--r-- 1 ouychai ouychai
84 2010-01-15 06:46 test3.c~
ouychai@ouychai-desktop:~/C$
ouychai ouychai
ouychai ouychai
permission
(permission)
drwxrwxrwx
d Directory Directory
r Read
w Write
x Execution
-
(www.lanna-oss.org) 08-7185-0920
10/37
Ubuntu Server
ubuntu Server BIOS boot CD
ROM boot
1
English
(www.lanna-oss.org) 08-7185-0920
11/37
2 Install
Ubuntu Server Enter
(www.lanna-oss.org) 08-7185-0920
12/37
Asia
Other
(www.lanna-oss.org) 08-7185-0920
13/37
5
Asia
(www.lanna-oss.org) 08-7185-0920
14/37
7
Keyboard Layout
No
8
USA
(www.lanna-oss.org) 08-7185-0920
15/37
9
keyboard USA
10
IP DHCP
(www.lanna-oss.org) 08-7185-0920
16/37
11
hostname
12
Domain name
(www.lanna-oss.org) 08-7185-0920
17/37
13
14
Yes
LVM
(www.lanna-oss.org) 08-7185-0920
18/37
15
Harddisk Continue
16
Yes
(www.lanna-oss.org) 08-7185-0920
19/37
17
login
18
(www.lanna-oss.org) 08-7185-0920
20/37
19
folder home
No
19
proxy
(www.lanna-oss.org) 08-7185-0920
21/37
20
automatically
21
Server package
(www.lanna-oss.org) 08-7185-0920
22/37
22
CD
Continue
(www.lanna-oss.org) 08-7185-0920
23/37
command line
command line Ubuntu Server
login command line command line
case sentsitive
command <paramter1> <parameter2> .....
ls
( dir DOS) list
ls [option] [file]
option
ls
-F / Directory * execute
ls l ls -al ls -F
adduser
User Unix,Linux
adduser -g (group) -d (Directory) (User)
User Unix,Linux
userdel [option] (Username)
(www.lanna-oss.org) 08-7185-0920
24/37
userdel -r root user1 User Login User1 -r Home Directory User1
passwd
User Unix,Linux
passwd [Username]
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
Unix,Linux
cal
(www.lanna-oss.org) 08-7185-0920
25/37
cal [Enter]( )
cal -y [Enter]( )
cat
cc /home/user1/industry.c Compile C
industry.c Directory /home/user1
cd
chfin
chfn [username]
chfn User1 User1
chgrp
(www.lanna-oss.org) 08-7185-0920
26/37
chmod [] (File)
test chmod 754 test chmod go +r-w test chmod o-r
*
2. 2 (1 )
User Group Other = ugo go-r-w+x Run
chown
Change Owner Unix,Linux ( )
chown [] ( File)
cal [Enter]( )
(www.lanna-oss.org) 08-7185-0920
27/37
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
ed /home/user/test ( q)
(www.lanna-oss.org) 08-7185-0920
28/37
pico vi emacs
emacs
emacs Unix,Linux ( Text file )
emacs (fileName)
exit Unix,Linux ( )
exit
exit
finger
finger Unix,Linux ( User Login Who )
finger [username]
fsck [option]
/sbin/fsck -a /dev/hd1
ftp
ftp Unix,Linux ( - )
ftp (IP or Name of FTP Server )
ftp 132.209.1.2 [Enter]
;bye -
(www.lanna-oss.org) 08-7185-0920
29/37
grep
grep Unix,Linux ( )
grep (option)
(www.lanna-oss.org) 08-7185-0920
30/37
#history 20 20
ifconfig
history Unix,Linux ( Network Lan Card)
ifconfig [option]
#ifconfig
ipchains
ps -A PID Process
Kill -9
login
(www.lanna-oss.org) 08-7185-0920
31/37
-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
=
h help
more test.txt
man
man Unix,Linux ( )
man (Command)
#man ls
q ;-b|-k|-m]
option free
(www.lanna-oss.org) 08-7185-0920
32/37
-b byte
-k kilobyte
-m megabyte
free free b free -k
pwd
/ pwd
uname
OS cpu
uname -a
hostname
hostname
tty
terminal
tty
id
id
http://forum.ubuntuclub.com/forum?topic=14294.15
(www.lanna-oss.org) 08-7185-0920
33/37
3
- apt-get
apt-get package
upgrade kernel
- compile
compile compile
tar -zxvf .tar.gz
cd
./configure
make
(www.lanna-oss.org) 08-7185-0920
34/37
VI
Editor edit DOS
CW , RW word processor editor help
vi
$vi myfile.txt
i
myfile.txt esc command mode
:w
vi
:q
vi
:q!
https://help.ubuntu.com/community/VimHowto
(www.lanna-oss.org) 08-7185-0920
35/37
shell script
command line command line
command line
shell script
DOS Bat File (.BAT)
shell script
#!/bin/sh
if [ $# = 0 ]
elif [ $1 = 'died' ]
then echo "I will destroy everything"
(www.lanna-oss.org) 08-7185-0920
36/37
elif [ $1 = 'leaving' ]
then echo "I will leaving."
shell script
shell script
(www.lanna-oss.org) 08-7185-0920
37/37
. Ubuntu. 1. :
, 2551
(www.lanna-oss.org) 08-7185-0920