当前位置: 首页 > 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.lryc.cn/news/506009.html

相关文章:

  • 深入解析 `DataFrame.groupby` 和 `agg` 的用法及使用场景
  • MySQL 的锁
  • 二、使用langchain搭建RAG:金融问答机器人--数据清洗和切片
  • 【Linux】-- linux 配置用户免密登录本机
  • 泷羽sec学习打卡-brupsuite8伪造IP和爬虫审计
  • 【uniapp蓝牙】基于native.js链接ble和非ble蓝牙
  • .NET Core 各版本特点、差异及适用场景详解
  • Linux中自动检测并定时关闭KDialog程序
  • CSS学习记录12
  • 【Java基础面试题016】JavaObject类中有什么主要方法,作用是什么?
  • 实践环境-docker安装mysql8.0.40步骤
  • 边缘智能创新应用大赛获奖作品系列一:智能边缘计算✖软硬件一体化,开启全场景效能革命新征程
  • 决策树的生成与剪枝
  • 蓝桥杯算法训练 黑色星期五
  • MySQL存储引擎-存储结构
  • 理解torch函数bmm
  • 2024 年的科技趋势
  • win服务器的架设、windows server 2012 R2 系统的下载与安装使用
  • leetcode45.跳跃游戏II
  • 边缘智能创新应用大赛获奖作品系列三:边缘智能强力驱动,机器人天团花式整活赋能千行百业
  • 基于语义的NLP任务去重:大语言模型应用与实践
  • 使用阿里云Certbot-DNS-Aliyun插件自动获取并更新免费SSL泛域名(通配符)证书
  • Node.js安装配置+Vue环境配置+创建一个VUE项目
  • “TA”说|表数据备份还原:SQLark 百灵连接助力项目部署验收
  • 【FFmpeg】解封装 ① ( 封装与解封装流程 | 解封装函数简介 | 查找码流标号和码流参数信息 | 使用 MediaInfo 分析视频文件 )
  • Spring Boot 集成 MyBatis 全面讲解
  • C语言小练习-打印字母倒三角
  • Linux -- 线程控制相关的函数
  • 基于quasar,只选择年度与月份的组件
  • 健康养生:拥抱生活的艺术