_ Ownership: user/group/other (u/g/o)
_ Permission: read/write/execute (r/w/x)
FILE | FOLDER | |
R (4) | xem noi dung file: cat, more, less, head, tail, nano, vi... | xem noi dung thu muc: ls, dir |
W (2) | thay doi noi dung file: cat, nano, vi, echo... | thay doi noi dung thu muc |
X (1) | file thuc thi | truy cap vao thu muc: cd |
_ Ownership and permission: rwxr-xr-x : 755
_ Xem ownership and permission:
#ls -l /etc/passwd -> -rw-r--r-- 1 root root 1822 Apr 8 2008 /etc/passwd
644 so hardlink user group size date file
firstbit: file type: - : file, d: directory, l: symbolic link
_ Doi user so huu:
#cp /etc/passwd /root
#chown apache /root/passwd
user file
_ Doi group so huu:
#chgrp ftp /root/passwd
#chown .ftp /root/passwd
_ Doi user, group dong thoi:
#chown root.root /root/passwd
_ Change permission:
#chmod 664 /root/passwd
_ Important folders:
/bin | chua file thuc thi cua he thong |
/boot | chua cac file boot |
/dev | chua file thiet bi, driver |
/etc | chua file cau hinh |
/home | thu muc home cua user |
/lib | thu vien cua he thong |
/media, /mnt | vi tri mount cua cac thiet bi gan ngoai |
/opt | danh cho pm hang thu ba |
/proc | chua thongtin hethong |
/root | home directory cua user root |
/sbin | system binary, su dung trong mode restore |
/tmp | temp, he thong luu file tam vao day |
/usr | pm cai tu source code |
/var | luu tru data, cache, query, noi data thay doi lien tuc |
_ Cau truc he thong:
USER |
↓ |
SHELL |
↓ |
KERNEL |
↓ |
HARDWARE |
_ Xem ten SHELL:
$echo $SHELL (bien moi truong)
_ Xem tat ca bien moi truong:
$env ok $printenv
_ Tao bien moi truong:
$export CHAO="hello" (ten bien = gia tri)
_ Xoa bien moi truong:
$unset CHAO
0 nhận xét:
Đăng nhận xét