you can check your machine’s current ip with: ip addr show
to modify your network interface address setting simply use the nmtui tool:
this failed me once with “no Update2” method… so let’s move on to the…
manual way:
terminal mode: activate network on boot
search how to set fixed ip on centos7
which ifup /usr/sbin/ifup file /usr/sbin/ifup /usr/sbin/ifup: Bourne-Again shell script, ASCII text executable
vim /etc/sysconfig/network
example content:
[root@CentOS7 ~]# cat /etc/sysconfig/network # Created by anaconda NETWORKING=yes [root@CentOS7 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=eth0 UUID=1f926ad0-9cd9-4adb-b8ec-5993ae40e333 DEVICE=eth0 ONBOOT=yes <- change this, it is no per default, which means no auto startup of network, then reboot system.
/etc/sysconfig/network-scripts/ifcfg-<configuration>
The file defining an interface.
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!