0

To get right to the point:

  1. I was having my internet cut in and out yesterday and low speeds when connected

  2. Found the post on here about this issue

  3. Followed the commands to uninstall and reinstall network manager

  4. Being that I wasn’t forewarned to not run those commands if the internet was currently out, after uninstalling (purging) network manager, I was not and have since not been able to reinstall it thus not able to connect to the internet

  5. I tried asking for solutions in same post but it was deleted so I started this post

  6. I have since tried at least a dozen commands to try to connect to wi-fi manually to no avail.

  7. I tried running Ubuntu live from my USB and after connecting to the internet, I downloaded, and tried saving the network-manager.deb file to the hard drive but after mounting the drive (it’s encrypted through LUKS), it still wouldn’t let me save it.

  8. I then tried downloading the network manager on another computer to a USB. However, when I go to copy the file from my USB to to the proper folder while back in Ubuntu, it gives me an error and says permission denied. If I can figure out how to copy the network manager file, it should allow me to finally install it.

Note: I am able to connect to the internet on my other devices so I know it isn’t an issue with my WiFi.

I would greatly appreciate your help. I’ve been trying to resolve this for over three hours now but since none of the suggestions I’ve tried from this and other sites, I have no other option but to post this question.

Thanks in advance guys

  • Normally, using apt's --reinstall does not require a network connection, since the deb package is already cached locally. A network connection is required, however, if the local cache has been (unwisely) deleted. I don't see how many folks could be 'forewarned' - by the time they reach for apt, they are already well down the path of folly. – user535733 May 01 '19 at 14:14

1 Answers1

1

To get internet back (wifi), do these commands. (I am assuming Network Manager is actually uninstalled).

1.) Ensure that the wifi is actually enabled (no Airplane mode, or physically disabled wifi) sudo rfkill list

You should get a reply like:

  0: acer-wireless: Wireless LAN
          Soft blocked: no
          Hard blocked: no
  1: acer-bluetooth: Bluetooth
          Soft blocked: no
          Hard blocked: no
  2: phy0: Wireless LAN
          Soft blocked: no
          Hard blocked: no
  3: hci0: Bluetooth
          Soft blocked: no
          Hard blocked: no

Make sure all wireless related are not blocked.

2.) Next, find out your WiFi device name (wlan0 or wlp0s0, etc.)

Run the command iwconfig

This is the kind of output you should get.

  $ iwconfig 
  lo        no wireless extensions.

  wlp2s0    IEEE 802.11bgn  ESSID:"WiFiAPName"  
            Mode:Managed  Frequency:2.432 GHz  Access Point: 00:22:75:6C:BE:74   
            Bit Rate=36 Mb/s   Tx-Power=16 dBm   
            Retry short limit:7   RTS thr:off   Fragment thr:off
            Power Management:off
            Link Quality=69/70  Signal level=-41 dBm  
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
            Tx excessive retries:0  Invalid misc:1772   Missed beacon:0

  enp1s0f1  no wireless extensions.

The wireless interface name in this case is wlp2s0.

3.) Create an wpa_supplicant.conf file for your network (the one you want to connect to).

This assumes that you know your WiFi name, the password for it, and that the WiFi station is up and running and within range.

Use command wpa_passphrase to create the file.

  wpa_passphrase my-ESSID my-passphrase | sudo tee ~/my_wpa_supplicant.conf

This will create a wpa_supplicant.conf file in your $HOME folder.

However, if you do not have the wpa_passphrase installed on your system (many don't), create a file my_wpa_supplicant.conf in your home folder, and using the editor of your choice (vim/nano/emacs/gedit/kate) write into the file:

network={
        ssid="my-ESSID"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="my-passphrase"
} 

In this case, my-ESSID is your WiFi name, my-passphrase is your WiFi password.

4.) With the config file, connect to the WiFi as:

  sudo wpa_supplicant -c ~/wpa_supplicant.conf -i wlp2s0

Replace wlp2s0 with your wiFi interface name (which you found out in Step 2, with iwconfig).
The ~/wpa_supplicant.conf is the path to the config file you had created in the last step.

That's it really, wpa_supplicant will run in foreground by default and inform you of the current connection status. As long as this terminal (on which you issues the command) is running, you have connection to WiFi.

Confirm by running route -n and ping commands (in a separate terminal).

   ping 8.8.8.8
  • Thanks for the quick response. I tried running the wpa_supplicant command but it said command not found. How do I create a wpa_supplicsnt file in my $home folder? I am completely new to Linux so it’s all new to me. – NewBuntu May 02 '19 at 19:50
  • Just open an editor (any editor, including gedit), copy paste the network= thing (in its entirety, with changes made for your network) there. Then save the file in your home folder as wpa_supplicant.conf – Domo N Car May 02 '19 at 20:05
  • @NewBuntu If you don't have the wpa_supplicant command, then you're in trouble. You need the wpasupplicant package. Download from https://packages.ubuntu.com/search?keywords=wpasupplicant for your ubuntu version. – Domo N Car May 02 '19 at 20:08
  • I was able to create one but when I run it, it just keeps saying CTRL - EVENT - SCAN - FAILED – NewBuntu May 02 '19 at 21:06
  • To be more precise, it says successfully initialized wpa_supplicant then it says trying to associate, then it says associated followed by a string of numbers, then CTRL- EVENT-SUBNET-STATUS UPDATE Status=0, then CTRL-EVENT-DISCONNECTED, CTRL-EVENT-REGDOM-CHANGE and then CTRL-EVENT-SCAN-FAILED – NewBuntu May 02 '19 at 21:12
  • I’m about to give up here. It’s been over 13 hours combined trying to fix this issue. Nothing is working. I’ve exhausted at least 10 different install attempts and well over 30 commands. Nothing works. I tried to save the files to a flash drive from another computer but it wouldn’t copy over to my hard drive. I’m most likely going to have to just reinstall Ubuntu and start from zero again. – NewBuntu May 03 '19 at 01:31