强大的 apt-get 命令(小结)

一、ubuntu下管理软件最方便的非 apt-get 工具莫属了,它的常见用法稍微整理一下供以后参考(详细见 man apt-get ):

1.更新源,升级软件和系统之前要先干这个~ (源目录:/etc/apt/sources.list)

sudo apt-get update

2.更新已安装的包到最新版本(若已经最新则忽略)

sudo apt-get upgrade

3.升级系统,有一定风险!此时 apt 将首先升级重要的包,如果有冲突的话,可能会删除一些次要的包(详见 man apt_preferences)

sudo apt-get dist-upgrade

4.安装(升级)一个或多个软件,也可指定版本号,安装某软件特定版本。pac 也可以使用正则匹配哦

sudo apt-get install pac1 pac2 pac3…

5.删除软件,用法同 install,会保留配置文件

sudo apt-get remove pac1 pac2 pac3…

6.用法同 remove ,也将删除配置文件,(这个更彻底)

sudo apt-get purge pac1 pac2 pac3…

7.获取源码,到当前文件夹下

sudo apt-get source pac

8.安装相关的编译环境

sudo apt-get build-dep pac

9.更新缓存,检查是否有损坏的依赖

sudo apt-get check

10.下载二进制包到当前目录

sudo apt-get download pac

11.clears out the local repository of retrieved package files,可以释放磁盘空间

sudo apt-get clean

12.clears out the local repository of retrieved package files,清除不能下载和无用的包,可以释放磁盘空间

sudo apt-get autoclean
  1. remove packages that were automatically installed to satisfy dependencies for some package and that are no more needed.

sudo apt-get autoremove

14.其他一些参数:如 -y -m -f ,组合起来实现更强大的功能,就不一一列举了,先把系统更新一下再说!

二、源及升级

1.更新源 /etc/apt/sources.list

2.升级版本

sudo apt-get install update-manager-core
sudo do-release-upgrade

3.查看当前版本及内核版本:

lsb_release -a

文件: 强大的 apt.docx

强大的 apt-get 命令的更多相关文章

  1. Ubuntu apt 常用命令

     APT(the Advanced Packaging Tool)是Ubuntu 软件包管理系统的高级界面,Ubuntu 是基于Debian的,APT由几个名字以“apt-”打头的程序组成.apt-g ...

  2. 推荐一款强大的前端CLI命令行工具

    背景 命令行界面交互开源工具 CloudBase CLI 自发布以来,受到了大量开发者的欢迎.近期,我们发布了新鲜打磨的 CloudBase CLI 1.0 Beta,引入了许多利于开发者的新特性,下 ...

  3. linux 下强大的 JSON 解析命令 jq

    介绍 jq is like sed for JSON data - you can use it to slice and filter and map and transform structure ...

  4. Ncdu强大的磁盘查看命令

    简介 项目地址: https://dev.yorhel.nl/ncdu Ncdu (NCurses Disk Usage) 是一个基于 Ncurses 库的 du 命令的界面.它通过大家熟知的 du ...

  5. ubuntu apt常用命令

    apt-cache search packagename 搜索包 apt-cache show packagename 获取包的相关信息,如说明.大小.版本等 apt-get install pack ...

  6. ubuntu apt 主要命令及参数

    1. apt-cache search package 搜索安装包 2. apt-cache search all 搜索所有安装包 3. apt-cache show package 显示安装包信息 ...

  7. ubuntu apt 相关命令

    sudo apt-get update  更新源sudo apt-get install package 安装包sudo apt-get remove package 删除包sudo apt-cach ...

  8. Ubuntu : apt 命令

    apt 命令是一个功能强大的命令行工具,它不仅可以更新软件包列表索引.执行安装新软件包.升级现有软件包,还能够升级整个 Ubuntu 系统(apt 是 Debian 系操作系统的包管理工具).与更专业 ...

  9. [转]Debian 安装与卸载包命令(APT&&DPKG)

    转自:zhangjunhd 的BLOG 1.APT主要命令apt-cache search  ------package 搜索包sudo apt-get install ------package 安 ...

  10. ubuntu apt 命令参数(转)

    apt-get是一条linux命令,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索.安装.升级.卸载软件或操作系统. apt-get update 在修改/etc/apt/sou ...

随机推荐

  1. Treewidget 节点的遍历

    父节点的遍历 // Treewidget遍历操作 // 只遍历父节点 int nParentNodeCount = ui->treeWidget->topLevelItemCount(); ...

  2. c++项目

    如题, 想搞1-2个c++项目把目前除了进程.线程管理的所有所学都用起来. 在自己设想中.

  3. PDF转置

    import pdfplumber #全是None with pdfplumber.open(r"C:\Users\yjiang3\Desktop\Inv.pdf") as pdf ...

  4. Java中String相关知识

    String 1.String概述 String代表字符串,Java程序中所有的字符串文字(例如'abc")都被实现为此类的实例,也就是说,Java中所有的双引号字符串都是String类的对 ...

  5. OSIDP-并发:互斥和同步-05

    进程和线程的管理 多道程序设计:管理单处理器系统中的多个进程. 多处理器技术:管理多处理器系统中的多个进程. 分布式处理器技术:管理分布式环境下的多个进程. 并发出现的三种环境 多应用程序:多个运行中 ...

  6. hdu:Two Rabbits(区间DP)

    Problem DescriptionLong long ago, there lived two rabbits Tom and Jerry in the forest. On a sunny af ...

  7. CGAL的demo运行的步骤

    首先使用CMake,找到demo的源文件目录,并且指定生成文件目录: 点击configur,done 点击generate,done 找到build目录中的.sln 文件,打开 ALL_BUILD 生 ...

  8. NX二次开发VS环境搭建

    1.安装VS2019(直接安装高版本:与NX匹配时向下兼容,不需要纠结) 2.安装习惯使用的NX(建议直接上NX1980,新版不管是功能还是界面都比低版好用得多.很多人说新版不好用,这只是个人习惯和接 ...

  9. 【其他】etcd

    配置 node1 name: etcd-1 data-dir: /data/etcd/node1 listen-client-urls: http://127.0.0.1:6701 advertise ...

  10. TProtocolException: Required field 'type' is unset! Struct:TPrimitiveTypeEntry(type:null)

    org.apache.thrift.protocol.TProtocolException: Required field 'type' is unset! Struct:TPrimitiveType ...