Configured Network Settings do not apply after purging Xfce on Debian 10
I have a newer install of Debian 10 with Apache/MariaDB/PHP installed. I installed it from the disk with Xfce installed but realized soon after that I didn't need that. I ran this command to remove it:
dpkg -l | grep .xfce. | awk '{print $2}' | xargs sudo apt-get purge -V --auto-remove -yy
After running that command I rebooted and it seems that Xfce is gone. My problem is though my networking doesn't work on restart. I added this to my /etc/network/interfaces file:
# The primary network interface
iface ens192 inet static
address 10.0.2.28
gateway 10.0.2.1
netmask 255.255.255.0
broadcast 10.0.2.255
network 10.0.2.0
after that I ran systemctl restart networking
but nothing changes. Nothing changes after a restart either. Actually the interface is status "DOWN" after a reboot. I can also use sudo dhclient ens192
to temporarily grab dhcp but I can't get it to persist on a reboot. I can also use ip a add {ip_addr/mask} dev {interface}
to add the network settings to get connectivity but it doesn't persist.
Solution 1:
You are missing a line:
# The primary network interface
auto ens192
iface ens192 inet static
address 10.0.2.28
gateway 10.0.2.1
netmask 255.255.255.0
broadcast 10.0.2.255
network 10.0.2.0
Without auto <interface-name>
, which in your case is ens192
, the interface won't come up at boot.
Also, in case you haven't, make sure that the networking
service is enabled.