centos7 命令行配置网卡+安装GUI

Submitted by Lizhe on Sun, 07/09/2017 - 18:46

今天在虚拟机上装了centos7 以后发现没有UI

然后想装UI, 然后发现centos7手动配置网卡的命令好像变了

查看网卡

nmcli connection show

然后我这里是ens33

命令行倒是不麻烦

[root@localhost ~]# nmcli connection modify ens33 \

> connection.autoconnect yes \

> ipv4.method manual \

> ipv4.address 192.168.1.2/24 \

> ipv4.gateway 192.168.1.1 \

> ipv4.dns 8.8.8.8

简单做个备忘

systemctl get-default 获取当前运行级别

systemctl set-default graphical.target 设置成带界面启动

138