当前位置:首页 > HOTMAIPU

Ubuntu固定IP设置

jxj95275个月前 (06-03)HOTMAIPU385

Ubuntu 网络配置与阿里云源设置

1. 网络配置(Netplan 示例)

network: 
  version: 2 
  ethernets: 
    ens33: 
      addresses: 
        - 192.168.66.106/24 
      routes: 
        - to: default 
        via: 192.168.66.254 
      nameservers: 
        addresses: 
        - 8.8.8.8 
        - 114.114.114.114 
      dhcp4: false

2. Ubuntu 阿里云镜像源配置

将以下内容添加到 /etc/apt/sources.list 文件中,替换原有源即可:

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

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

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

# 以下为可选源,默认注释 
# deb https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse 
# deb-src https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse  

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

3. 配置说明

  • 网络配置
    • 静态IP:192.168.66.106/24
    • 默认网关:192.168.66.254
    • DNS服务器:8.8.8.8、114.114.114.114
    • DHCP:已关闭
  • 阿里云源
  • 适用于 Ubuntu Noble 版本
  • 包含主仓库、更新、安全、回溯等源
  • 可选 proposed 源默认注释,按需开启

4. 常用操作

  1. 应用网络配置

sudo netplan apply

  1. 更新软件源

sudo apt update sudo apt upgrade

💡 如有更多配置需求,可根据实际情况调整相关参数。

相关文章

RPA流程机器人:应用场景与实现功能的全面解析

引言 机器人流程自动化(Robotic Process Automation, RPA)是一种计算机编程软件,通过使用用户界面的软件把基于规则的流程自动化,能够在任何软件上运行,包括基于网络的应用程…

从VMware外接存储到深信服超融合存储虚拟化的替代方案

引言 随着信息技术的飞速发展,传统的IT架构正在被更加高效、灵活和智能的解决方案所替代。超融合基础设施(Hyper-Converged Infrastructure, HCI)作为新一代数据中心架构…

豆包+即梦+剪映

豆包+即梦+剪映

前段时间,可灵、即梦,还有Google的Veo 2,这些AI视频工具扎堆发布了新模型,节奏快得我都有点跟不上了。 不过,说实话,虽然更新频率挺快的,可真要说它们有哪些实际的生产力场景,我觉得暂时还差…

深信服与联想超融合对比分析

以下是深信服超融合与联想超融合在功能、性能、安全及价格四个维度的深度对比分析,结合最新技术动态和市场数据(截至2025年7月): ⚙️ 1. 功能对比 维度 深信服超融合 联想…

系统运维工程师转软件开发工程师的6个月学习路线

引言 作为一名系统运维工程师,您已经具备了系统管理、网络配置和服务器维护等方面的知识和技能。这些经验是您转行软件开发的重要基础,但您还需要补充和提升编程思维、软件开发方法论以及相关技术栈。本报告将为…

运维转网安这条路,普通人真的走得通,只要你肯沉下心去钻研技术。

运维转网安这条路,普通人真的走得通,只要你肯沉下心去钻研技术。

运维转网安这条路,普通人真的走得通,只要你肯沉下心去钻研技术。…