I am using Ubuntu server 16.04 and setting up some network interfaces, I wish to reload a static IP after changing its address at /etc/network/interfaces without reboot:
auto ens6
iface ens6 inet static
address 192.168.0.41
netmask 255.255.255.0
broadcast 192.168.0.255
I tried the following:
sudo systemctl restart networking
sudo ifconfig ens6 down (and afterwards up)
sudo ifdown ens6 (and afterwards up)
and tried some combinations of these commands,
Yet if i change my 'address' at the /etc/network/interfaces it will get updated (at ifconfig) only after i reboot my machine
What is the correct way to do this action without a reboot?
EDIT - tried this also due to comments
sudo /etc/init.d/networking restart