• 欢迎光临~

centos8修改静态IP 重启网卡 修改主机名 更换阿里云源

开发技术 开发技术 2022-01-28 122次浏览

1.修改静态IP

vi /etc/sysconfig/network-scripts/网卡名

centos8修改静态IP 重启网卡 修改主机名 更换阿里云源

2.重启网卡服务

nmcli c reload 网卡名

3.修改主机名

hostnamectl set-hostname 主机名
hostnamectl set-hostname "主机名" --pretty
hostnamectl set-hostname 主机名 --static
hostnamectl set-hostname 主机名 --transient

4.更换阿里云源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

生成新缓存
yum makecache

程序员灯塔
转载请注明原文链接:centos8修改静态IP 重启网卡 修改主机名 更换阿里云源
喜欢 (0)
违法和不良信息举报电话:022-22558618 举报邮箱:dljd@tidljd.com