Create new file /etc/systemd/network/eth0.network.
[Match]
Name=eth0
[Network]
Address=192.168.100.2/24
Gateway=192.168.100.1
DNS=192.168.100.1systemctl enable systemd-networkd.service
Systemd: Setup a static IP Address
Reply
Create new file /etc/systemd/network/eth0.network.
[Match]
Name=eth0
[Network]
Address=192.168.100.2/24
Gateway=192.168.100.1
DNS=192.168.100.1systemctl enable systemd-networkd.service
ip link set eth0 up ip addr add 192.168.1.100/24 broadcast 192.168.1.255 dev eth0 ip route add default via 192.168.1.1 echo "nameserver 1.1.1.1" > /etc/resolv.conf
Or
ifconfig eth0 up ifconfig eth0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 route add default gw 192.168.1.1 echo "nameserver 1.1.1.1" > /etc/resolv.conf