CentOS官方已停止维护了,作为曾经的Linux服务器操作系统的霸主也不免有衰落的这一天。以后,就要和Ubuntu说你好了。

系统管理

  • 搜索包
1
2
3
apt-cache search PackageName
# 查看包详细信息
apt-cache show PackageName 
  • 查看当前系统已安装的包
1
dpkg -l | grep PackageName
  • 安装包
1
2
3
4
5
# Ubuntu新系统要安装包,第一步还必须执行apt-get update
apt-get update  # 类似 yum makecache
apt-get install PackageName
# 安装指定版本包
apt-get install PackageName==Version
  • 更换IP地址

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

1
2
3
4
5
6
7
8
9
network:
  ethernets:
    ens33:
      addresses: [192.168.31.215/24]
      dhcp4: no
      optional: true
      gateway4: 192.168.31.1
      nameservers:
         addresses: [192.168.31.1,114.114.114.114]

使配置生效

1
sudo netplan apply