0

I saw many howto's for creating a hotspot in Ubuntu 14.04 (in AP mode) using system settings. They are perfect.

How do I create a hotspot using only command line however?

I tried messing around with eth0 and eth1 but I did not get anything at all.

(The same question has been asked some months ago, but it was not answered).

2
  • Have you looked at nmcli
    – Jean-Marie
    Jun 12, 2016 at 18:21
  • I don't think it is a duplicate with the question that was marked. I can answer the one that was marked ... mine is different: command line only.
    – hartmut
    Jun 13, 2016 at 8:57

1 Answer 1

0

You may use ap-hotspot to create hotspot on CLI

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

 sudo apt-get install ap-hotspot

You are using Ubuntu 14.04 so there is a bug in hostapd.You need to downgrade it if you need to work on ap-hotspot

Step:1

sudo apt-get remove hostapd

Step: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.

If you use 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

If you use 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

Step:3

Configure your ap-hotspot if it installed

sudo ap-hotspot configure

Step:4

To start your hotspot

 sudo ap-hotspot start

To stop your hotspot

 sudo ap-hotspot stop
1
  • Thank you. When entering sudo ap-hotspot configure in step 3 it tells me: "ap-hotspot command not found" . The previous steps seem to work well tough. Any hint please?
    – hartmut
    Jun 20, 2016 at 9:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.