1.修改主機名命令#hostnamectl set-hostname localhostname
2.修改配置文件/etc/hostname
3.圖形方式修改IP地址命令#nm-connection-editor
4.直接命令修改
#nmcli connection modify eth0 ipv4.addresses "192.168.100.20/24"
#nmcli connection modify eth0 ipv4.gateway "192.168.100.1"
#nmcli connection modify eth0 ipv4.dns1 "8.8.8.8"
5.配置文件修改#vim /etc/sysconfig/networking-scripts/ifcfg-eth0在文件後添加
IPADDR=192.168.163.128
PREFIX=24
GATEWAY=192.168.163.1
http://www.bkjia.com/Linuxjc/1195843.htmlwww.bkjia.comtrue