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?

  • 4
    To those following the answers here and getting a message like "Connection X is not available on the device wlan0 at this time" while attempting to connect to hidden network: Your wifi device probably does not support master mode (cannot be an AP). To check, see help.ubuntu.com/community/WifiDocs/…
    – akom
    Commented Jul 11, 2016 at 17:47

4 Answers 4


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:

  1. First disable WiFi and connect your laptop/PC to a wired network.

  2. Click Edit Connections on the network menu. Then click Add on the network connections to add a new connection:

  3. Choose WiFi from the drop-down box in the next window and click Create button.

  4. When the editing WiFi hotspot window pops up, follow these steps:

    1. Type in connection name, SSID, select Hotspot mode.

    2. In Wifi Security tab, select WPA & WPA2 Personal and type in a password.

    3. In IPv4 Settings tab, select mode “Share to other computers”

      Click link for example

  5. 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.

    Click link for example

  6. 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.

  • 12
    I tried this, but when I am connecting through hidden wifi network it says: Failed to activate connection: (2) Connection 'wifihotspot' is not available on the device wlp9s0 at this time. how to tackle this ? I was using ap_hostpot before upgrading to 16.04 without any trouble.
    – Kt Hafis
    Commented Apr 30, 2016 at 12:28
  • 2
    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.
    – Andy
    Commented Apr 30, 2016 at 19:25
  • 4
    didn't work for me after even reboot, got this error (2) Connection 'k-hotspot' is not available on the device wlp3s0 at this time. Commented Aug 29, 2016 at 11:39
  • 1
    I got the same errors as the above users: Failed to activate connection, (2) Connection 'wifishare' is not available on the device wlp5s0 at this time. Commented Dec 30, 2016 at 0:30
  • 3
    I can successfully create the Hotspot, but other than my android phone, no other devices can connect to it. My Ubuntu laptop (as well as other phones) ask for the password and then just hang there for a couple of seconds before asking for it again. Anyone know what's the problem?
    – alonso s
    Commented Apr 6, 2018 at 2:21

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.

  • You may need to install dnsmasq.
    – Richard
    Commented Oct 26, 2017 at 17:02

I use create_ap

Check the GitHub page for details:

This script creates a NATed or Bridged WiFi Access Point.

I usually use this two options :

  1. For Bridged Internet sharing : share your Ethernet or modem internet via WiFi

    create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase

    where wlan0 is your WiFi interface, and eth0 is the interface that offer internet ( Ethernet or modem).

  2. 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
  • create_ap does not work for 16.04 on my PC.
    – Indian
    Commented Apr 27, 2016 at 13:52
  • could you please post comments to use it in terminal ? I am not a familiar to do it, and always get confused. thanks in advance
    – Kt Hafis
    Commented Apr 30, 2016 at 12:31
  • 2
    when I gave the comment, it says: 'wlan0' is not a WiFi interface I changed the command believing wifi interface must be 'wlp9s0' as it shown somewhere, but the response is: ERROR: Your adapter does not support AP (master) mode anything can be done ?
    – Kt Hafis
    Commented May 1, 2016 at 5:40
  • Yes you should use your interface name instead of wlan0, the second option require that the adapter supports this feature, my be it's not the case. try the first one Commented May 2, 2016 at 0:47
  • Could somebody make this run on Ubuntu 16.04?
    – Filbuntu
    Commented Jun 21, 2016 at 1:54

I also had this issue for a while, to solve this issue I did the following steps:

  1. Install packages:

    sudo apt-get install network-manager-pptp-gnome

    sudo apt-get install dnsmasq-base

  2. Creating a wifi-hotspot Edit Connection -> Select + and add wifi connection, and give mode as Hostport If you need you may provide password

  3. Restart the network manager

    sudo service network-manager restart

  4. Start the Hostport

    nmcli connection up <name of your hostport>

  • Thanks, this works for me too. Commented May 15, 2022 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .