zypper command yum

来源:互联网 发布:网络借贷属于金融吗 编辑:程序博客网 时间:2024/06/05 02:56
 今天在这里把opensuse下常用的命令总结一下,通常的一些命令就不写了。
1。zypper:
  Usage:                                
        zypper [--global-options] <command> [--command-options] [arguments]

  Global Options:
        --help, -h              Help.
        --version, -V           Output the version number.
        --config, -c <file>     Use specified config file instead of the default.
        --quiet, -q             Suppress normal output, print only error        
                                messages.                                       
        --verbose, -v           Increase verbosity.                             
        --no-abbrev, -A         Do not abbreviate text in tables.               
        --table-style, -s       Table style (integer).                          
        --rug-compatible, -r    Turn on rug compatibility.                      
        --non-interactive, -n   Do not ask anything, use default answers        
                                automatically.                                  
        --xmlout, -x            Switch to XML output.                           
        --reposd-dir, -D <dir>  Use alternative repository definition files     
                                directory.                                      
        --cache-dir, -C <dir>   Use alternative meta-data cache directory.      
        --raw-cache-dir <dir>   Use alternative raw meta-data cache directory.  

     Repository Options:
        --no-gpg-checks         Ignore GPG check failures and continue.
        --gpg-auto-import-keys  Automatically trust and import new repository
                                signing keys.                               
        --plus-repo, -p <URI>   Use an additional repository.               
        --disable-repositories  Do not read meta-data from repositories.    
        --no-refresh            Do not refresh the repositories.            
        --no-cd                 Ignore CD/DVD repositories.                 
        --no-remote             Ignore remote repositories.                 

     Target Options:
        --root, -R <dir>        Operate on a different root directory.
        --disable-system-resolvables                                 
                                Do not read installed packages.      

  Commands:
        help, ?                 Print help.
        shell, sh               Accept multiple commands at once.

     Repository Management:
        repos, lr               List all defined repositories.
        addrepo, ar             Add a new repository.        
        removerepo, rr          Remove specified repository. 
        renamerepo, nr          Rename specified repository. 
        modifyrepo, mr          Modify specified repository. 
        refresh, ref            Refresh all repositories.    
        clean                   Clean local caches.          

     Service Management:
        services, ls            List all defined services.
        addservice, as          Add a new service.       
        modifyservice, ms       Modify specified service.
        removeservice, rs       Remove specified service.
        refresh-services, refs  Refresh all services.    

     Software Management:
        install, in             Install packages.
        remove, rm              Remove packages.
        verify, ve              Verify integrity of package dependencies.
        source-install, si      Install source packages and their build 
                                dependencies.                           
        install-new-recommends, inr                                     
                                Install newly added packages recommended
                                by installed packages.                  

     Update Management:
        update, up              Update installed packages with newer versions.
        list-updates, lu        List available updates.                      
        patch                   Install needed patches.                      
        list-patches, lp        List needed patches.                         
        dist-upgrade, dup       Perform a distribution upgrade.              
        patch-check, pchk       Check for patches.                           

     Querying:
        search, se              Search for packages matching a pattern.
        info, if                Show full information for specified packages.
        patch-info              Show full information for specified patches.
        pattern-info            Show full information for specified patterns.
        product-info            Show full information for specified products.
        patches, pch            List all available patches.                 
        packages, pa            List all available packages.
        patterns, pt            List all available patterns.
        products, pd            List all available products.
        what-provides, wp       List packages providing specified capability.

     Package Locks:
        addlock, al             Add a package lock.
        removelock, rl          Remove a package lock.
        locks, ll               List current package locks.
        cleanlocks, cl          Remove unused locks.

     Other Commands:
        versioncmp, vcmp        Compare two version strings.
        targetos, tos           Print the target operating system ID string.
        licenses                Print report about licenses and EULAs of
                                installed packages.

用 法 :
        zypper [--全 局 选 项 ] <命 令 > [--命 令 选 项 ] [参 数 ]

