Setting up Networking in Linux without Network Manager

Yesterday, I faced this issue in Ubuntu where I accidentally uninstalled DHCP client on my system and leading to it uninstalling the Network manager too! Doing an apt-get update returned

Err trusty Release.gpg
  Could not resolve ''

And going to Settings -> Network returned “The system network services are not compatible with this version”. So to install the network manager back, I needed Internet. Circular dependency.

Sounds painful, but digging for a couple of hours, I was able to fix the issue. Two major problems here, need to manually make your internet work, and second, have a DNS server added that can be used. I used Ethernet because it’s easier to set up, but doing the same thing with Wifi shouldn’t be really hard.


1- Know what your ethernet interface is. Type

ifconfig -a

Mine turned out to be eth2

2- Set up your interface with a static IP address. The IP address that you take should be in the range that your router supports. The easiest way to get access to it is to use the settings from a device that is on your router already. Update the details in /etc/network/interfaces as(the IP address is, make sure no other device is using that already).

auto eth2
iface eth2 inet static

4- Check if you have correct DNS server in your /etc/resolv.conf. If there is nothing apart from, you’ll need to add a DNS server to make things work. As specified in the resolv.conf file, you shouldn’t directly edit the file. Rather add the DNS servername in /etc/resolvconf/resolv.conf.d/base:


That’s Google’s DNS server, and should be sufficient to get set and working in most cases.

5- Restart network components using

sudo /etc/init.d/networking restart

and make your network connection up using

ifconfig eth2 up

But that didn’t work for me but a restart did. You can check using ifconfig that your settings are reflected.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s