I uninstalled my network manager trying to fix a problem. Now I have no network manager and therefore no internet. So I need one and I need to install it?

  • I edited my answer taking into consideration you do not have an internet connection. – Alex Jul 15 '13 at 8:14

I did not realize the OP could not connect to the internet. You don't need a network manager to connect to the internet. Don't waste your time looking for a different computer and transferring the files. If you have an Ethernet cable connect the computer directly to the modem and then:

sudo nano /etc/network/interfaces

Append the following lines to the end of the file:

allow-hotplug eth0
iface eth0 inet dhcp

Ctrl+X to exit and Y to save. Then:

sudo ifdown eth0
sudo ifup eth0

You should get an internet connection. If you do not have a DHCP server use the following instead (if you don't know if you have a DHCP server, then you probably have one so nevermind the following):

iface eth0 inet static

Replacing the address, netmask and gateway values with the ones you are used to.

If you cannot possibly connect the computer directly to the modem, you can also manually connect to a wireless AP, though it's much more complicated.

After connecting to the internet:

sudo apt-get install network-manager

or wicd instead of network-manager - it's the one I use.

If you are not on the sudoers list issue su to become root and then do all the commands without sudo.

  • su needs a root password to be set, which is not set by default, and most new users wouldn't know how to set it, and shouldn't really need to. Why become true root when you have your friendly neighborhood sudo? I never advise anyone to become true root unless absolutely needed, and I would do it by sudo -i, not su. – Alaa Ali Jul 14 '13 at 5:12
  • @Alaa I advise it because of two reasons: First, one might not be on the sudoers list, which is the default for non-root users in a lot of distributions. Second, you don't have to type sudo all the time. I'm used with Debian, and Debian-based distributions usually have a root password set on installation by default, if I remember correctly that was the case on Ubuntu too, at least on earlier versions. – Alex Jul 14 '13 at 11:54
  • 1
    @Alex you didn't try what @Alaa said: sudo -i gives (if really needed) a true root shell. – guntbert Jul 15 '13 at 13:30
  • my /etc/network/interfaces file informs me that ifupdown has been replaced by /etc/netplan ... – Michael Jul 4 '18 at 2:43

To install NetworkManager that is installed by default when you installed Ubuntu, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install network-manager 

Thanks to vasa1, I failed to see the no internet part. So what you can do is visit Ubuntu Packages, from a machine that has Internet connectivity (friend's, work, etc.) go down to the bottom of the page, and download Network Manager that corresponds to your Ubuntu version and architecture (32, or 64 bit), (in my case its for 13.04 Raring) and once downloaded, take it over to your system, and install it from the downloaded file.

  • 1
    But OP doesn't have an internet connection now. So how would sudo apt-get install network-managerwork (unless the relevant debs are in /var/cache/apt/archives)? – user25656 Jul 15 '13 at 3:25

Happened to face same problem. That's how i solved it. I happened to remove the network-manager and yep now I have no internet. So I came to know after that best shot is http://packages.ubuntu.com/. So but which package I asked myself.

So what i did i executed command again sudo apt-get install network-manager.

Its obvious it fails, but I came to know what package it was trying to download. e.g in my case if failed while downloading http://in.archive.ubuntu.com/ubuntu/pool/main/n/network-manager-applet/network-manager-gnome_0.9.8.8-0ubuntu4.3_amd6. So that's it, go to your friend system. Hit this url .It will download deb package.

Now copy this package and paste it in /var/cache/apt/archives. And now run again sudo apt-get install network-manager and that's it.

I am hoping all dependencies are already there. So by this way you can install network manager without using any boot device


The easiest way is boot from an installation media and then use chroot.

  • Boot from an ubuntu installation media.
  • Mount your system drives: sudo mount /dev/sdX /mnt
  • chroot into your system: chroot /mnt /bin/bash
  • Install networkmanager with sudo apt-get install network-manager
  • Reboot your system

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.