天天看點

配置ubuntu

更換軟體源、更新系統

sudo gedit /etc/apt/sources.list

# Archive.ubuntu.com 更新伺服器(歐洲,此為官方源)

deb http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse

# Ubuntu.cn99.com 更新伺服器(江蘇省常州市電信,推薦電信使用者使用。)

deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu-cn/ feisty main restricted universe multiverse

# mirror.rootguide.org

更新伺服器 (上海市 電信):

deb http://mirror.rootguide.org/ubuntu/ feisty main restricted universe multiverse

deb-src http://mirror.rootguide.org/ubuntu/ feisty main restricted universe multiverse

deb http://mirror.rootguide.org/ubuntu/ feisty-updates main restricted universe multiverse

deb-src http://mirror.rootguide.org/ubuntu/ feisty-updates main restricted universe multiverse

deb http://mirror.rootguide.org/ubuntu/ feisty-backports main restricted universe multiverse

deb-src http://mirror.rootguide.org/ubuntu/ feisty-backports main restricted universe multiverse

deb http://mirror.rootguide.org/ubuntu/ feisty-security main restricted universe multiverse

deb-src http://mirror.rootguide.org/ubuntu/ feisty-security main restricted universe multiverse

deb http://mirror.rootguide.org/ubuntu/ feisty-proposed main multiverse restricted universe

deb-src http://mirror.rootguide.org/ubuntu/ feisty-proposed main restricted universe multiverse

deb http://mirror.rootguide.org/ubuntu-cn/ feisty main multiverse restricted universe

# 台灣大學更新伺服器(推薦網通使用者使用,此源比較完整,較少出現同步問題)

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-updates main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-updates main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-backports main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-backports main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-security main restricted universe multiverse

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-security main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-proposed main multiverse restricted universe

deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-proposed main restricted universe multiverse

# Mirror.lupaworld.com 更新伺服器(浙江省杭州市電信,亞洲地區官方更新伺服器)

deb http://cn.archive.ubuntu.com/ubuntu feisty main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu feisty-security main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu feisty-updates main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu feisty-backports main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu feisty-proposed main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu feisty main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu feisty-security main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu feisty-updates main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu feisty-backports main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu feisty-proposed main restricted universe multiverse

deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn feisty main restricted universe multiverse

# ubuntu.cnsite.org 更新伺服器(福建省福州市 電信)

deb http://ubuntu.cnsite.org/ubuntu/ feisty main restricted universe multiverse

deb-src http://ubuntu.cnsite.org/ubuntu/ feisty main restricted universe multiverse

deb http://ubuntu.cnsite.org/ubuntu/ feisty-updates main restricted universe multiverse

deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-updates main restricted universe multiverse

deb http://ubuntu.cnsite.org/ubuntu/ feisty-backports main restricted universe multiverse

deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-backports main restricted universe multiverse

deb http://ubuntu.cnsite.org/ubuntu/ feisty-security main restricted universe multiverse

deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-security main restricted universe multiverse

deb http://ubuntu.cnsite.org/ubuntu/ feisty-proposed main multiverse restricted universe

deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-proposed main restricted universe multiverse

deb http://ubuntu.cnsite.org/ubuntu-cn/ feisty main multiverse restricted universe

# 北京市清華大學 更新伺服器(教育網,推薦校園網和網通使用者使用)

deb http://mirror9.net9.org/ubuntu/ feisty main multiverse restricted universe

deb http://mirror9.net9.org/ubuntu/ feisty-backports main multiverse restricted universe

deb http://mirror9.net9.org/ubuntu/ feisty-proposed main multiverse restricted universe

deb http://mirror9.net9.org/ubuntu/ feisty-security main multiverse restricted universe

deb http://mirror9.net9.org/ubuntu/ feisty-updates main multiverse restricted universe

deb-src http://mirror9.net9.org/ubuntu/ feisty main multiverse restricted universe

deb-src http://mirror9.net9.org/ubuntu/ feisty-backports main multiverse restricted universe

deb-src http://mirror9.net9.org/ubuntu/ feisty-proposed main multiverse restricted universe

deb-src http://mirror9.net9.org/ubuntu/ feisty-security main multiverse restricted universe

deb-src http://mirror9.net9.org/ubuntu/ feisty-updates main multiverse restricted universe

deb http://mirror9.net9.org/ubuntu-cn/ feisty main multiverse restricted universe

————————————————————————————————————

更新以及更新了系統

sudo apt-get update

sudo apt-get dist-upgrade

更新相關指令:

apt-cache search package 搜尋包

apt-cache show package 擷取包的相關資訊,如說明、大小、版本等

sudo apt-get install package 安裝包

sudo apt-get install package - - reinstall 重新安裝包

sudo apt-get -f install 修複安裝"-f = --fix-missing"

sudo apt-get remove package 删除包

sudo apt-get remove package - - purge 删除包,包括删除配置檔案等

sudo apt-get update 更新源

sudo apt-get upgrade 更新已安裝的包

sudo apt-get dist-upgrade 更新系統

sudo apt-get dselect-upgrade 使用 dselect 更新

apt-cache depends package 了解使用依賴

apt-cache rdepends package 是檢視該包被哪些包依賴

sudo apt-get build-dep package 安裝相關的編譯環境

apt-get source package 下載下傳該包的源代碼

sudo apt-get clean && sudo apt-get autoclean 清理無用的包

sudo apt-get check 檢查是否有損壞的依賴

系統apt安裝的軟體包通常都是下載下傳到如下檔案夾:

/var/cache/apt

安裝解碼器、flashplayer、java虛拟機、微軟字型

sudo apt-get install ubuntu-restricted-extras

安裝媒體播放器

sudo apt-get install mplayer mozilla-mplayer totem-xine libxine-extracodecs

安裝下載下傳工具(多線程下載下傳、BT下載下傳、電驢)

sudo apt-get install d4x amule azureus

安裝konqueror上網用

sudo apt-get install konqueror

openoffice中文菜單:

sudo apt-get install openoffice.org-help-zh-cn

Firefox浏覽器優化

Tab Mix Plus ———— 标簽浏覽增強插件

Super DragAndGo———— 超級拖拽插件

Fasterfox———— 浏覽器速度優化插件

去https://addons.mozilla.org/en-US/firefox/

安裝qq

sudo apt-get install eva

sudo apt-get install scim-qtimm # 如果出現無法輸入中文的情況

安裝rar壓縮、解壓工具

sudo apt-get install rar unrar

apt下載下傳的deb包清理

sudo apt-get clean

修改root使用者密碼:

sudo passwd root

ntfs讀寫:

sudo apt-get install ntfs-3g

sudo apt-get install ntfs-config

分區圖形化:

sudo apt-get install gparted

擷取分區的UUID:

sudo vol_id -u /dev/hdaX

在右鍵菜單中加入打開終端:

sudo apt-get install nautilus-open-terminal

系統圖示目錄:

usr/share/icons/hicolor/scalable/apps

/usr/share/pixmaps/

關閉多遠虛拟終端:

/etc/event.d,getty等等

滑鼠主題以及系統:/usr/share/icons

解壓後bash,然後整個檔案拷貝到以上檔案夾

Ubuntu系統目錄結構

==================

以下為Ubuntu目錄的主要目錄結構,您稍微了解它們都包含了哪些檔案就可以了,不需要記憶。

/ 根目錄

├boot/ 啟動檔案。所有與系統啟動有關的檔案都儲存在這裡

│ └grub/ Grub引導器相關的檔案

├dev/ 裝置檔案

├proc/ 核心與程序鏡像

├mnt/ 臨時挂載

├media/ 挂載媒體裝置

├root/ root使用者的$HOME目錄

├home/

│ ├user/ 普通使用者的$HOME目錄

│ └.../

├bin/ 系統程式

├sbin/ 管理者系統程式

├lib/ 系統程式庫檔案

├etc/ 系統程式和大部分應用程式的全局配置檔案

│ ├init.d/ SystemV風格的啟動腳本

│ ├rcX.d/ 啟動腳本的連結,定義運作級别

│ .Network/ 網絡配置檔案

│ ├X11/ 圖形界面配置檔案

├usr/

│ ├bin/ 應用程式

│ ├sbin/ 管理者應用程式

│ ├lib/ 應用程式庫檔案

│ ├share/ 應用程式資源檔案

│ ├src/ 應用程式源代碼

│ ├local/

│ │ ├soft/ 使用者程式

│ │ └.../ 通常使用單獨檔案夾

│ ├X11R6/ 圖形界面系統

├var/ 動态資料

├temp/ 臨時檔案

├lost+found/ 磁盤修複檔案

bootchat:

如果發現系統啟動很慢,可以安裝bootchart仔細看看系統過程:

sudo apt-cache search bootchart

安裝好後重新開機之後在/var/log/bootchart生成系統詳細啟動過程的圖檔。

