linux 7.7 学习 -网络设置

查看网络

ip addr

设置主机名

hostnamectl  status

hostnamectl set-hostname  ht02

 

在root用户权限下:

查看当前启动模式

systemctl get-default

更改模式命令:

systemctl set-default graphical.target          由命令行模式更改为图形界面模式

systemctl set-default multi-user.target         由图形界面模式更改为命令行模式

查看网卡uuid

[root@ht19c01 ~]# nmcli con show
NAME UUID TYPE DEVICE
enp0s3 afba38c6-9942-4f91-824e-fafc57161704 ethernet enp0s3
enp0s8 5f1f99a7-77d9-49f7-a01a-ecc04eb28f33 ethernet enp0s8
Wired connection 1 81c7321e-49a7-4fe2-840b-c3ccba591586 ethernet enp0s9
virbr0 40d406c5-68aa-46a8-b20d-8172f4bad606 bridge virbr0

nmcli device status
nmcli connection edit enp0s9
nmcli connection modify enp0s9 ipv4.addr 192.168.0.225/24 && nmcli connection up enp0s9
nmcli connection modify enp0s9 ipv4.addr 192.168.0.226/24 && nmcli connection up enp0s9

 

或者为网卡生成新的uuid

uuidgen enp0s9

重启网络服务

systemctl start network.service

 

posted @ 2019-12-06 07:02  刚好遇见Mysql  阅读(341)  评论(0编辑  收藏  举报