2.3.3快速查找文件
1.find命令
解釋:find? ?目錄名? -name?全的txt文檔
用法:find /user/share/doc -name *.txt
2.locate
locate和find不同的是,locate查找文件是從數據庫中查找文件
查找文件? ? -c參數統(tǒng)計數量
locate?apt-get -c
2.3.4?軟件包管理
軟件包的管理相當簡單,最突出的亮點是:
~自動解決依賴問題
~升級簡單
而且Ubuntu軟件包數量繁多(Ubuntu 14.4?有超過59000個軟件包,通過apt-cachestats命令都可以查到)
比如我們要查看php5-mysql
apt-cache show php5-mysql
注意:updates和security字樣的務必留下,關乎系統(tǒng)安全。
2.3.5使用apt工具
apt工具的相關文件和目錄:
/etc/apt/sources.list——設置軟件包的獲取來源(軟件源);
/etc/apt/apt.conf.d——存放apt的零碎配置文件;
/etc/apt/preferences——指定軟件包的版本等參數;
/etc/apt/preferences.d——放置零碎文件,以指定軟件包的版本等參數;
/var/cache/apt/archives/——存放已經下載的軟件包;
/var/cache/apt/archives/partial/——存在正在下載的軟件包;
/var/lib/apt/lists/——存放已經下載的軟件包詳細信息;
/var/lib/apt/lists/partial/——存放正在下載的軟件包詳細信息;
3.apt-get命令
一次安裝3個軟件包
sudo apt-get install php5-mysql apache2 libapache2-mod-php5
更新軟件包
sudo apt-get update && sudo apt-get upgrade
4.apt-cache命令
用來搜索軟件包的名字,加上server
apt-cache search mysql | grep server
查看版本號依賴、軟件包描述
apt-cache show ssh
5.aptitude?命令
是一個帶文本圖形界面的高級接口
Q退出? ? Ctrl+T調出菜單? ? ? ?顯示幫助
6.tashsel命令
是Ubuntu系統(tǒng)的基本組成部分帶有圖形界面
查看任務的軟件包列表?
tasksel --task-packages lamp-server
查看系統(tǒng)提供了哪些任務:
每一行字母表示任務狀態(tài):u表示未安裝,i表示已安裝。
tasksel --list-tasks
要安裝、刪除某個任務,用tasksel install<task>tasksel remove<task>命令:
tasksel install lamp-server
tasksel remove lamp-server
7.dpkg命令
查看軟件包apt是否已安裝:
dpkg -l apt
查看軟件包apache是否已經安裝:
dpkg -l apache
查看軟件包whiptail中都包含哪些文件:
dpkg -L whiptail
其他的dpkg選項和子目錄
man?dpkg