/dev/hda5 為例:   /dev/ 表示的是根目錄 hd 表示這是一塊IDE硬碟 a 表示這是該類型接口上的第一個裝置 5 則是第一個邏輯分區

/

根目錄,唯一必須挂載的目錄。不要有任何的猶豫,選一個分區,挂載它!(在絕大多數情況下,有2G的容量應該是夠用了。當然了,很多東西都是多多益善的:)

swap

交換分區,可能不是必須的,不過按照傳統,并且照顧到您的安全感,還是挂載它吧。它的容量隻要大于您的實體記憶體就可以了,如果超過了您實體記憶體兩倍的容量,那絕對是一種浪費。

/home

前面已經介紹過了,這是您的家目錄,通常您自己建立的檔案,都儲存在這裡,您最好給它配置設定一個分區

/usr

應用程式目錄。大部分的軟體都安裝在這裡。如果您計劃安裝許多軟體,建議您也給它配置設定一個分區

/var

如果您要作一些伺服器方面的應用,可以考慮給它配置設定一個較大的分區

/boot

如果您的硬碟不支援LBA模式(我想那不太可能:),您最好挂載它,如果挂載硬碟的第一個分區,應該比較穩妥。一般來說,挂載的分區隻要100M大小就足夠了

綜上所述,我建議一般桌面使用者選用 ReiserFS 檔案系統,分區方案如下 (80G):

/swap 512M

/ 8G

/home 70G

超級友善的linux指令手冊

作者:4321go

NO    分類    PS1    指令名    用法及參數    功能注解    對應章節

1    檔案管理    #    ls    ls -a    列出目前目錄下的所有檔案,包括以.頭的隐含檔案   

    檔案管理    #    ls    ls -l或ll    列出目前目錄下檔案的詳細資訊   

    檔案管理    #    pwd    pwd    檢視目前所在目錄的絕對路經   

    檔案管理    #    cd    cd ..    回目前目錄的上一級目錄   

    檔案管理    #    cd    cd -    回上一次所在的目錄   

    檔案管理    #    cd    cd ~ 或 cd    回目前使用者的宿主目錄   

    檔案管理    #    cd    cd ~使用者名    回指定使用者的宿主目錄   

2    檔案管理    #    mkdir    mkdir 目錄名    建立一個目錄   

    檔案管理    #    mkdir    mkdir –p    遞歸式去建立一些嵌套目錄   

    檔案管理    #    rmdir    Rmdir 空目錄名    删除一個空目錄   

3    檔案管理    #    rm    rm 檔案名 檔案名    删除一個檔案或多個檔案   

    檔案管理    #    rm    rm -rf 非空目錄名    遞歸删除一個非空目錄下的一切,不讓提式-f   

4    檔案管理    #    cat    cat檔案名    一屏檢視檔案内容   

5    檔案管理    #    more    more檔案名    分頁檢視檔案内容   

6    檔案管理    #    less    less 檔案名    可控分頁檢視檔案内容   

7    檔案管理    #    grep    grep字元 檔案名    根據字元比對來檢視檔案部分内容   

8    檔案管理    #    mv    mv 路經/檔案 /經/檔案    移動相對路經下的檔案到絕對路經下   

    檔案管理    #    mv    mv 檔案名 新名稱    在目前目錄下改名   

9    檔案管理    #    cp    cp /路經/檔案 ./    移動絕對路經下的檔案到目前目錄下   

10    檔案管理    #    find    find 路經 -name “字元串”    查找路經所在範圍内滿足字元串比對的檔案和目錄   

11    檔案管理    #    ln    ln 源檔案 連結名    建立目前目錄源檔案的硬連結ln /home/test /usr/test1    在/usr下建立/home/test的硬連結   

12    檔案管理    #    ln    Ln -s a b    建立目前目錄下a的符号連結b

13    檔案管理    #    touch    touch file1 file2    建立兩個空檔案   

14    磁盤管理    #    df    df    用于報告檔案系統的總容量,使用量,剩餘容量。   

15    磁盤管理    #    du    du -b /home    檢視目前/HOME目錄的容量(k)及子目錄的容量(k)。   

16    磁盤管理    #    fdisk    fdisk -l    檢視系統分區資訊

17    磁盤管理    #    fdisk    fdisk /dev/sdb    為一塊新的SCSI硬碟進行分區

18    磁盤管理    #    mkfs.ext3    Mkfs.ext3 /dev/sdb1

    為第一塊SCSI硬碟的第一主分區格式化成

