Is there any way to change configuration of IP address like in old distribution like 17.10 and 11.04. For example I've changed Ip address in /etc/network/interfaces but in 20.04 it's impossible to do this way and netplan is not easy to use.

2

1 Answer

Yes, things change and systemd has taken control over many parts of linux. If you wnat a static ip for your device create a file with sudo:

/etc/systemd/network/myconnection.network [Match] Name=enp0s25 #check your interfaces for this name [Network] DNS=10.10.0.3 #DNS, it may be like the gateway Address=10.10.0.10/24 #the ip address of your device Gateway=10.10.0.1 #your router 

I've commented the entries (I assumed that your local gateway is 10.10.0.1 - you must use yours of course)

That done the systemd service has to be enabled:

systemctl enable systemd-networkd systemctl start systemd-networkd 

Now you are set. The "enabled" keyword ensures, that the service will be started after a reboot, the "start" does it (once) immediately

You can check if everthing works with networkctl status enp0s25whereas your netwrok device may differ. The name of your device can be checked with:

ip a

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy