たまに混在させて間違ってしまうのでメモ。
yum と apt コマンドの対応表
動作 | Redhat系 | Debian系 |
---|---|---|
キャッシュの更新 | apt-get update | |
ダウンロードしたパッケージを削除 | yum clean packages | apt-get clean |
アップデート可能な一覧を表示 | yum check-update | |
モジュールの更新 | yum update | apt-get upgrade |
パッケージの検索 | yum search <検索文字列> | apt-cache search <検索文字列> |
パッケージに含まれるファイルの検索 | yum provides <検索文字列> | apt-file search <検索文字列> |
インストール | yum install <パッケージ名> | apt-get install <パッケージ名> |
削除 | rpm -e <パッケージ名> | apt-get remove <パッケージ名> |
参照レポジトリの設定ファイル | /etc/yum.repos.d/* | /etc/apt/sources.list |
インストール済みパッケージのリスト | rpm -qa | dpkg-query -l |
インストール済み | rpm -ql <パッケージ名> | dpkg-query -L <パッケージ名> |
インストール済み依存パッケージのリスト | rpm -qR <パッケージ名> | apt-cache depends <パッケージ名> |
インストール済みパッケージの情報表示 | rpm -qi <パッケージ名> | apt-cache show <パッケージ名> |
ついでに・・・
サービスの起動の設定 | Redhat系 | Debian系 |
---|---|---|
サービスON/OFF | chkconfig <サービス名> on/off | sysv-rc-conf <サービス名> on/off |
サービス一覧 | chkconfig --list | sysv-rc-conf --list |