Create Wifi Hotspot in Ubuntu Laptop For Android Phones

Last updated on October 19th, 2014

If you have a single wired Internet connection, you can easily setup an ad-hoc wireless network with Ubuntu and share the Internet connection among multiple devices. Unfortunately, some devices including Android & Windows Phones may not support ad-hoc wireless networks.

So this tutorial is going to show you how to turn your Ubuntu laptop into a wireless access point in another way with Android phones support.

[ac-box style=”alert”]UPDATE 2: Seems that Ap-hotspot is not working good on Ubuntu 14.04, please try this post using KDE’s network manager.

Or use the default Network Manager with a little hack.[/ac-box]

To get started, press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run the commands below one by one to install ap-hotspot.

Ap-hotspot is an open-source project that automatically creates an infrastructure (Access Point mode) wireless hotspot in Ubuntu that should work with Android and Windows Phone devices

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install ap-hotspot

Supports for Ubuntu 13.10, Ubuntu 13.04, Ubuntu 12.10, Ubuntu 12.04 and Ubuntu 14.04. download & install the ap-hotspot deb for saucy at this page.

For Ubuntu 14.04, due to bug you need to downgrade hostapd to make ap-hotspot work.

  1. First uninstall the buggy hostapd in Ubuntu 14.04 via:
    sudo apt-get remove hostapd
  2. Copy and paste the command below into terminal that matches your OS type – check out via System Setting -> Details – and hit run to download, install, and hold the old version of hostapd.

    While running the commands below, type in your user password in terminal when prompt.

    For 64-bit system:

    cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb && sudo dpkg -i hostapd*.deb && sudo apt-mark hold hostapd

    For 32-bit system:

    cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb && sudo dpkg -i hostapd*.deb && sudo apt-mark hold hostapd

Once installed, execute below command to configure your wifi hotspot:

sudo ap-hotspot configure

It will detect the wired & wireless interfaces and ask you to confirm that if they are correct (run ifconfig if you’re not sure). Then you’ll be asked to enter a wifi hotspot name and setup a password.

Finally start the wireless hotspot via:

sudo ap-hotspot start

Now you’re able to connect to wifi hotspot via your Android phone!

To stop the wireless hotspot, execute this command in Ubuntu terminal:

sudo ap-hotspot stop

UPDATE: Please report issues at: https://github.com/hotice/AP-Hotspot/.

Tip: For the error “Access Point Mode is not supported by this device”, you may take a look at this page.