- View IP address
[abelethan@cdh01 ~]$ ifconfig
- Set static ip addr
[root@cdh01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
- Restart network
[root@cdh01 abelethan]# service network restart Restarting network (via systemctl): [ OK ]
- Check whether the network is available
[root@cdh01 abelethan]# ping www.baidu.com PING www.baidu.com (39.156.66.14) 56(84) bytes of data. 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=1 ttl=128 time=36.0 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=2 ttl=128 time=36.0 ms