当前位置: 首页 > news >正文

修改ubuntu apt 源及apt 使用

视频教程:修改ubuntu apt 源和apt 使用方法_哔哩哔哩_bilibili

1 修改apt源
1.1 获取阿里云ubuntu apt 源
https://developer.aliyun.com/mirror/ubuntu?spm=a2c6h.13651102.0.0.3e221b11mqqLBC

1.2 修改apt 源
vim /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

1.3 更新apt源
apt update


2 apt 常用命令
列出所有可更新的软件清单命令:sudo apt update

升级软件包:sudo apt upgrade

安装指定的软件命令:sudo apt install <package_name>

更新指定的软件命令:sudo apt update <package_name>

删除软件包命令:sudo apt remove <package_name>

清理不再使用的依赖和库文件: sudo apt autoremove

移除软件包及配置文件: sudo apt purge <package_name>

查找软件包命令: sudo apt search <keyword>


3 安装nginx 案例
apt install nginx

删除
apt purge ngnix
apt autoremove

查看软件包
dpkg -l |grep nginx
 


http://www.mrgr.cn/news/80734.html

相关文章:

  • 23、深度学习-自学之路-激活函数relu、tanh、sigmoid、softmax函数的正向传播和反向梯度。
  • 机械臂运动学笔记(一):正向运动学
  • 面向服务架构(SOA)详细介绍
  • 【AWS】EC2 安全组设置
  • 护照识别设备-护照信息识别系统-PHP护照信息识别接口
  • Unity项目接入xLua的一种流程
  • HW机试题库(个人总结)
  • Fast-Planner项目复现(Ubuntu 20.04 ROS Noetic)
  • 设计模式2
  • harbor离线安装 配置https 全程记录
  • Flutter环境搭建
  • vue复习
  • zlmediakit搭建直播推流服务
  • ubuntu server 安装
  • vue2,vue3 中 v-for 和v-if的优先级
  • AI自我进化的新篇章:谷歌DeepMind推出苏格拉底式学习,语言游戏解锁无限潜能
  • 搭建分布式Spark集群
  • K8s中 statefulset 和deployment的区别
  • 音频开发中常见的知识体系
  • 大腾智能CAD:国产云原生三维设计新选择
  • K8s ConfigMap的基础功能介绍
  • 网络编程 02:IP 地址,IP 地址的作用、分类,通过 Java 实现 IP 地址的信息获取
  • 搭建分布式ZooKeeper集群
  • 贪心算法求解跳跃游戏
  • GEE+本地XGboot分类
  • Redis bitmaps 使用