Skip to content

Instantly share code, notes, and snippets.

Created May 16, 2021 07:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to reinstall network-manager after accidental removal from terminal
  1. Look up the interface
$ sudo iw dev                            
	Unnamed/non-netdev interface
		wdev 0x3
		addr 98:54:1b:0a:9f:16
		type P2P-device
		txpower 0.00 dBm
	Interface wlp1s0
		ifindex 2
		wdev 0x1
		addr 98:54:1b:0a:9f:15
		ssid Bukur Bari 5G
		type managed
		channel 44 (5220 MHz), width: 80 MHz, center1: 5210 MHz
		txpower 22.00 dBm
		multicast TXQ:
			qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcol	tx-bytes	tx-packets
			0	0	0	0	0	0	0	0		0
  1. Check if it's connected to an SSID
$ sudo iw wlp1s0 link
Not connected.
  1. Optionally scan for your SSID if you don't remember the name
sudo iw wlan0 scan
  1. Edit /etc/network/interfaces and add your interface
sudo vi /etc/network/interfaces

auto wlp1s0
iface wlp1s0 inet dhcp
wpa-essid My Wireless
wpa-psk ****
  1. Restart the interface
ifdown wlp1s0 && sudo ifup -v wlp1s0
  1. See if you can reach google
ping: Temporary failure in name resolution
  1. Add google free DNS server to /etc/resolv.conf
sudo vi /etc/resolv.conf

  1. Restart name resolution service
sudo systemctl restart systemd-resolved.service
  1. Now your network should be up and running. Install network-manager
sudo apt-get install network-manager
  1. Remove the entry from /etc/network/interfaces