I have upgraded to Ubuntu 16.04. I was using ap-hotspot for wifi hotspot through terminal. It seems ap-hotspot is no more; is there any alternative to create a wifi hotspot? If there is, how can it be installed/used?
In Ubuntu 16.04, there’s a Hotspot mode in the WiFi connection editings page that works directly for Android devices. Here’s the step by step:
First disable WiFi and connect your laptop/PC to a wired network.
Click Edit Connections on the network menu. Then click Add on the network connections to add a new connection:
Choose WiFi from the drop-down box in the next window and click Create button.
When the editing WiFi hotspot window pops up, follow these steps:
After you clicked the save button, enable WiFi and click Connect to Hidden Wi-Fi network and select connect to the connection you just created.
Your network menu should now have the WiFi hotspot connection:
Finally connect to this hotspot from your Android device and enjoy!
After following the guide and before enabling WiFi, restart the Network Manager with:
sudo service network-manager restart
Then enable WiFi and it should connect.
One line solution
First, you can try the one line solution based on the command line interface of NetworkManager.
nmcli device wifi hotspot con-name my-hotspot ssid my-hotspot band bg password jesuisunmotdepasse
if it does not work, you should try the 3 line solution here :
Three lines solution
Here is a solution based on the great command line tool of NetworkManager. It is very straight forward, works with WPA and Access Point Mode (so it works on smartphones), and do not need complex set up. Once it's set up, you can just use the graphical interface to toogle the access point. Just run the following lines to create and enable the access point :
# Create a connection nmcli connection add type wifi ifname '*' con-name my-hotspot autoconnect no ssid my-local-hotspot # Put it in Access Point nmcli connection modify my-hotspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared # Set a WPA password (you should change it) nmcli connection modify my-hotspot 802-11-wireless-security.key-mgmt wpa-psk 802-11-wireless-security.psk myhardpassword # Enable it (run this command each time you want to enable the access point) nmcli connection up my-hotspot
Now connect on your Smartphone... When you do not need it anymore, disable it with :
nmcli connection down my-hotspot
To enable it again, you will just need to use the last command of the 4 lines command. You can note that since the connection also appears in the available connections, you can enable/disable it from graphical interface.
Check the GitHub page for details:
I usually use this two options :
For Bridged Internet sharing : share your Ethernet or modem internet via WiFi
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
wlan0is your WiFi interface, and
eth0is the interface that offer internet ( Ethernet or modem).
Internet sharing from the same WiFi interface : this will allow you to share the internet from the same WiFi interface, useful if you want to re share the WiFi that you're already connected to it to extend WiFi area for example :
create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
I also had this issue for a while, to solve this issue I did the following steps:
sudo apt-get install network-manager-pptp-gnome
sudo apt-get install dnsmasq-base
Creating a wifi-hotspot Edit Connection -> Select + and add wifi connection, and give mode as Hostport If you need you may provide password
Restart the network manager
sudo service network-manager restart
Start the Hostport
nmcli connection up <name of your hostport>