linux 개요 , 명령어와 디렉토리

Click here to load reader

Upload: jaafar

Post on 07-Jan-2016

73 views

Category:

Documents


0 download

DESCRIPTION

Linux 개요 , 명령어와 디렉토리. Suckzoo. Linux. 다중 사용자 , 멀티 태스킹 , 다중 스레드를 지원하는 네트워크 운영 체제 (NOS ) 자유 소프트웨어와 오픈 소스 개발의 가장 유명한 표본. Linux 의 특징. 멀티유저 시스템을 지원 가볍고 안정적 서버로서 많이 선택 받는다 . 무료 , 소스코드가 공개되어 있음. 배포되는 Linux. Fedora, Ubuntu, CentOS , BSD, Debian 등 다양한 OS 가 무료로 배포되고 있다 . - PowerPoint PPT Presentation

TRANSCRIPT

PowerPoint

Linux , Suckzoo , , (NOS) Linux

.

,

Linux Fedora, Ubuntu, CentOS, BSD, Debian OS .

CentOS, debian, fedora, bsd, ubuntu . (chicken?) Linux .

.

.Linux - Linux KernelShell :

OS . OS

0 1 .

Linux Linux Shell

/bin /sbin /boot /tmp/dev /usr /etc /var/home /lib /media /proc /opt /root /home .

/root .

/home, /root/bin (ex : cat, chmod, ls)

/sbin /bin, /sbin/boot , .

/dev , /boot, /dev/etc , , static file .static file : ./lib root . : /etc, /lib/media (ex : usb memory) mount

/proc , , ./proc/meminfo /proc/stat /proc/uptime /proc/version (PID) .PID /proc , ./media, /proc/opt .bit scala

/tmp linux .

/opt, /tmp

/usr ./usr/src : /usr/share : /usr/local :

/bin, /usr/bin, /usr/local/bin /bin ,/usr/bin Xwindow ,/usr/local/bin ./usr /var/lib /var/log /var/run . ./var/tmp/tmp . ./var passwdShell chshmanPath pwdcdls cp, rm, mvmkdir, rmdirtar

cat, more, less, wcgreptouch, viCommandschmod, chown, chgrpsu, sudosignalps, killjobs, bg, fgbackground process(&)

halt, reboot, shutdowninit ssh, scppipe(|)Commands .

passwd passwd (password) shell . shell /bin/bash shell

echo $SHELL : shell chsh (change shell)

: man [command]

man lsls .

man (manual) .

: /home/suckzoo pwd (print working directory)

.

: cd [target]cd (change directory)

option-l(long), group, owner -a(all) -R(recursive) .-d(directory) .ls d public_html vs ls public_html

ls (list) . : cp [option] [source] [target]

option-r(recursive) : .cp (copy) (+). : mv [option] [source] [target]

option-r(recursive) : .mv (move) . : rm [option] [source]

option-r(recursive) : .

.

rm (remove)

. : mkdir [option] [target]

option-p : mkdir p h/e/l/l/w/o/r/l/dcd hcd ecd lcd lmkdir (make directory) . rmdir [option] [target]

option -p : . , .rm r a vs rmdir p a

rmdir (remove directory) . : tar [cvxzf] filename file1 file2

option-c(create) : -v(verbose) : -x(extract) : -z(gzip) : gzip /-f(file) : tar

alzip.tar a.a, b.b, c.c, d.d tar cvf alzip.tar a.a b.b c.c d.d (tar.gz)alzip.tar.gz a.a b.b c.c d.d tar cvzf alzip.tar.gz a.a b.b c.c d.dtar.gz gunzip alzip.tar.gz -> tar xvf alzip.tar ! tar xvzf alzip.tar.gz

tar , .cat [filename] cat [a] [b] > [c]a b c .cat n [filename] .cat(concatenate) .

q .

moremore : less [filename]less .

/[keyword] : [keyword] n , N .

:[line] : [line]

. v q . http://linuxaria.com/howto/bash-linux-less?lang=en

less , , .

wc [filename]wc(word count) (regular expression) grep [option] [keyword] [file]

option-i : -w : -w apple pineapple .grep (global/regular expression/print)Regular Expression

. : touch [option] [file/time]

option-r [file1] [file2]file2 file1 .-t [time] [file]file time .touch.

.

vi http://vim-adventures.com/vi . // 8 .

ls l

rwxrwxrwx 8 ex) catAndDog.c-rw-rr-- : (4+2)(4)(4) -> 644ex2) catAndDog-rwxrwxr-x : (4+2+1)(4+2+1)(4+1) ->775

8

others : /tmp 1 sticky bit

SetUID .8 4

SetGID .8 2

SetUID, SetGID

chmod . : chmod [permission] [file]permission 8 , +, -, r, w, x u : user, g : group, o : others, a : allex : chmod ug+wx a, a /

chmodchown . : chown [owner] [file] .chgrp . : chgrp [group] [file]

chown, chgrp . : su [username]username root .password .su (subsitute user)/etc/sudoers . .sudo [option] [process]option-u [username] : username -u root .

sudo(substitute user do)

Signal

jobs .

ps . : ps [option]option-u : CPU, memory -a : -U [user] : [user] jobs, ps ... : kill [option] [pid]

option-[signal] : PID [pid] [signal] -l [signal] : [signal]

killfg [process][process] foreground .foreground bg [process] background .background [process] & & background .bg(background), fg(foreground), &halt reboot .

-f halt, reboot or : shutdown [option]option-h [time] : time [time] 10 -> 1015:10 -> 15 10 (hh:mm)now -> -r [time] : time -c : shutdown shutdownRun-level 7 .0 : (halt)1 : ( )3 : ( )5 : (Xwindows )6 : 2,4 /etc/inittab . : init [runlevel] .init .

: ssh [user@computer]

[user@] ssh (Secure Shell)

scp [file] [user@computer:directory] user@ .scp (Secure Copy)*?*0 .ex : suck*suck, suckz, suckzo, suckzoo, suckza ? 1 ex : ?parcsoparcs, pparcs, qparcs, rparcs, sparcs, tparcs, Wildcard output input .standard i/o.

exps aux vs ps aux |moreps aux | grep bashyes y ?(y/n) yes | [command]Pipe Standard In/outstdin : stdout : stderr : ()>[a], 2>[b] [a], [b] .ex : ls /tmp /tmpp > output.txtex : ls /tmp /tmpp 2> output.txtex : ls /tmp /tmpp > /dev/nullex : ls /tmp /tmpp 2> /dev/null>>, 2>>>, 2> .Redirection &>[file]>&[file]>[file] 2>&1

< [a] [a] .mail mother < give me $1 +R keyword .HistorySPARCS 11 cling Wikipedia

Reference