N
Fame Burst

How to turn your ubuntu laptop into a wireless access point

Author

Emma Payne

Updated on March 29, 2026

Chris Hoffman is Editor-in-Chief of How-To Geek. He’s written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times, been interviewed as a technology expert on TV stations like Miami’s NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read nearly one billion times—and that’s just here at How-To Geek. Read more.

How to turn your ubuntu laptop into a wireless access point

If you have a single wired Internet connection – say, in a hotel room – you can create an ad-hoc wireless network with Ubuntu and share the Internet connection among multiple devices. Ubuntu includes an easy, graphical setup tool.

Unfortunately, there are some limitations. Some devices may not support ad-hoc wireless networks and Ubuntu can only create wireless hotspots with weak WEP encryption, not strong WPA encryption.

Setup

To get started, click the gear icon on the panel and select System Settings.

How to turn your ubuntu laptop into a wireless access point

Select the Network control panel in Ubuntu’s System Settings window. You can also set up a wireless hotspot by clicking the network menu and selecting Edit Network Connections, but that setup process is more complicated.

How to turn your ubuntu laptop into a wireless access point

If you want to share an Internet connection wirelessly, you’ll have to connect to it with a wired connection. You can’t share a Wi-Fi network – when you create a Wi-Fi hotspot, you’ll be disconnected from your current wireless network.

How to turn your ubuntu laptop into a wireless access point

To create a hotspot, select the Wireless network option and click the Use as Hotspot button at the bottom of the window.

How to turn your ubuntu laptop into a wireless access point

You’ll be disconnected from your existing network. You can disable the hotspot later by clicking the Stop Hotspot button in this window or by selecting another wireless network from the network menu on Ubuntu’s panel.

How to turn your ubuntu laptop into a wireless access point

After you click Create Hotspot, you’ll see an notification pop up that indicates your laptop’s wireless radio is now being used as an ad-hoc access point. You should be able to connect from other devices using the default network name – “ubuntu” – and the security key displayed in the Network window. However, you can also click the Options button to customize your wireless hotspot.

How to turn your ubuntu laptop into a wireless access point

From the wireless tab, you can set a custom name for your wireless network using the SSID field. You can also modify other wireless settings from here. The Connect Automatically check box should allow you to use the hotspot as your default wireless network – when you start your computer, Ubuntu will create the hotspot instead of connecting to an existing wireless network.

How to turn your ubuntu laptop into a wireless access point

From the Wireless Security tab, you can change your security key and method. Unfortunately, WPA encryption does not appear to be an option here, so you’ll have to stick with the weaker WEP encryption.

How to turn your ubuntu laptop into a wireless access point

The “Shared to other computers” option on the IPv4 Settings tab tells Ubuntu to share your Internet connection with other computers connected to the hotspot.

How to turn your ubuntu laptop into a wireless access point

Even if you don’t have a wireless Internet connection available to share, you can network computers together and communicate between them – for example, to share files.

We’ve previously written about turning computers running Windows 7 and Windows 8 into wireless hotspots.

How to setup an Access Point (AP) mode Wi-Fi Hotspot?

Point to be noted: Wireless access points aren’t the same as ad hoc networks. They differ significantly. In short, ad hoc networks aren’t supported on newer devices and most Android, Windows Phone and Blackberry devices (and maybe iOS devices too), whereas AP mode Wi-Fi hotspots are. To get an idea about AP mode hotspots, ad hoc networks and their difference, refer to this Wikipedia page.

6 Answers 6

With GNOME 3.36 desktop on Ubuntu 20.04 LTS, WiFi tethering has become easier than ever!😃 Just open the Wi-Fi Settings from system menu.

How to turn your ubuntu laptop into a wireless access point

In the Wi-Fi Settings window, click on the drop-down menu on top right and select Turn On Wi-Fi Hotspot option.

How to turn your ubuntu laptop into a wireless access point

A dialog will show up, where you can set the name and password for your new hotspot.

How to turn your ubuntu laptop into a wireless access point

If your hotspot gets created successfully, Wi-Fi Settings would now show a section with a toggle for the newly created hotspot.

How to turn your ubuntu laptop into a wireless access point

A hotspot indicator would appear on the top bar as well, showing it’s active status.

How to turn your ubuntu laptop into a wireless access point

If you need to edit the hotspot and do more advanced configuration, follow instructions similar to that of Ubuntu 18.04 LTS described below.

GNOME 3.28 desktop on Ubuntu 18.04 LTS makes it easy to start a WiFi hotspot. Open the Wi-Fi Settings from system menu.

How to turn your ubuntu laptop into a wireless access point

And then from the hamburger menu on Wi-Fi Settings, select Turn On Wi-Fi Hotspot. That’s it, your WiFi access point is now up and running!

How to turn your ubuntu laptop into a wireless access point

Advanced Stuff

If you wanna change the name (SSID) and password of your access point, open Network Connections editor tool by entering the following in either Terminal or Alt + F2 :

How to turn your ubuntu laptop into a wireless access point

Double click on Hotspot and the editor window’ll appear. You may change SSID and password from the Wi-Fi and Wi-Fi Security tabs.

How to turn your ubuntu laptop into a wireless access point How to turn your ubuntu laptop into a wireless access point

Step 1: Test whether your WiFi card supports AP mode

Follow the Access Point mode check in the answer provided by Web-E

Step 2: Start the built-in Hotspot

Network comes with a built-in option to start an Ad-Hoc hotspot. So, let’s use this first, so that it could be configured and converted to an Access Point mode hotspot in the next step.

Search Network in Dash and open it.

How to turn your ubuntu laptop into a wireless access point

Press the “Use as Hotspot” button and Network Manager will start an AdHoc hotspot.

How to turn your ubuntu laptop into a wireless access point

But that’s not what we want, is it? 😉 Stop the hotspot.

Step 3: Configure Hotspot

Open Network Connections from Dash or ‘Edit Connections‘ from Network Indicator menu.

How to turn your ubuntu laptop into a wireless access point

In the Network Connections window that appears, there’ll be a connection named Hotspot listed under the WiFi section. Select it and click the ‘Edit‘ button.

How to turn your ubuntu laptop into a wireless access point

In the window that appears, you may edit the broadcast name (SSID) of your hotspot. Now comes the most important part of this configuration: change mode to ‘Hotspot‘, which’ll finally convert the hotspot to Access Point mode. Users of Ubuntu 14.04 LTS’ll notice that this mode isn’t available to choose from the dropdown. Don’t get disappointed, as you can still do it via an extra Step 3.1.

How to turn your ubuntu laptop into a wireless access point

Save and open the same Editing Hotspot window again. This time go to the WiFi Security tab for selecting password type. If you don’t want to set a password, you can set security to none and thus create an open hotspot. If you’re setting a password, it’s recommended to change the security key from WEP to WPA2. Once the configurations are done, don’t forget to save it so that the changes could apply.

In the General tab, make sure that “Automatically connect to this network when it is available” is turned off (unless you only ever use your wifi as a hotspot). Otherwise, since the hotspot is always available, you won’t see the menu entries to connect to other wifi networks in the network manager applet.

Step 3.1: Only for Ubuntu 14.04 LTS

Since Ubuntu 14.04 LTS’s Networks ( network-manager v9.8.8 ) doesn’t offer a graphical setting to select AP mode, we’ll manually edit it’s config file to force the conversion. Copy the following command, then press Alt + F2 or open Terminal and paste it there:

Type your password in the authorization dialog that appears and the configuration file will be opened in text editor. Find a line beginning with mode= , change it to mode=ap and save the file.

Step 4: Start Hotspot

Now that the configuration part is over, we’ll start the hotspot. Click on ‘Create New Wi-Fi Network‘ from Network Indicator menu.

How to turn your ubuntu laptop into a wireless access point

In the window that appears, click on the connection drop-down button and change “New. ” to “Hotspot”. Press the “Create” button and your hotspot will start running. From now on, whenever you need a hotspot, you just need to do this step i.e Step 4 only.

How to turn your ubuntu laptop into a wireless access point

K.. That’s all folks! Have fun with your new Access Point 😊

How to turn your ubuntu laptop into a wireless access point

