2

I accidentally removed the network-manager from my ubuntu 18.04 machine. Now I can't connect to internet. My Wifi and wired connection interface got removed and without internet I cant reinstall them. What would I Do now? Please help!

Here is the output of the command nmcli device

DEVICE  TYPE      STATE      CONNECTION 

wlp3s0  wifi      connected  Room-419   
enp2s0  ethernet  unmanaged  --         
lo      loopback  unmanaged  --         
ppp0    ppp       unmanaged  --   
N0rbert
  • 99,918
  • If you removed just the package, you can download it from a different computer and transfer it via USB. Or you can download it on your phone and use bluetooth. In either case, use sudo dpkg -i *deb to install it. – avisitoritseems Apr 16 '19 at 19:02

1 Answers1

2

You need to connect via Ethernet cable to the network with DHCP server (dynamic IP addresses).

Then run DHCP client manually with sudo dhclient Tab (for auto-completion) and click Enter.
On my system the complete command is sudo dhclient enp0s3

Note: if unsure then run ip link and you will find at least two interfaces here:

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether aa:bb:cc:dd:ee:01 brd ff:ff:ff:ff:ff:ff

and you will find ethernet as enp0s3 (may vary in your case). Ensure that you can ping some server on the net - for example ping ubuntu.com. If you cannot ping - then try with other (third) ethernet interface.

Then install manager to the system:

sudo apt-get install network-manager # for console
sudo apt-get install network-manager-gnome # for GNOME and Unity desktops

and then reboot.

N0rbert
  • 99,918