0

I have recently updated the os from version 16.04 to 18.04 LTS. But I can not connect the pc to mobile Hotspot. The wifi is turned on but in the visible networks section no available network is shown. How can I resolve this, please help.

suhani
  • 1

2 Answers2

1

Using nmcli utility(recommended):

We will use the command-line version of Network Manager, nmcli.

Scan for available WiFi networks:

nmcli d wifi list

where d stands for devices.

Connect to your access point, for example, my_wifi:

nmcli d wifi connect my_wifi password <password>

where <password> is the password for the connection.

Using ifconfig:

Check the wireless network device of your card. It usually starts with w like wlan0, but if you're unsure you can just run iwconfig. It will report "no wireless extensions" for non-wireless devices and will display some data for any wireless devices.

Now bring up your wireless card as a root user:

sudo ifconfig wlan0 up

Enter your access point name and password using iwconfig:

iwconfig wlan0 essid <my_wifi> key s:<password>

where is the name of your hotspot name and is its password.

This method works for WEP encrypted connections. For WPA/WPA2 encryptions see this.

sks-15
  • 119
  • I ran the nmcli d wifi list command. It's showing this "IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY". I'm a noob.. Can't really understand what's going on! – suhani Jan 08 '20 at 15:30
  • These are the title headings indicating the info about the wireless networks available. The name of your hotspot must be under SSID column. – sks-15 Jan 08 '20 at 15:35
  • There aren't showing any network available.. – suhani Jan 08 '20 at 17:18
  • Try using sudo ifconfig wlan0 down to shut down and again sudo ifconfig wlan0 up to restart your wifi. Then try again using nmcli. Here wlan0 can be different in your device, use iwconfig to check. – sks-15 Jan 08 '20 at 18:01
0

First let's test, that your connection is working by doing the following from the terminal

ping -c4 8.8.8.8

If that succeeded, you're pinging Google's nameserver's and your connection is fine. You're probably having a misconfigured resolv.conf file which includes the nameserver ip address (nameservers will translate names ie. google.com to ip-addresses).

If you're able to ping, we need to fix your misconfigured resolv.conf file

sudo rm -f /etc/resolv.conf

<p>sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf</p>

Restart networking or reboot

sudo service networking restart

Betro
  • 31
  • Still visible networks aren't showing in wifi section.. – suhani Jan 11 '20 at 08:53
  • Hey I just ran those commands and then the internet just stopped working.. Although wifi is connected.. How do I revert this to previous state?! – suhani Jan 11 '20 at 15:19