1

I uninstalled network-manager from my Ubuntu-gnome, so I don't have internet connection. How can I reistall it.

3 Answers 3

2

You dont have NM but you have network card. First

ifconfig

to see interface name. To setup eth0 card use this command

sudo ifconfig eth0 xxx.xxx.xxx.xxx netmask zzz.zzz.zzz.zzz

after that add default gw

sudo route add default gw yyy.yyy.yyy.yyy

Try now to install NM with software manager Also you can configure network card with editing /etc/network/interfaces

sudo nano /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address xxx.xxx.xxx.xxx
        netmask yyy.yyy.yyy.yyy
        gateway vvv.vvv.vvv.vvv

Configure dns /etc/resolv.conf

sudo nano /etc/resolv.conf

nameserver xxx.xxx.xxx.xxx
nameserver yyy.yyy.yyy.yyy

Manually restart your network interface with the new settings:

sudo /etc/init.d/networking restart
3
  • The sequence would be a bit different if the interface is wireless. Is it wireless @dinymate ?
    – chili555
    Apr 7, 2015 at 13:36
  • Not correct, @2707974 If it is wireless, he must declare the SSID and encryption key.
    – chili555
    Apr 7, 2015 at 18:25
  • You are right. Manual for cli configuration of wlan is here
    – 2707974
    Apr 8, 2015 at 6:02
1

You can set up your network using the following command:

sudo ifconfig <Interface_name> <IP_address> netmask <Netmask> broadcast <Broadcast_IP>

For example:

sudo ifconfig eth0 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255

To set up the gateway:

sudo route add default gw <IP_of_gateway>

for example:

sudo route add default gw 192.168.1.1

After that your network should be Up although you need DNS to access sites via hostnames:

printf "\nnameserver <DNS_IP>" | sudo tee -a /etc/resolv.conf

For example:

printf "\nnameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf

Note that all these changes are temporary, you can now install network-manager and start setting up the network permanently. Actually you don't need network-manager at all to save your network configurations, you can use save the contents in /etc/network/interfaces file to be read by ifupdown upon boot so the network will be configured properly.

If you want to install NetworkManager after setting up the network, run the command:

sudo apt-get install network-manager
4
  • -1 op said - I don't have Internet connection, apt requires Internet connection
    – Mark Kirby
    Apr 7, 2015 at 12:04
  • @markkirby: Actually i was on my way editing it....
    – heemayl
    Apr 7, 2015 at 12:04
  • Ok I will be happy to change the vote
    – Mark Kirby
    Apr 7, 2015 at 12:07
  • @markkirby: check the edits
    – heemayl
    Apr 7, 2015 at 12:18
0

You can find the package here http://packages.ubuntu.com/trusty/network-manager

It is source only though so you need to build it you self

Please see the following link on building from source as it is too much to copy here https://help.ubuntu.com/community/CompilingEasyHowTo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .