How do I re-install Network Manager without an internet connection?

Solution 1:

In case you only removed just Network Manager with the Software Center it is quite easy to reinstall by downloading only 2 packages from another machine connected to the internet:

  • Use packages.ubuntu.com, download the network-manager package from a software mirror close to you. Take care to choose the appropriate architecture (amd64 for 64-bit, i386 for 32-bit), and release version of your installed OS.
  • Download network-manager-gnome package likewise (amd64 or i386).
  • Copy both files on your spare USB drive and take it to the broken machine.
    (e.g. network-manager-gnome_0.8xxx.deb and network-manager_0.8xxx.deb)
  • Install network-manager and network-manager-gnome simply by double-clicking on these two .deb files. This opens the Ubuntu Software Center or Gdebi for reinstallation.
  • After a rebooting (or just logging out and logging back in) the network manager will run and use your previous settings as before.

Note: This was not tested for the case when network-manager was removed in other ways, and if other applications were removed that may have deleted additional dependencies.

Solution 2:

The following describes how to establish a wireless network connection via command line utilities.

I think this is a better option because it gives you the useful ability to interface with relevant command line utilities.

  1. Use ifconfig -a to identify your wireless card. From hence forward, I will assume it's eth1.
  2. sudo ifconfig eth1 up
  3. iwlist eth1 scan to find available networks. iwlist eth1 scan | less if it's a long list.
  4. sudo iwconfig eth1 essid [network] [key [pass]] Also, read man iwconfig to figure out how the wifi password is entered. You might also need to configure the channel and stuff.
    1. If you use WPA, wpa_supplicant will be necessary. http://ubuntuforums.org/showthread.php?t=263136
  5. sudo dhclient eth1

Solution 3:

I had the same problem. I was on one and only computer - off-line and could not re-install Network manager. However, booting up in the root screen allowed an internet connection. I still could not install the network manager, but I was able to apt-get install wicd.

After doing that, I booted up again, this time to the GNOME window GUI and wicd was there in the applications. It sets up internet connection as does NetworkManager. But to be extra safe, I then installed network manager again since I was back online and able to do so. I have both now and feel more secure.

The first time a power line crash removed network manger and left me offline, I had to do a complete new installation as I did not know about wicd. I'm glad to have learned of it this time, and glad it is easy to install from the root directory.