1

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
  • 11

2 Answers2

2

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
  • 129
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
  • 1
  • 3