Linux基礎(chǔ)1
操作系統(tǒng)的功能:
命令解釋
進(jìn)程管理
內(nèi)存管理
輸入/輸出(I/O)操作和外圍設(shè)備管理
文件管理
Linux 關(guān)機(jī)方法:
shutdown –h now 關(guān)機(jī)(推薦)
shutdown –r now 重啟(推薦)
reboot 快速重啟(跳過sync過程)
init 0 關(guān)機(jī)
init 6 重啟
halt 系統(tǒng)停機(jī)
linux系統(tǒng)結(jié)構(gòu):
linux 目錄結(jié)構(gòu):
存放命令的目錄:/bin /sbin /usr/bin /usr/sbin /usr/local/bin
/boot 內(nèi)核及其他系統(tǒng)啟動所需文件
/opt 安裝大的應(yīng)用程序
/tmp 臨時文件
/lost+found 系統(tǒng)修復(fù)過程中恢復(fù)的文件
/root 超級用戶的主目錄
/dev - device設(shè)備目錄:
b block塊設(shè)備
c character字符設(shè)備
linux的硬件設(shè)備對應(yīng)文件
光驅(qū)設(shè)備:/dev/cdrom
軟驅(qū):/dev/fd0
/etc 配置文件所在目錄
啟動引導(dǎo)程序 /etc/lilo.conf /etc/grub.conf
控制啟動模式 /etc/inittab(圖形/文本登陸)
文件系統(tǒng)配置 /etc/fstab
/etc/profile 增加環(huán)境變量等(修改PATH等)(如配置JAVA/J2EE開發(fā)環(huán)境)
/etc/ftp* ftp配置文件
/etc/httpd web服務(wù)器的配置文件
/etc/ssh* ssh配置文件
/etc/inittab
停止系統(tǒng):init 0 halt poweroff shutdown
重啟系統(tǒng):init 6 reboot
文字界面啟動:init 3
圖形界面啟動:init 5
單用戶模式:init 1 init single
/home
用戶的默認(rèn)主目錄:/home/username
useradd username 創(chuàng)建新用戶
passwd username 添加密碼
/etc/passwd 系統(tǒng)能識別的用戶清單(指定用戶的shell)
/etc/shadow 超級用戶才能讀,用于保護(hù)加密口令的安全(隱藏口令)
/lib庫文件的目錄
/lib系統(tǒng)所用的庫(如C程序庫)
/lib/modules/2.4.20-8/kernel/drivers (驅(qū)動模塊)
/usr/lib/ 應(yīng)用程序使用的庫(如MySQL的API)
/mnt
光驅(qū)的裝載:
mount –t iso9660 /dev/cdrom /mnt/cdrom
mount –t 文件類型 設(shè)備文件 裝載目錄
卸載:umount /mnt/cdrom
軟驅(qū)的使用:mount –t fstype /dev/fd0 /mnt/floppy
/usr用戶目錄
/usr/doc /usr/share/doc 幫助文檔
man命令 查看命令的手冊頁
info命令 查看命令的幫助
命令 –help 簡單幫助
/usr/src/linux-2.4.20-8/ linux源代碼
/usr文件系統(tǒng)部分內(nèi)容:
X11 用于X Windows
bin 幾乎所有的命令程序
sbin 系統(tǒng)管理的命令
include C語言頭文件
lib 庫文件和數(shù)據(jù)文件
local 本地安裝的軟件
share 共享文件和數(shù)據(jù)
/var文件系統(tǒng)的部分內(nèi)容:
www apache的文檔目錄
lib 系統(tǒng)運行時隨時改變的文件
local /usr/local程序的可變數(shù)據(jù)
log 日志文件
spool 郵件、新聞等隊列的脫機(jī)目錄
tmp 臨時文件
了解所用硬盤的信息
mount 所掛裝的分區(qū)
fdisk –l [/dev/had] 硬盤分區(qū)狀況
df –h 硬盤分區(qū)的使用情況
du –sh 目錄占用空間
uname –a 所用linux版本號
posted on 2007-09-02 13:26 backup2007 閱讀(171) 評論(0) 編輯 收藏 所屬分類: Linux