操作系統(tǒng)
Linux是內(nèi)核婴程,不是操作系統(tǒng)晋辆,Windows 渠脉、OS、ubuntu···才是操作系統(tǒng)瓶佳。
Linux
Linux是由90%的C語言和10%的匯編語言組成连舍;
Linux核心概念:萬物皆目錄,基于文件系統(tǒng)涩哟;
/bin 二進制可執(zhí)行命令
/dev 設備特殊文件
/etc 系統(tǒng)管理和配置文件
/etc/rc.d 啟動配置文件和腳本
/home 用戶主目錄的幾點索赏,比如:user的主目錄就是/home/user,可以用 ~user表示
/lib 標準程序設計庫
/sbin 系統(tǒng)管理命令贴彼,僅存放系統(tǒng)管理員使用的管理程序
/tmp 公用的臨時文件存儲點
/root 系統(tǒng)管理員的主目錄
/mnt 掛載其他文件系統(tǒng)
/var 溢出區(qū)
/usr 最龐大目錄潜腻,包含幾乎用到的程序和文件
/usr/bin 應用程序
/usr/sbin 超級用戶程序
/usr/doc linux文檔
/usr/include linux下開發(fā)和編譯應用程序所需要的頭文件
/usr/lib 動態(tài)鏈接庫和軟件包的配置文件
/usr/man 幫助文檔
/usr/src 源代碼linux內(nèi)核源代碼
/usr/local/bin
/uar/local/lib
遺留問題:
$非超級用戶好像進不去root目錄,所以怎么成為超級用戶器仗?
怎么去查看/usr/src源碼融涣?
已解決,重點是ubuntu系統(tǒng)
Linux常用命令
命令可以組合使用
cd(change directory)
cd ./filename(當前目錄下filename)
cd ~(根目錄)
cd ..(上一層目錄)
ls(list)
ls -l(長數(shù)據(jù)串精钮,包含文件屬性權限)
ls -a(.隱藏文件)
ls -d(列出目錄)
mkdir (make directory)
grep(general rigorous excutable profile)
grep -i 'string' filename(不區(qū)分大小寫)
grep -c 'string' filename(計數(shù))
grep 'string' filename(找到)
ls -l | grep -i 'string'(管道威鹿,文件帶有'string')
cp(copy,a=1)
cp -a(archive,attributes 將文件特性一起復制,比如權限)
cp -p(文件屬性)
cp -i(interactive若存在轨香,則詢問)
cp -u(有差異時忽你,會復制)
mv(move)
mv -u(同上)
mv -f(force 強制)
rm(remove)
rm -f(force)
ps(process)
ps -A(all display)
ps -a(not terminal display)
file
file filename(文件基本數(shù)據(jù),linux不以后綴之分)
cat(catalogue)
cat filename | less/more
chmod
chmod -/+r/w/x filename
gcc(gnome c compiler)
gcc -g name.c -o name -l_libraryName(編譯文件)
time
tim ./processNmae(預計執(zhí)行時間)
make
makefile(找到它臂容,進行編譯=.o)
make -f makefileName(改名字)
touch filename
type (內(nèi)部or外部命令類型)
Q&A
How do i become a 'super user'? Ubuntu
執(zhí)行sudo su科雳,輸入現(xiàn)有賬號密碼
根目錄下文件
How i come out 'super user'?
exit