With the release of Ubuntu’s latest operating system, Ubuntu 18.04 LTS, creating a hotspot is easier than ever before. With a wifi hotspot, you can let other wireless devices such as smartphones and televisions etc. make use of your computer’s internet connection.

This tutorial describes the simple steps of turning your Ubuntu into a Wireless Access Point. We are running this tutorial on a device with network chip that supports connecting to two wireless devices at the same time. If your wireless chip does not support this functionality, you will have to use your wired internet connection as a hotspot for your Ubuntu system.

Turn on Wi-Fi Hotspot on Ubuntu 18.04

Please follow these steps to turn your Ubuntu system into a wifi hotspot:

Open the Settings utility through Ubuntu Dash as follows:

How to turn your ubuntu laptop into a wireless access point

Click the downward arrow located at the top-right corner of your Ubuntu screen and then click the settings icon located at the left corner as follows:

How to turn your ubuntu laptop into a wireless access point

The Settings dialog will open, displaying the Wi-Fi tab opened by default. In the left panel, you will be able to see the available wifi networks, including the one you are connected to:

How to turn your ubuntu laptop into a wireless access point

From the list of Visible Networks, click the one you want to use for Wi-Fi hotspot and then click the options button as displayed in the following image:

How to turn your ubuntu laptop into a wireless access point

Select the Turn On Wi-Fi Hotspot option.

The following dialog will open, asking you to reconfirm turning on the hotspot:

How to turn your ubuntu laptop into a wireless access point

Select the Turn On Option if you want to proceed.

You will now be able to view the newly set-up Wi-Fi Hotspot under the list of visible networks as follows:

How to turn your ubuntu laptop into a wireless access point

Your wireless device will now show “Linux” in the available list of wifi networks. You can connect to this network by using the password displayed in the above Wi-Fi panel.

Disconnecting the Wi-Fi Hotspot

If you wish to discontinue using your system as a wi-fi hotspot, please follow these steps:

Open the Settings utility through Ubuntu Dash as follows:

How to turn your ubuntu laptop into a wireless access point

Turn the Wi-Fi Hotspot button off as follows:

How to turn your ubuntu laptop into a wireless access point

Please re-confirm if you want to stop the hotspot by clicking the Stop Hotspot button; this will also disconnect all the users currently connected to the Linux network

Click the downward arrow located at the top-right corner of your Ubuntu screen and then click the Turn Off option under the active hotspot entry as follows:

How to turn your ubuntu laptop into a wireless access point

You active hotspot will be disconnected.

As you have seen, Ubuntu has now made it extremely simple to turn your system into a Wi-Fi hotspot so the people around you can use your internet connection to connect their smart devices to the internet,

  • ← Copying and Pasting Text onto the Linux Terminal
  • Some Common Ubuntu Display Managers and How to Switch Between Them →

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

This is a guide to turn your old laptop into an access point, using Ubuntu or Debian as your operating system.

We are assuming your laptop have only one wireless card installed, if you have an extra usb wireless adapter during performing the steps in this guide, you may need to do extra steps to not apply the wrong settings to the wrong device.

Step 1

Run everything from here as root:

Install necessary tools:

apt-get install iw hostapd bridge-utils

Step 2

First you need to find whether your wireless card driver support running in access point mode.
Run this to check for ability to run in AP mode:

iw phy0 list | less

Scroll until you see this section: (click ‘q’ to finish scrolling, and return to terminal)

Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor * mesh point software interface modes (can always be added): * AP/VLAN * monitor

The line saying (* AP) means that we it is supported, if there is no AP under “Supported interface modes”, then you might try installing a different driver for your wireless device.

Step 3

Find out the name of your wireless device using

You will get an output like this:

wlan0 IEEE 802.11bg Mode:Master Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:on lo no wireless extensions. eth0 no wireless extensions.

The name we are looking for is ‘wlan0’

Step 4

Stop the default network manager that comes with ubuntu/mint/debian, that will try to override some of our new settings on every boot:

echo manual > /etc/init/network-manager.override

Set the network configuration manually

Copy the following:

auto lo iface lo inet loopback iface eth0 inet manual auto br0 iface br0 inet static address 192.168.1.2 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.123.255 gateway 192.168.1.1 bridge_ports eth0

The ip “address” above is the address your computer will have, the ip should be chosen in a range outside of the ip addresses range assigned by the router’s DHCP, so, we are here assuming the router uses a DHCP range like for example 192.168.1.128-192.168.1.254

The ip “gateway” should be your ip of the router or modem providing the internet

Add your own domain name servers:

Copy in it the following line, and if you want, you can also add any other 3rd party dns you prefer, each on a separate line, like ‘8.8.8.8’ or ‘208.67.222.222’

Step 5

Create a network bridge, that will be used to connect the ethernet and the wireless AP through your laptop
and add the ehternet to the bridge

brctl addbr br0 brctl addif br0 eth0

At this point, you should restart you computer to verify that everything is ok, on the next boot, your should have network connectivity.

Try to ping 192.168.1.1 , ping google.com

Step 6

Create a new settings file for your access point,

Copy the following in the file:

interface=wlan0 bridge=br0 driver=nl80211 ssid=your-network-name channel=11 hw_mode=g wme_enabled=1 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=your_secret_password wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP

Step 7

Start the access point to test it:

Using another laptop or phone, you should see the new wireless access point and connect to it and have internet through it.

Step 8

If all went ok, make hostapd start on system startup

Find the line containing DAEMON_CONF, uncomment it and change it to:

Restart to verify that everything is working as expected.

All Tricks in My Poket ☻

How to turn your ubuntu laptop into a wireless access point

If you have a single wired Internet connection – say, in a hotel room – you can create an ad-hoc wireless network with Ubuntu and share the Internet connection among multiple devices. Ubuntu includes an easy, graphical setup tool.

Unfortunately, there are some limitations. Some devices may not support ad-hoc wireless networks and Ubuntu can only create wireless hotspots with weak WEP encryption, not strong WPA encryption.

Setup

To get started, click the gear icon on the panel and select System Settings.

How to turn your ubuntu laptop into a wireless access point

Select the Network control panel in Ubuntu’s System Settings window. You can also set up a wireless hotspot by clicking the network menu and selecting Edit Network Connections, but that setup process is more complicated.

How to turn your ubuntu laptop into a wireless access point

If you want to share an Internet connection wirelessly, you’ll have to connect to it with a wired connection. You can’t share a Wi-Fi network – when you create a Wi-Fi hotspot, you’ll be disconnected from your current wireless network.

How to turn your ubuntu laptop into a wireless access point

To create a hotspot, select the Wireless network option and click the Use as Hotspot button at the bottom of the window.

How to turn your ubuntu laptop into a wireless access point

You’ll be disconnected from your existing network. You can disable the hotspot later by clicking the Stop Hotspot button in this window or by selecting another wireless network from the network menu on Ubuntu’s panel.

How to turn your ubuntu laptop into a wireless access point

After you click Create Hotspot, you’ll see an notification pop up that indicates your laptop’s wireless radio is now being used as an ad-hoc access point. You should be able to connect from other devices using the default network name – “ubuntu” – and the security key displayed in the Network window. However, you can also click the Options button to customize your wireless hotspot.

How to turn your ubuntu laptop into a wireless access point

From the wireless tab, you can set a custom name for your wireless network using the SSID field. You can also modify other wireless settings from here. The Connect Automatically check box should allow you to use the hotspot as your default wireless network – when you start your computer, Ubuntu will create the hotspot instead of connecting to an existing wireless network.

How to turn your ubuntu laptop into a wireless access point

From the Wireless Security tab, you can change your security key and method. Unfortunately, WPA encryption does not appear to be an option here, so you’ll have to stick with the weaker WEP encryption.

How to turn your ubuntu laptop into a wireless access point

The “Shared to other computers” option on the IPv4 Settings tab tells Ubuntu to share your Internet connection with other computers connected to the hotspot.

How to turn your ubuntu laptop into a wireless access point

Even if you don’t have a wireless Internet connection available to share, you can network computers together and communicate between them – for example, to share files.

How to setup an Access Point (AP) mode Wi-Fi Hotspot?

