I uninstalled network-manager from my Ubuntu-gnome, so I don't have internet connection. How can I reistall it.
3 Answers
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
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
-
-1 op said - I don't have Internet connection, apt requires Internet connection Apr 7, 2015 at 12:04
-
-
-
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