Skip to main content

Ubuntu

netplan

ubuntu >= 18.04
https://netplan.readthedocs.io/en/stable/examples/

path:

sudo vim /etc/netplan/00-installer-config.yaml

e.g:

network:
version: 2
renderer: networkd
ethernets:
enp3s0:
addresses:
- 192.168.1.100/24
nameservers:
search:
- "mycompany.local"
addresses:
- 192.168.1.253
- 8.8.8.8

apply

netplan apply

APT

设置不自动更新

https://askubuntu.com/questions/1322292/how-do-i-turn-off-automatic-updates-completely-and-for-real

sudo vi /etc/apt/apt.conf.d/20auto-upgrades
# 仅自动更新软件列表: apt update
APT::Periodic::Update-Package-Lists "1";
# 不自动升级软件包
APT::Periodic::Unattended-Upgrade "0";