Point to be noted: Wireless access points aren’t the same as ad hoc networks. They differ significantly. In short, ad hoc networks aren’t supported on newer devices and most Android, Windows Phone and Blackberry devices (and maybe iOS devices too), whereas AP mode Wi-Fi hotspots are. To get an idea about AP mode hotspots, ad hoc networks and their difference, refer to this Wikipedia page.

6 Answers 6

With GNOME 3.36 desktop on Ubuntu 20.04 LTS, WiFi tethering has become easier than ever!😃 Just open the Wi-Fi Settings from system menu.

How to turn your ubuntu laptop into a wireless access point

In the Wi-Fi Settings window, click on the drop-down menu on top right and select Turn On Wi-Fi Hotspot option.

How to turn your ubuntu laptop into a wireless access point

A dialog will show up, where you can set the name and password for your new hotspot.

How to turn your ubuntu laptop into a wireless access point

If your hotspot gets created successfully, Wi-Fi Settings would now show a section with a toggle for the newly created hotspot.

How to turn your ubuntu laptop into a wireless access point

A hotspot indicator would appear on the top bar as well, showing it’s active status.

How to turn your ubuntu laptop into a wireless access point

If you need to edit the hotspot and do more advanced configuration, follow instructions similar to that of Ubuntu 18.04 LTS described below.

GNOME 3.28 desktop on Ubuntu 18.04 LTS makes it easy to start a WiFi hotspot. Open the Wi-Fi Settings from system menu.

How to turn your ubuntu laptop into a wireless access point

And then from the hamburger menu on Wi-Fi Settings, select Turn On Wi-Fi Hotspot. That’s it, your WiFi access point is now up and running!

How to turn your ubuntu laptop into a wireless access point

Advanced Stuff

If you wanna change the name (SSID) and password of your access point, open Network Connections editor tool by entering the following in either Terminal or Alt + F2 :

How to turn your ubuntu laptop into a wireless access point

Double click on Hotspot and the editor window’ll appear. You may change SSID and password from the Wi-Fi and Wi-Fi Security tabs.

How to turn your ubuntu laptop into a wireless access point How to turn your ubuntu laptop into a wireless access point

Step 1: Test whether your WiFi card supports AP mode

Follow the Access Point mode check in the answer provided by Web-E

Step 2: Start the built-in Hotspot

Network comes with a built-in option to start an Ad-Hoc hotspot. So, let’s use this first, so that it could be configured and converted to an Access Point mode hotspot in the next step.

Search Network in Dash and open it.

How to turn your ubuntu laptop into a wireless access point

Press the “Use as Hotspot” button and Network Manager will start an AdHoc hotspot.

How to turn your ubuntu laptop into a wireless access point

But that’s not what we want, is it? 😉 Stop the hotspot.

Step 3: Configure Hotspot

Open Network Connections from Dash or ‘Edit Connections‘ from Network Indicator menu.

How to turn your ubuntu laptop into a wireless access point

In the Network Connections window that appears, there’ll be a connection named Hotspot listed under the WiFi section. Select it and click the ‘Edit‘ button.

How to turn your ubuntu laptop into a wireless access point

In the window that appears, you may edit the broadcast name (SSID) of your hotspot. Now comes the most important part of this configuration: change mode to ‘Hotspot‘, which’ll finally convert the hotspot to Access Point mode. Users of Ubuntu 14.04 LTS’ll notice that this mode isn’t available to choose from the dropdown. Don’t get disappointed, as you can still do it via an extra Step 3.1.

How to turn your ubuntu laptop into a wireless access point

Save and open the same Editing Hotspot window again. This time go to the WiFi Security tab for selecting password type. If you don’t want to set a password, you can set security to none and thus create an open hotspot. If you’re setting a password, it’s recommended to change the security key from WEP to WPA2. Once the configurations are done, don’t forget to save it so that the changes could apply.

In the General tab, make sure that “Automatically connect to this network when it is available” is turned off (unless you only ever use your wifi as a hotspot). Otherwise, since the hotspot is always available, you won’t see the menu entries to connect to other wifi networks in the network manager applet.