全 局 选 项 :
        --help, -h              帮 助 。 .
        --version, -V           输 出 版 本 号 。
        --quiet, -q             减 少 普 通 输 出 , 仅 打 印 错 误 信 息 。
        --verbose, -v           增 加 信 息 的 详 细 程 度
        --no-abbrev, -A         表 格 中 不 出 现 缩 写 文 本 。
        --table-style, -s       表 格 样 式 (整 数 )。
        --rug-compatible, -r    开 启 与 rug 的 兼 容 。
        --non-interactive, -n   不 询 问 任 何 问 题 , 自 动 使 用 默 认 的 回 复 。
        --xmlout, -x            切 换 到 XML 输 出 。
        --reposd-dir, -D <dir> 使 用 其 他 的 安 装 源 定 义 文 件 目 录 。
        --cache-dir, -C <dir>   使 用 其 他 的 元 数 据 缓 存 数 据 库 目 录 。
        --raw-cache-dir <dir>   使 用 其 他 的 原 始 元 数 据 缓 存 目 录 。

        Repository Options:
        --no-gpg-checks         忽 略 GPG 检 查 失 败 并 继 续 。
        --plus-repo, -p <URI>   使 用 额 外 的 安 装 源 。
        --disable-repositories 不 从 安 装 源 读 取 元 数 据 。
        --no-refresh            不 刷 新 安 装 源 。

目 标 选 项 :
        --root, -R <dir>        在 不 同 的 根 目 录 下 操 作 。
        --disable-system-sources、 -D            不 读 取 系 统 安 装 的 可 解 析 项 。

命 令 :
        help, ?                 打 印 帮 助 。
        shell, sh               一 次 接 受 多 个 命 令 .

        安 装 源 操 作 :
        repos, lr               列 出 所 有 定 义 的 安 装 源 。
        addrepo, ar             添 加 一 个 心 得 安 装 源 。具体请看:
http://bbs.linuxsky.org/thread-7672-1-1.html
        removerepo, rr          删 除 指 定 的 安 装 源 。
        renamerepo, nr          重 命 名 指 定 的 安 装 源 。
        modifyrepo, mr          修 改 指 定 的 安 装 源 。
        refresh, ref            刷 新 所 有 安 装 源 。
        clean                   清 除 本 地 缓 存 。

        软 件 管 理 :
        install, in             安 装 软 件 包 。
        remove, rm              删 除 软 件 包 。
        verify, ve              检 验 软 件 包 的 依 赖 关 系 的 完 整 性 。
        update, up              将 已 经 安 装 的 软 件 包 更 新 到 新 的 版 本 。
        dist-upgrade, dup       执 行 整 个 系 统 的 升 级 。
        source-install, si      安 装 源 代 码 软 件 包 和 它 们 的 编 译 依 赖 。

        查 询 :
        search, se              查 找 符 合 一 个 模 式 的 软 件 包 。
        info, if                显 示 指 定 软 件 包 的 完 整 信 息 。
        patch-info              显 示 指 定 补 丁 的 完 整 信 息 。
        pattern-info            显 示 指 定 模 式 的 完 整 信 息 。
        product-info            显 示 指 定 产 品 的 完 整 信 息 。
        patch-check, pchk       检 查 补 丁 。
        list-updates, lu        列 出 可 用 的 更 新 。
        patches, pch            列 出 所 有 可 用 的 补 丁 。
        packages, pa            列 出 所 有 可 用 的 软 件 包 。
        patterns, pt            列 出 所 有 可 用 的 模 式 。
        products, pd            列 出 所 有 可 用 的 产 品 。
        what-provides, wp       列 出 能 够 提 供 指 定 功 能 的 软 件 包 。

        软 件 包 锁 定 :
        addlock, al             添 加 一 个 软 件 包 锁 定 。
        removelock, rl          取 消 一 个 软 件 包 锁 定 。
        locks, ll               列 出 当 前 的 软 件 包 锁 定 。
2.rpm:
rpm大概常用的选项有这些:
安装:-ivh
拆除已安装的软件包:-e
升级:-Uvh
查询:-q
3.yum:

列出所有可更新的软件清单

命令:yum check-update

安装所有更新软件

命令:yum update

仅安装指定的软件

命令:yum install

仅更新指定的软件

命令:yum update

用YUM安装软件包

命令:yum install

用YUM删除软件包

命令:yum remove

清除缓存目录(/var/cache/yum)下的软件包

命令:yum clean packages

清除缓存目录(/var/cache/yum)下的 headers

命令:yum clean headers

清除缓存目录(/var/cache/yum)下旧的 headers

命令:yum clean oldheaders

清除缓存目录(/var/cache/yum)下的软件包及旧的headers

命令:yum clean, yum clean all (= yum clean packages; yum clean oldheaders)

原创粉丝点击