... with raspbian OS
Written after trying a number of other techniques which failed. (2018-08-31)
By default, because of a bug, Network-Manager doesn't manage wifi. It can be worked around though.
sudo apt install network-manager
sudo apt purge openresolv dhcpcd5
reboot # Mandatory! - Restarting `networking` and `network-manager` services won't work.
Now,
(1) the network manager icon should appear in the top left panel, and
(2) when clicking on it, the Wifi should neither appear as not managed nor as not ready, and you should be able to have internet through wifi.
You may need to go in /etc/NetworkManager/NetworkManager.conf
and change managed=false
to managed=true
[ifupdown]
# managed=false
managed=true
I did it, but I'm sure it was useful.
- Disable WIFI and plug in an internet cable to your laptop so that your Ubuntu is connected to a wired internet and wireless is disabled.
- Right click the Network Icon, then Edit Connections, then click the Add button in the pop-up window.
- Choose Wi-Fi from the drop-down menu when you’re asked to choose a connection type.
- In the next window, do
- Type in a connection name.
- Type in an SSID (I usually use the same as the connection name)
- Select mode: Hotspot
- Device MAC address: select your wireless card from drop-down menu
- Go to Wi-Fi Security tab, select security type WPA & WPA2 Personal and set a password.
- Go to IPv4 Settings tab, from Method drop-down box, select Shared to other computers (it was already correctly set for me).
Validate and re-enable wifi. You should be able to connect to your hotspot wifi network now.
Sources:
Part I - https://raspberrypi.stackexchange.com/a/73816/85733
Note: do not follow step three (sudo ln -sf /lib/systemd/resolv.conf /etc/resolv.conf
)
Part II - https://askubuntu.com/a/786514/185194
The Wifi hotspot worked for me just with step 1-6, (selecting mode: hotspot
at step 4).
Manually changing the connection mode to mode=ap
wasn't needed.