Step 3.1: Only for Ubuntu 14.04 LTS

Since Ubuntu 14.04 LTS’s Networks ( network-manager v9.8.8 ) doesn’t offer a graphical setting to select AP mode, we’ll manually edit it’s config file to force the conversion. Copy the following command, then press Alt + F2 or open Terminal and paste it there:

Type your password in the authorization dialog that appears and the configuration file will be opened in text editor. Find a line beginning with mode= , change it to mode=ap and save the file.

Step 4: Start Hotspot

Now that the configuration part is over, we’ll start the hotspot. Click on ‘Create New Wi-Fi Network‘ from Network Indicator menu.

How to turn your ubuntu laptop into a wireless access point

In the window that appears, click on the connection drop-down button and change “New. ” to “Hotspot”. Press the “Create” button and your hotspot will start running. From now on, whenever you need a hotspot, you just need to do this step i.e Step 4 only.

How to turn your ubuntu laptop into a wireless access point

K.. That’s all folks! Have fun with your new Access Point 😊

This tutorial is trying to help those who want to create AP wifi hotspot in Ubuntu Laptop but stuck at “Wifi Hotspot: Access Point Mode Is Not Supported By This Device” error message.

I’ve written three tutorials about how to turn Ubuntu Laptop into a wifi hotspot for Android, and Windows phones. Access Point Mode does not support issue is one of the most asked questions from my readers. Below I will show how to fix it using Broadcom bcm4313 as example.

1. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to tell your wireless chip information:

In my case, it outputs:

02:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)

The chip id is BCM4313, manufactured by Broadcom.

2. Check the below table. Find out the driver that works for your wireless adapter and support AP mode.

For Broadcom, there are three drivers that support AP mode, but only brcmsmac (check link page for supported chips) support wifi chip BCM4313.

DriverManufacturerSupport AP Mode
adm8211ADMtek/Infineonno
airoAironet/Cisco?
ar5523Atherosno
at76c50x-usbAtmelno
ath5kAtherosyes
ath6klAtherosno
ath9kAtherosyes
ath9k_htcAtherosyes
ath10kAtheros?
atmelAtmel?
b43Broadcomyes
b43legacyBroadcomyes
brcmfmacBroadcomno
brcmsmacBroadcomyes
carl9170ZyDAS/Atherosyes
cw1200ST-Ericssonyes
hostapIntersil/Conexant?
ipw2100Intelno
ipw2200Intelno
iwlegacyIntelno
iwlwifiIntelyes
libertasMarvellno
libertas_tfMarvellyes
mac80211_hwsimJouniyes
mwifiexMarvellyes
mwl8kMarvellyes
orinocoAgere/Intersil/Symbolno
p54pciIntersil/Conexantyes
p54spiConexant/ST-NXPyes
p54usbIntersil/Conexantyes
rndis_wlanBroadcomno
rt61pciRalinkyes
rt73usbRalinkyes
rt2400pciRalinkyes
rt2500pciRalinkyes
rt2500usbRalinkyes
rt2800pciRalinkyes
rt2800usbRalinkyes
vt6656VIAyes
wil6210Atherosyes
wl12xxTexas Instrumentsyes
zd1211rwZyDAS/Atherosyes

3. Find out current driver running on your wifi adapter by running below command:

If need, install ethtool from Ubuntu Software Center. The command outputs something like this:

So in my case I need to switch wireless driver from wl0 to brcmsmac to get AP mode support.

4. Install brcmsmac driver.

5. After installed the new driver, try to enable it from Additional Drivers utility (search & open it from the Unity Dash), and finally restart.

6. Finally run:

Below section tells you AP mode is support now:

Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor

For some wireless chips, run below command instead to check out supported interface modes:

7 To make this work at next boot, go to /etc/modprobe.d directory in terminal:

Or in your file browser (open as root), find out and remove the line blacklist brcmsmac that blacklist the driver in any file in that directory.

How to turn your ubuntu laptop into a wireless access point

WiFi is nowadays the most popular way of getting an internet connection, be it at the office, home, restaurants e.t.c. This tutorial is intended to help those who would like to connect WiFi from the terminal on Ubuntu 16.04. It doesn’t matter whether you’re using the Desktop edition or the server edition of Ubuntu.