ext3的檔案系統

            mkfs.ext2    Mkfs.ext2/dev/sdb2     格式化成ext2檔案系統

19    磁盤管理    #    mount    mount -t 檔案系統類型 裝置路經 通路路經   

    磁盤管理    #        檔案系統類型       

                Iso9660    光驅檔案系統   

                vfat    Fat檔案系統(windows)   

    挂載光驅    #    mount –t iso9660 /dev/cdrom /mnt/cdrom    

    挂載FAT    #    mount –t vfat /dev/hda5 /mnt/cdrom     挂第一個ide的第五個邏輯分區

17    磁盤管理    #    Umount /mnt/cdrom     解除安裝/mnt/cdrom為空

18    檔案權限    #    chmod    chmod u+s file    為file的屬主加上特殊權限   

                chmod g+r file    為file的屬組加上讀權限   

                chmod o+w file    為file的其它使用者加上寫權限   

                chmod a-x file    為file的所有使用者減去執行權限

    chmod 765 file 為file的屬主設為完全權限,屬組設成讀寫權,其它使用者具有讀和執心權限

19    檔案權限    #    chown    chown root /home    把/home的屬主改成root使用者

20    檔案權限    #    chgrp    chgrp root /home    把/home的屬組改成root組

21    列印管理    #    redhat-config-printer-tui    進入安裝列印機界面   

22    列印管理    #    lp    lp –d hptr file    列印file到hptr的列印機上   

23    列印管理    #    lpq    Lpq –P 列印機名    檢視列印機的狀态   

24    列印管理    #    lprm    Lprm –P 列印機名 a    删除列印機内的列印作業   

25    列印管理    #    disable    Disable –r “changing paper” HPtr     禁用列印機并提示原因

26    列印管理    #    enable    Enable HPtr    重新啟用被禁用的   

27    使用者管理    #    useradd    Useradd    建立一個新的使用者   

28    使用者管理    #    groupadd    Groupadd 組名    建立一個新的組   

29    使用者管理    #    passwd    Passwd 使用者名    為使用者建立密碼   

30    使用者管理    #    Passwd -d    Passwd -d使用者名    删除使用者密碼也能登陸   

31    使用者管理    #    Passwd -l    Passwd -l使用者名    鎖定賬号密碼   

32    使用者管理    #    Passwd -u    Passwd -u使用者名    解鎖賬号密碼   

33    使用者管理    #    Passwd -S    Passwd -S使用者名    查詢賬号密碼   

34    使用者管理    #    Usermod -l    Usermod -l 新使用者名 老使用者名    為使用者改名   

35    使用者管理    #    Usermod -L    Usermod -L 要鎖定使用者名    鎖定使用者登陸   

36    使用者管理    #    Usermod -U    Usermod –U解鎖使用者名    解鎖使用者登陸   

37    使用者管理    #    Usermod -u    Usermod –u 501使用者名    改變使用者UID   

38    使用者管理    #    Userdel    Userdel–r 使用者名    删除使用者一切   

39    使用者管理    #    Groupmod -n    Groupmod –n新使用者名 老使用者名    為組改名   

40    使用者管理    #    Groupmod -g    Groupmod –g 501 組名    改變組GID   

41    使用者管理    #    groupdel    Groupdel組名    先應删它的使用者    删除組   

42    使用者管理    #    gpasswd -a    gpasswd -a 使用者名 組名    增加使用者到組   

43    使用者管理    #    Id     id   使用者名    查使用者資訊   

44    軟體管理    #    rpm -qa    rpm –qa | less    查詢已安裝RPM   

45    軟體管理    #        rpm –qa | grep ftp    查詢指定RPM   

46    軟體管理    #    rpm -q    rpm -q 已安裝的RPM包    查是否安裝   

47    軟體管理    #        rpm -q telnet-server    檢視telnet伺服器包

48    軟體管理    #    rpm -qi    rpm –qi 軟體包名稱    檢視軟體的描述資訊

49    軟體管理    #    rpm -ql    rpm –ql軟體包名稱    查詢軟體包的檔案清單

50    軟體管理    #    rpm -qf    rpm –qf軟體包名稱    查詢某個檔案所屬的軟體包

51    軟體管理    #    rpm -qp    rpm –qp軟體包全名    查詢未安裝的軟體包資訊

52    軟體管理    #    rpm -e    rpm –e 軟體包名稱    删除具體的軟體包

