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. However sharing Internet connection with android devices could be a problem since it requires an infrastructure ad-hoc.
Here is how to setup ad-hoc on Ubuntu for sharing Internet connection with android devices.
Step 1:
Press Alt+Ctrl+T to open terminal. When the terminal opens type following command one by one.
Step 3:
Once done with the configuration all we need to do is start the hotspot. Enter following command to start hotspot.
Now your android phone should be able to detect the wifi hotspot.
To stop hotspot enter following command
Here is how to setup ad-hoc on Ubuntu for sharing Internet connection with android devices.
Step 1:
Press Alt+Ctrl+T to open terminal. When the terminal opens type following command one by one.
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get 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
Step 2:
Once done with installing ap-hotspot we need to configure our wireless connection. Enter the following command for configuration
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.Step 3:
Once done with the configuration all we need to do is start the hotspot. Enter following command to start hotspot.
sudo ap-hotspot start
Now your android phone should be able to detect the wifi hotspot.
To stop hotspot enter following command
sudo ap-hotspot stop
Note: If you are getting "Access Point Mode is not supported by this device" error try updating to ubuntu 14.04 ;)