The only requirements are:

  • Working wireless card
  • Internet connection to install some packages
  • Interactive shell session

There are two common ways you can connect Wireless network from the terminal. These are:

  1. Using iwconfig command
  2. Using wpasupplicant method

Method 1: Using iwconfig command

You can configure your Ubuntu to connect to WiFi by following steps given below. If you don’t know the name of your wifi device, use:

Open the terminal and type ifconfig interface and press Enter.

Byt default, this command just turns your wireless card on. If your wireless card has a different name, replace wlan0 with a correct name. Now that the card is on, you can connect to your WiFi network by specifying its ESSID name:

Replace with the actual name of your access point, and password with the actual security key for the wireless network. If your wireless network does not require a security key, do not enter a key password. Just use:

For the ASCII password, use:

Now confirm that you are connected. You can as well manually request an IPv4 address using.

Then try to check your ip and try to ping outside.

How to turn your ubuntu laptop into a wireless access point

Method 2: Using wpasupplicant

wpa_supplicant is a cross-platform supplicant with support for WEP, WPA, and WPA2 (IEEE 802.11i / RSN (Robust Secure Network)). It is suitable for desktops, laptops, and embedded systems. For this method, you first need to install wpasupplicant package which includes the main program wpa_supplicant, the passphrase tool wpa_passphrase, and the text front-end wpa_cli

This package will provide a wpa_supplicant command which we’ll use to manage our Wireless network. The file to configure is /etc/wpa_supplicant.conf.

You can as well generate a basic configuration from cli:

Now rescan for available devices:

Make sure you can see the wireless network you intend to connect to. Now start wpa_supplicant with:

Commonly used arguments are:

-B – Fork into the background.
-c filename – Path to a configuration file.
-i interface – Interface to listen on.
-D driver – Optionally specify the driver to be used. For a list of supported drivers see the output of wpa_supplicant -h.
nl80211 is the current standard, but not all wireless chip’s modules support it.

Using wpa_cli

At this point run:

This will present an interactive prompt (>), which has tab completion and descriptions of completed commands. Some important commands to note when working on wpa_cli include:

  • Scan for available access points
  • List available Access points

To associate with MYSSID, add the network, set the credentials and enable it:

For access points with no authentication, use:

Finally, save this network in the configuration file:

To get a DHCP lease, first release whatever leases you’re still holding onto (as root):

And request a new address

You should now have a working internet connection through an access point which you connected from cli. This method is suitable for minimal installation of Ubuntu Distributions or Servers with Wireless card. These methods are easy to script, with more effort you can write a cron job which connects to it at reboot. Thank you for reading our guide on how to connect WiFi from the terminal on Ubuntu 16.04. If you encounter any issues, let us know through the comment section.

MyPublicWiFi is an easy-to-use software that turns your laptop/tablet/PC into a Wi-Fi wireless access point or Multifunctional Hotspot. Anyone nearby can surf the Internet through your sharing. This is also an ideal solution for setting up a temporary Access Point in a hotel room,meeting room,at home or the like. By enabling user authentication, Customers will be redirected to your login page to authenticate with access password or accept the Terms Of Use before getting the Internet access. The MyPblicWiFi-Firewall can be used to restrict user access to specific servers. You can also prevent the use of certain Internet services (e.g. file sharing programs) or block the use of social media networks (e.g. Facebook). MyPublicWiFi turn your PC into an Adblock Router. Advertising blocker are an effective way to save your internet bandwidth and protect the privacy of your user. The Bandwidth Manager helps you to control download and upload rate for your hotspot clients. MyPublicWiFi allows you to record and track all visited url pages on your virtual WiFi-Hotspot. Mypublicwifi allows you to set up port forwarding, is available in 12 languages, can be used without a Internet connection and supports the “Hosted Network” and “WiFi Direct for Windows 10”.

Please support this project and share MyPublicWifi:

Share MyPublicWifi:

Follow MyPublicWifi:

MyPublicWiFi is a freeware program, and can be fully used.