53    軟體管理    #    rpm -U    rpm –Uvh軟體包全名    更新軟體包并顯示過程

54    軟體管理    #    rpm -ivh    rpm –ivh 軟體包全名    安裝軟體包并顯示過程

55    軟體管理    #    rpm -V    rpm –V軟體包名稱    驗證軟體包的大小,類型等

56    軟體管理    #    tar     -c 建立包 –x 釋放包 -v 顯示指令過程 –z 代表壓縮包

57    軟體管理    #    tar -cf    tar –cvf benet.tar /home/benet    把/home/benet目錄打包

58    軟體管理    #    tar -czf    tar –zcvf benet.tar.gz /mnt    把目錄打包并壓縮

59    軟體管理    #    tar –tf    tar –tf benet.tar    看非壓縮包的檔案清單

60    軟體管理    #    tar –tzf    tar –tf benet.tar.gz    看壓縮包的檔案清單

61    軟體管理    #    tar –xf    tar –xf benet.tar    非壓縮包的檔案恢複

62    軟體管理    #    tar –zxvf    tar –zxvf benet.tar.gz    壓縮包的檔案解壓恢複

63    軟體管理    #    tar -jxvf    tar –jxvf benet.tar.bz2   

64    軟體管理    #    diff    diff file1 file2 > 更新檔名.patch    為新舊檔案生成更新檔檔案

65    軟體管理    #    diff    diff file1 file2    比較兩個檔案的差別

66    軟體管理    #    Patch     Patch file更新檔名.patch    打更新檔

67    軟體管理    #    ./configure --prefix=/usr/local/    編譯前配置

68    軟體管理    #    make    編譯

69    軟體管理    #    make install    安裝編譯好的源碼包

70    啟動管理    #    reboot    Init 6    重新開機LINUX系統

71    啟動管理    #    Halt    Init 0    Shutdown –h now    關閉LINUX系統

72    啟動管理    #    runlevel        顯示系統運作級

73    啟動管理    #    Init [0123456]         改變系統運作級,7種

74    啟動管理    #    Chkconfig –-list [服務名稱]    檢視服務的狀态

75    啟動管理    #    Chkconfig –-level <運作級> <服務名> on|off|set     設定服務的啟動狀态

76    啟動管理    #    Chkconfig <服務名> on|off|set    設定非獨立服務啟狀态

77    程序管理    #    Top動态    Ps-aux靜态    程序樹pstree    檢視系統程序

78    程序管理    #    程式名 &    背景運作程式   

79    程序管理    #    fg    把背景運作的程序調回前台   

80    程序管理    #    bg    把前台運作程序調到背景   

81    程序管理    #    renice    Renice +1 180     把180号程序的優先級加1

82    程序管理    #    kill    Kill PID     終止某個PID程序

83    程序管理    #    at    at 5pm + 3 days

/bin/ls    指定三天後下午5:00執行/bin/ls

84    程序管理    #    crontab    Crontab -e    用VI的形式來編輯自動周期性任務

85    程序管理    #    crontab    Crontab -l    檢視自動周期性任務

86    程序管理    #    crontab    Crontab -r    删除自動周期性任務

87    程序管理    #    crond    Service crond <start|stop|restart|status>

    馬上啟動自動周期性服務    Service crond <啟動|停止|重新開機|狀态>

    實作磁盤配額    (注安裝LINUX時建立/home分區)

目标:對使用者zhao在/home目錄上實作soft limit為5k,hard limit 為10k的磁盤配額

實作步驟:

1. 修改包含/home的行, #vi /etc/fstab, 改為:defaults,usrquota。也就是增加usrquota項。然後儲存退出。

2、解除安裝/home目錄                           #umount /home

3. 挂接/home目錄                           #mount /home

4、增加使用者zhao                            #useradd zhao  

5、修改密碼                                #passwd zhao  

6、生成關于/home目錄的quota資訊           # quotacheck -cmug /home

                                       #quotacheck -vu /home  

7、檢視所有使用者的資訊                       #repquota -au

8、設定配額                                 #edquota -u zhao

将soft 和hard 分别改為5和10

9、儲存并退出                               #wq!  

10、修改時間                                #edquota -t  

11、                                        #wq!

12.開啟/home上的磁盤配額功能                #quotaon /home

13.查詢配額                                 #quota -u zhao

14.驗證配額                                 #su - zhao

                               $touch myfile

以超級使用者管理文檔

sudo nautilus

上一篇: Ubuntu截圖
下一篇: 虛函數