How to turn your ubuntu laptop into a wireless 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,

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

If you have a single wired Internet connection – say, in your small home office – 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.

Setting up Wireless hotspot in Ubuntu

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

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.

If you want to share an Internet connection over the wireless, 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.

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

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.

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.

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.

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.

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.

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 turn your ubuntu laptop into a wireless access point

Ubuntu 18.04 LTS Open the Wi-Fi Settings from system menu. 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 do I make my computer a wireless access point?

  1. Select the Start button, then select Settings > Network & Internet > Mobile hotspot.
  2. For Share my Internet connection from, choose the Internet connection you want to share.
  3. Select Edit > enter a new network name and password > Save.
  4. Turn on Share my Internet connection with other devices.

How can I turn my laptop into a WiFi hotspot Ubuntu?

  1. Open the system menu from the right side of the top bar.
  2. Select Wi-Fi Not Connected or the name of the wireless network to which you are already connected. .
  3. Click Wi-Fi Settings.
  4. Press the menu button in the top-right corner of the window and select Turn On Wi-Fi Hotspot….

Can an access point be wireless?

An access point is a device that creates a wireless local area network, or WLAN, usually in an office or large building. An access point connects to a wired router, switch, or hub via an Ethernet cable, and projects a Wi-Fi signal to a designated area.

Does Ubuntu have hotspot?

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.

Can a laptop be used as an access point?

To do that, use Windows Control Panel to open the Network and Sharing Center window. . Check the Allow other users to connect through this computer’s Internet connection box, and also select Local area connection in the Home networking connection list. This should make your laptop to work as a Wi-Fi access point.

Can I use my PC as a router?

Yes, you can! To set up a Mac or Windows laptop as a wireless router, you can use an app that will do it all for you or set it up manually within the operating system. To make your laptop a hotspot, it needs to use your Wi-Fi adapter. Therefore, you cannot access the Internet using the same device.

How do I enable WiFi on Linux?

To enable or disable the WiFi, right click the network icon in the corner, and click “Enable WiFi” or “Disable WiFi.” When the WiFi adapter is enabled, single click the network icon to select a WiFi network to connect to.

How can I share my PC Internet to mobile Ubuntu?

  1. Connect your pc with the Internet as usual.
  2. Connect your Android phone via USB to your pc.
  3. Activate ‘USB-Tethering’ in Androids ‘Settings’
  4. Create a new wired connection in Ubuntus network manager as described here.
  5. Start Reverse Tether and follow it’s instructions.
  6. Browse on your phone 🙂

How do I setup a hotspot with a wired connection?

  1. Go to Network Icon on top panel -> Edit Connections.
  2. Click the Add button in the pop-up window.
  3. Choose Wi-Fi from the drop-down menu when you’re asked to choose a connection type.
  4. 4.In next window, do: Type in a connection name.

Is mesh WiFi better than access point?

Mesh networks are typically not as fast as a hardwired network. Choosing between a wireless access point and a mesh network may come down to cost of the devices themselves and their installation, and speed or performance you’re hoping to achieve.

Is access point better than router?

The router acts as a hub that sets up a local area network and manages all of the devices and communication in it. An access point, on the other hand, is a sub-device within the local area network that provides another location for devices to connect from and enables more devices to be on the network.

What’s the difference between WiFi extender and access point?

A range extender repeats the wireless signal from your router to expand its reach by creating a second network, while an access point relies on a hardwired connection to your network, rather than simply repeating the existing network.

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 turn your ubuntu laptop into a wireless access pointDo you want to make a computer function as a WLAN base station, so that other computers can use as it as their wifi access point? This can easily be done using the open source software Hostapd and compatible wifi hardware.

This is a useful thing to do if computer acting as a firewall or as a server in the local network, and you want to avoid adding new appliances that all require their own space and cables in you already crowded server closet. Hostapd enables you to have full control of your WLAN access point and also enhances security. By using Hostapd the system will be completely in your control, every line of code can be audited and the source of all software can be verified and all software can be updated easily. It is quite common that active network devices like wifi access points are initially fairly secure small appliances with Linux inside, but over time their vendors don’t provide timely security updates and local administrators don’t care to install them via some clumsy firmware upgrade mechanism. With a proper Linux server admins can easily SSH into it and run upgrades using the familiar and trusted upgrade channels that Linux server distributions provide.

The first step in creating wireless base station with Hostapd is to make sure the WLAN hardware supports running in access point mode. Examples are listed in the hostapd documentation. A good place to shop for WLAN cards with excellent Linux drivers is thinkpenguin.com and in their product descriptions the WLAN card supported operation modes are nicely listed.

The next step is to install the software called Hostapd by Jouni Malinen and others. This is a very widely used software and it most likely is available in your Linux distribution by default. Many of the WLAN router appliances available actually are small Linux computers running hostapd inside, so by running hostapd on a proper Linux computer will give you at least all the features available in the WIFI routers, including advanced authentication and logging.

Our example commands are for Ubuntu 14.04. You need to have access to install hostapd and dnsmasq Dnsmasq is a small DNS/DHCP server which we’ll use in this setup. To start simply run:

After that you need to create and edit the configuration file:

The configuration file /etc/hostapd/hostapd.conf is filled with configuration examples and documentation in comments. The relevant parts for a simple WPA2 protected 802.11g network with the SSID ‘Example-WLAN‘ and password ‘PASS‘ are:

Next you need to edit the network interfaces configuration to force the WLAN card to only run in the access point mode. Assuming that the access point network will use the address space 192.168.8.* the file /etc/network/interfaces should look something like this:

Then we need to have a DNS relay and DHCP server on our wlan0 interface so the clients actually get a working Internet connection, and this can be accomplished by configuring dnsmasq. Like hostapd it also has a very verbose configuration file /etc/dnsmasq.conf , but the relevant parts look like this:

Next we need to make sure that the Linux kernel forwards traffic from our wireless network onto other destination networks. For that you need to edit the file /etc/sysctl.conf and make sure it has lines like this:

We need to activate NAT in the built-in firewall of Linux to make sure the traffic going out uses the external address as its source address and thus can be routed back. It can be done for example by appending the following line to the file /etc/rc.local :

Some WLAN card hardware might have a virtual on/off switch. If you have such hardware you might need to also run rfkill to enable the hardware using a command like rfkill unblock 0 .

The same computer also runs Network Manager (as for example Ubuntu does by default) you need to edit it’s settings so that if won’t interfere with the new wifi access point. Make sure file /etc/NetworkManager/NetworkManager.conf looks like this:

Now all configuration should be done. To be sure all changes take effect, finish by rebooting the computer.

If everything is working, a new WLAN network should be detected by other devices.
On the WLAN-server you’ll see similar output from these commands:

Last modified: 2015-10-26T18:52:46+02:00

Written by Otto Kekäläinen

Linux-natives – a blog by Linux experts from Finland – is brought to you by Seravo, a Finnish company focused on open source software and services.

How to turn your ubuntu laptop into a wireless 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.

Driver Manufacturer Support AP Mode
adm8211 ADMtek/Infineon no
airo Aironet/Cisco ?
ar5523 Atheros no
at76c50x-usb Atmel no
ath5k Atheros yes
ath6kl Atheros no
ath9k Atheros yes
ath9k_htc Atheros yes
ath10k Atheros ?
atmel Atmel ?
b43 Broadcom yes
b43legacy Broadcom yes
brcmfmac Broadcom no
brcmsmac Broadcom yes
carl9170 ZyDAS/Atheros yes
cw1200 ST-Ericsson yes
hostap Intersil/Conexant ?
ipw2100 Intel no
ipw2200 Intel no
iwlegacy Intel no
iwlwifi Intel yes
libertas Marvell no
libertas_tf Marvell yes
mac80211_hwsim Jouni yes
mwifiex Marvell yes
mwl8k Marvell yes
orinoco Agere/Intersil/Symbol no
p54pci Intersil/Conexant yes
p54spi Conexant/ST-NXP yes
p54usb Intersil/Conexant yes
rndis_wlan Broadcom no
rt61pci Ralink yes
rt73usb Ralink yes
rt2400pci Ralink yes
rt2500pci Ralink yes
rt2500usb Ralink yes
rt2800pci Ralink yes
rt2800usb Ralink yes
vt6656 VIA yes
wil6210 Atheros yes
wl12xx Texas Instruments yes
zd1211rw ZyDAS/Atheros yes

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.

When you travel, you encounter all kinds of Internet access arrangements. Some hotels make it easy, allowing you to use their Wi-Fi networks without restrictions. More often than not, however, connecting to Wi-Fi on the go is not simple. For example, some hotels limit connections to their Wi-Fi networks to one device only. Or, one device at a time. Or, some places offer the wired (Ethernet) lines only. Sure, you can connect your laptop to the Internet this way, but what about your tablet or the smart phone, wouldn’t it be nice to connect them, too?

Turns out, it may be possible to set up your laptop to share its Internet connection with other devices via its built-in Wi-Fi device. The following steps should work well if you have a laptop with Windows 7 or later. If you have Windows Vista or XP, a different procedure may work instead. (A hint: search the web for how to create an ad-hoc connection for the specific version of Windows that you have.)

The first thing to do is to check that your Wi-Fi network adapter supports the so called Hosted Network mode. To do that, open Windows command prompt and enter the following command:

Look for the line that reads Hosted network supported: Yes.

How to turn your ubuntu laptop into a wireless access point

Don’t worry, you don’t need to know what hosted network is, all you need to do is find that line. If you see it, you are good to go. If not, then your Wi-Fi network adapter does not support this feature, sorry.

Now, let’s configure your laptop to offer its own Wi-Fi access point, to which you could connect your other Wi-Fi devices. First, decide on the name of the wireless network your laptop would create. It could be nearly anything. In the example below, we chose the name MyLaptopWiFi. Second, decide on the password that you would need to enter to connect your other devices to this access point. We chose Orange6725 as the password; you can obviously choose something else.

To actually create the access point, open the command prompt in the Administrator mode. To do that on Windows 10, you could press the Win-X keys and select Command prompt (Admin) from the menu. Then, enter the following two commands into the command prompt:

Of course, replace MyLaptopWiFi and Orange6725 with your own name and password that you have chosen.

How to turn your ubuntu laptop into a wireless access point

This creates the access point, but it’s not fully operational yet: you need to tell Windows that you want to share your actual Internet connection with the access point you’ve just created. To do that, use Windows Control Panel to open the Network and Sharing Center window. There, click on the connection that provides the actual connection to the Internet (which could be your Wi-Fi connection or the Ethernet line, depending how you have connected to the Internet.), press Properties for that connection, and finally select the Sharing tab:

How to turn your ubuntu laptop into a wireless access point

Check the Allow other users to connect through this computer’s Internet connection box, and also select Local area connection in the Home networking connection list.

This should make your laptop to work as a Wi-Fi access point. If you open another device, you should now see MyLaptopWiFi in the list of the Wi-Fi networks offered. Connect to it, as usual, entering the password you have set up, and your device should now be connected to the Internet via the laptop. Pretty neat, huh?

Password-protect and hide personal files and folders with Folder Guard for Windows 11,10,8.

Well, it all should work well in theory. In practice, though, we discovered that not all is smooth. If you connected a device to MyLaptopWiFi, but there is no connection to the Internet on that device, try to restart the laptop, and repeat the steps above again, it may work better the second time. Or, it appears that enabling the access point may not work well with the power transitions of your laptop. That is, if you try to put the laptop to sleep, it may not work and the laptop may stay awake while the access point is enabled. We also experienced a few blue screen crashes, although not that frequently to make it a real concern. It may depend on the model of your laptop or the Wi-Fi card that your laptop has; some combinations may work better than others.

Keep in mind, that if you put your laptop to sleep or restart it, the access point disappears and you would need to set it up again each time you wake up the laptop. If you do this frequently and don’t want to go through the same steps every time, you may want to use Windows Task Scheduler to do it for you. For example, put the two commands shown above in a batch file, and then create a new task that would run that batch file, and set the trigger for that task On workstation unlock. This way, every time you wake up the laptop and unlock it, the batch file would run for you automatically. When you no longer need it, disable the task in Task Scheduler.

We also found that sometimes an attempt to create the access point fails with Windows displaying the following message:

Encrypt and password-protect external drives with USBCrypt encryption software for Windows 11,10,8.

If this happens, it could be because the hosted network adapter got disabled for some reason. To solve this problem, open Device Manager, navigate to Network adapters, right-click Microsoft Hosted Network device, and choose to enable it. (If you don’t see it in Device Manager, restart the laptop.) Check also that the real Internet connection is still shared.

Finally, what if you’ve created the access point, used it for a while, and no longer need it, – how to turn it off? Easy: open Windows command prompt and enter the following commands:

If you have a wireless-enabled computer, you can connect to a wireless network that is within range to get access to the internet, view shared files on the network, and so on.

Open the system menu from the right side of the top bar.

Select Wi-Fi Not Connected . The Wi-Fi section of the menu will expand.

Click Select Network .

Click the name of the network you want, then click Connect .

If the name of the network is not shown, scroll down the list. If you still do not see the network, you may be out of range, or the network might be hidden .

If the network is protected by a password ( encryption key ), enter the password when prompted and click Connect .

If you do not know the key, it may be written on the underside of the wireless router or base station, or in its instruction manual, or you may have to ask the person who administers the wireless network.

The network icon will change appearance as the computer attempts to connect to the network.

If the connection is successful, the icon will change to a dot with several curved bars above it ( ). More bars indicate a stronger connection to the network. Fewer bars mean the connection is weaker and might not be very reliable.

If the connection is not successful, you may be asked for your password again or it might just tell you that the connection has been disconnected. There are a number of things that could have caused this to happen. You could have entered the wrong password, the wireless signal could be too weak, or your computer’s wireless card might have a problem, for example. See Wireless network troubleshooter for more help.

A stronger connection to a wireless network does not necessarily mean that you have a faster internet connection, or that you will have faster download speeds. The wireless connection connects your computer to the device which provides the internet connection (like a router or modem), but the two connections are actually different, and so will run at different speeds.

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.

If you have two network interface cards installed in your Ubuntu system, one of which connects you to the Internet and the other to a local network, then your system can be transformed into an immensely powerful router. You can establish basic NAT (Network Address Translation), activate port forwarding, form a proxy, and prioritise traffic to and from your system so that your downloading does not interfere with your gaming. This article describes how to set up your Ubuntu system as a router, which can later be configured as a firewall. It requires prior knowledge of iptables. The resulting set-up will help you to control traffic over ports and make your system less vulnerable to security breaches.

How to turn your ubuntu laptop into a wireless access point

Figure 1 : Ubuntu as a router

Gateway set-up

The pre-requisites to setting up a gateway are:

  • A computer with Ubuntu OS
  • Two network cards
  • Internet connectivity
  • Knowledge of iptables

Two network cards will have to be installed in the computer. One connects to the Internet, which we will call eth1. The other connects to our internal network.
We will call this card eth0.

To summarise:

  • eth1 = Network adapter connected to the Internet (external)
  • eth0 = Network adapter connected to a computer in the same subnet (internal)
  • 10.10.6.0 = Subnet for eth0
  • 192.168.1.8 = IP address of Host A, any computer in the Internet
  • 10.10.6.203 = IP address of eth0.
  • 10.10.6.204 = IP address of eth1.
  • 10.10.6.205 = IP address of Host B, any computer in the same subnet.

How to turn your ubuntu laptop into a wireless access pointFigure 2: Configuration of eth0 How to turn your ubuntu laptop into a wireless access point Figure 3 : Setting up network on eth0 How to turn your ubuntu laptop into a wireless access point Figure 4: Configuration of eth 1 How to turn your ubuntu laptop into a wireless access point Figure 5: Setting up network on eth 1

Configuring network interface cards

Each network interface has to be assigned a static IP address. How to do this differs for the desktop edition and the server edition of Ubuntu. Both the methods are described below. You can refer Figure 2 to 5.

For Ubuntu s desktop edition: Click on System Settings->Network->Select Interface->Options

For Ubuntu s server edition: You need to follow the steps given below.

1. Open the terminal, by pressing Ctrl+Alt+T
2. Enter the following command to edit the interfaces file:

3. Edit the file with the following lines:

Enable IP forwarding

Configure the Ubuntu system so as to initiate routing between two interfaces by enabling IP forwarding:

Edit /etc/sysctl.conf, and add the following lines (for versions up to Ubuntu 10.04):

From Ubuntu 10.10 onwards, it is sufficient to edit /etc/sysctl.conf and uncomment:

so that it reads as follows:

How to turn your ubuntu laptop into a wireless access point Figure 6: Enable IP forwarding How to turn your ubuntu laptop into a wireless access point Figure 7 : Result

IP masquerading

To enable IP masquerading, enter the following set of commands at the terminal:

Do not forget to save these iptables rules, or they will be lost after the next system reboot as they are stored in volatile memory.

The above command will activate previously saved iptables rules when the system reboots, making the changes permanent.

How to use your laptop as an internet access point for a desktop

This was originally posted on the ubuntuforums in this thread.

The intent of this how to is to use a crossover cable and a wireless laptop to connect to the internet from a desktop computer that is too far from the router to run a cable.

By the way, there are a lot of words here, but that is because I like to be complete, not because this is hard. Read the whole thing before you start and you will discover this isn’t especially technical or difficult.

    I am running Ubuntu 5.10 (Breezy Badger) on both the laptop and desktop.

Before you start

Make sure you have a working connection from your wireless laptop to your router and from there to the internet.

Make sure you know how to use and set up your router as well as how to find it’s configuration. For me this is through a browser interface at 192.168.1.1 when connected directly to the router via an ethernet cable or wireless connection.

Find the following information from your router’s configuration. I will list mine (where security permits) for comparison and so you can see it below as we continue. On the linksys wrt54g with firmware version 4.20.7 this is found under Status->Router in the configuration pages.

  • for me to log into my router from any computer on the network the address is 192.168.1.1
  • the router assigns addresses to computers using it from 192.168.1.100 to 192.168.1.149

Things you will need

  • A desktop computer with a working Ubuntu installation and a tested and known to work ethernet card. (I will call this desktop)
  • A ethernet crossover cable. NOT a regular ethernet cable
  • A wireless access point that is already configured properly and has access to the internet (I will call this router)
  • A laptop or other computer with a working Ubuntu installation and a wireless connection that is configured properly and already works (I will call this laptop)

Step 0: Plug in the cable

Plug the crossover cable in to the ethernet ports on the desktop and the laptop. Make sure both computers are turned on before you continue. It will be easiest if the computers are right next to each other for this process.

Step 1: Install Firestarter on the laptop to configure access

  • select the laptop’s wireless card (for me eth1) as your “Internet Connected Network Device”
  • select the laptop’s ethernet card (for me eth0) as your “Local Network Connected Device”
  • select “Enable internet connection sharing”

Step 2: Configuring your network rules on the laptop

From the panel menu: System->Administration->Networking

Your wireless connection (for me eth1) should already be configured properly and working so I won’t discuss that here. Your settings for that card/connection will not change at all.

Highlight your Ethernet Connection (for me eth0) and select “Properties”

Check “This device is configured”

Choose your wireless connection as the “Default gateway device”

Click “ok” because you are done here.

*the important thing here is to choose a different subnet from what your router assigns to computers connected to it. Mine assigns addresses in the 192.168.1.xxx subnet so I chose to use here 192.168.2.xxx

+This is from the Default Gateway listed in the router’s setup page as shown above.

Step 3: Configuring your network rules on the desktop

From the panel menu: System->Administration->Networking

Highlight your Ethernet Connection and select “Properties”

Check “This device is configured”

Choose your wireless connection as the “Default gateway device”

Click “ok” because you are done here.

*the important thing here is to choose the same subnet as your laptop is using. Earlier we used 192.168.2.102 subnet so I chose to use here 192.168.2.103. Same subnet, different computer.

+This has to be the same as the IP address for your laptop’s ethernet connection (eth0).

Step 4: Configuring the Domain Name and servers properly

This step insures that your desktop will have access to the internet the same way the laptop does and be able to use names for web sites and not just IP addresses. in other words, we are going to tell your desktop the some of the same information manually that your router is telling your laptop through DHCP.

On your laptop, open the file /etc/resolv.conf In it you will find something like this:

Keep this information handy.

Go to the desktop and put the exact information in the file /etc/resolv.conf on the desktop using your favorite editor.

It is probable that this file is currently blank. In any case, completely erase the contents if there are any and type in exactly what is shown in the same file on your laptop then save.

Okay. Time to test. Open firefox and type something simple in the address bar like “www.google.com”

If we did everything right it will work, but we are not quite done.

The resolv.conf file will be regenerated on the desktop every time you reboot. Unless you enjoy recreating the file each time, there is one more step remaining.

While the current internet connection is working on the desktop computer, with all the extra repositories enabled, fire up synaptic or apt-get install resolvconf on the desktop computer

Once that is installed

and add the following to that file under the heading shown using the information from your current, working /etc/resolv.conf:

This will automatically create your (correct) /etc/resolv.conf file every time you reboot.

Afterword

WifiDocs/WirelessLaptopInternetAccessPoint (последним исправлял пользователь nuttycat 2011-06-04 23:57:25)

looking for a way to turn a laptop into a headless box server with ubuntu server, with ssh only access, disk encryption activated, no login prompt at reboot and deactivate screen and keyboard.

Best Answer

Here are asked four questions/requirements and some of them are not compatible each other. If it will be a home server with public access (as it sounds like), I would just install Ubuntu Server and will close the lid of the laptop to make it headless.

Setup SSH

To install SSH server on Ubuntu execute the following commands (or tick Open SSH Server during Ubuntu Server’s installation process; the openssh-client should be installed by default):

Now you should be able to connect to the SSH server through the loopback interface (from/to the server itself) by the command:

Setup key based authentication to increase the security. First create the directory .ssh within your user’s home directory: mkdir

Then, from a remote instance (from your LAN), let’s assume it is also Ubuntu, execute the following steps (source):

Generating RSA Keys (enter passphrase for more security in case someone steal your key, it should be different from your user’s password):

Transfer the Client Key to the Server (note):

Now you should be able to connect to the SSH server with key authentication (you should enter your passphrase if you’ve setup it):

Once this works, you could disable the password authentication of the Server by editing the file /etc/ssh/sshd_config in this way:

Don’t forgot to restart the SSH server: sudo systemctl restart sshd.service

If you are planning to use encrypted home directory you should tweak your SSH configuration (on the server side) as it is described here: SSH is allowing remote connections only after a local login to the server.

No login prompt at reboot or How to prevent login with physical access

I wold say, in my opinion, this is not necessary. Within Ubuntu, the login with root is disabled by default. That means, as local Server’s administrator, you should login with a user that could have a hard to guess (odd, meaningless) username and strong password. And, I think, this is enough in this case where you should guess the password by hand writing. If you want to add more security you can setup two factor authentication.

Actually, first, you should disable the Recovery mode in order to prevent login with physical access as root. It is accessible within the ‘Advanced options’ in the GRUB’s menu, that can be reached through long press of the Shift key during the boot.

If you really want to disable the TTYs to prevent the login with physical access, within nowadays Ubuntu versions (15.04+) that uses systemd, you can edit the file /etc/systemd/logind.conf in the following way, that will disable the TTYs from 2 to 6 (source):

TTY-1 is hard coded and will stay active. To disable TTY-1 use the following command that will symlink it to /dev/null (source):

Now restart the system and the TTYs should be unavailable.

Deactivate Screen and Keyboard

The screen and the keyboard of a laptop could be deactivated through GRUB. For this purpose edit the file /etc/default/grub and modify the following line in the shown way (where are the parameters that already exists):

Then execute sudo update-grub and reboot the system. These additional kernel parameters will deactivate the keyboard and the screen of the laptop. My research shows that they will fit to almost every laptop brand/model.

You can override these parameters by pressing the e key within the GRUB menu. With these settings, if you plug in external keyboard and monitor (why not and mouse) they must work.

Full disk encryption

A short internet research shows that there are available few approaches how to make full disk encryption, for example:

The article Manual Full System Encryption on Ubuntu Documentation / Community Wiki.

Please note! “A consequence of full system encryption is that you need to type in your system passphrase each time you power on your computer. “

So, if you setup full disk encryption and disable the keyboard and the display this will make impossible to run the system after reboot.

Think twice before setup full disk encryption!

This will add security only in a case your device is stolen and its HDD/SSD is attached to an another host. During the working process of your Server the disk will be decrypted in order to be accessible for the system. So this will not add extra network security.

In the same beginning – do you really need this additional headache? I would spend this time to learn about how to use LVM.

Maybe you would like to use encrypted home directory to prevent the other users of the system to access your personal files. In this case unless you are not logged-in your personal data will be encrypted.

Note if you are planning to be stand alone administrator of this Server you do not need to do that, because you can restrict the access to your files and folders effectively through the permissions.

While you are logged-in your home will be decrypted in order to be accessible for your user and if there is an another administrator – someone that can use the sudo command, – which is maliciously tuned (!?), he or she could access your files.

Maybe the most effective way to keep your sensitive data secure is to use encrypted folder (or just encrypted archive file). Thus, before decrypt the folder (file), you could check who is logged-in (as root).

If you have a single wired Internet connection (like in a hotel room) you can create Wireless Access Point with Ubuntu and share the Internet connection among multiple devices. This can be done very easily on Ubuntu (whatch this tutorial: https://www.youtube.com/watch?v=G0FFQVy3RUg) It will create an ad-hoc wifi network. However ad-hoc networks are not supported in some android models, windows mobile, and iOS devices. A more universal solution is to create an Access Point (or Infrastructure, or Hotspot) wifi network. This is a bit more complicated but not so difficult. Here I will describe how to do it.

1 Check whether the wireless card supports Access Point mode

First thing to be done is to test whether your wireless card supports going into wireless access point mode. This test is for mac80211 framework based driver.

Install iw and run the command iw list :

Look for supported interface section, where it should be a entry called AP like this:

If your driver doesn’t show this AP, it doesn’t mean it can’t create wireless hotspot. But those cards aren’t in the scope of this tutorial.

2 Setup and host a network

Install hostapd (sudo aptitude install hostapd) and create the configuration file /etc/hostapd/hostapd.conf with a content like this:

Things that you need to change here are:

  • Change interface=wlan0 to your wireless card name. If you have one wireless card it should be wlan0.
  • Change ssid=name_of_network with the name that you want to give to yout hosted network.
  • Change wpa_passphrase=1234567890 with the password for accessing your network.

The name of the wifi interface can be found with a command like this:

The configuration above creates a WPA & WPA2 enabled access point in g mode. A more detailed instruction on how to build the configuration file can be found here: http://wireless.kernel.org/en/users/Documentation/hostapd

Before starting hostapd, we should also edit the file /etc/default/hostapd and modify the line of DAEMON_CONF like this:

Now we can start hostapd with the command sudo service hostapd start . It should start a wireless network. In your mobile device now you can see a wireless network and can authenticate. But the device won’t get IP address. Stop it with the command sudo service hostapd stop .

Note: If you get any errors, maybe your card doesn’t support g mode. Try with other modes (see: http://linuxwireless.org/en/users/Documentation/hostapd).

3 Set up DHCP server for IP address management

Install isc-dhcp-server ( aptitude install isc-dhcp-server ). Edit the file /etc/default/isc-dhcp-server and set INTERFACES like this:

Modify the name of the wireless interface accordingly, as in the section above. Then modify the configuration file /etc/dhcp/dhcpd.conf like this:

  1. Comment the following lines:
  2. Append these lines as the end:

Range describes how large the address pool will be. You need to adjust subnet value also. The config above can give IP up to 15 devices.

Now edit /etc/network/interfaces and add the following lines:

wlan0 is your wireless interface; change it accordingly.

Note: After reboot, the wireless will be shown as not managed. So you can’t use any other wi-fi network. To get wireless with normal behaviour, put # before those newly added lines and execute sudo service networking restart

If you start now the services isc-dhcp-server and hostapd, your mobile device will see a network, authenticate to it and after authentication it will get as IP address something like 10.10.0.2 But still it can’t connect to internet.

4 Share the internet connection

For Internet connection sharing we need IP forwarding and IP masquerading.

Enable IP forwarding like this:

Setup IP masquerading like this:

Here ppp0 is the logical interface name if you are using a dial up/usb modem connection to Internet. It may be eth0 if you are using an Ethernet cable connection. If you are connecting to Internet through an android device with USB tethering, then the interface name could be usb0.

You can find out the name of the logical interface that you are using to connect to the Internet with a command like this:

5 Script to Automate the Installation

I like to automate configuration steps whenever it is possible and it is something that can be reused. Here is a script on gist that can be used to install a wifi access point automatically: https://gist.github.com/dashohoxha/5767262

It should work well on Ubuntu 12.04 or its derivatives (for example Linux Mint). Let me know if there are any bugs on it or things that can be fixed or improved.

Ever wondered how to setup a Wifi hotspot in Linux Mint/Ubuntu? In this post we will cover the process how to setup and configure a wireless(or wifi) hotspot in Linux Mint and in Ubuntu as well. Yes, this is possible in some GNU/Linux distributions like in Mint and Ubuntu and that’s why we’ll cover those first(in the future, we’ll check other distros and update this post if other Linux distros have the feature as well). You one thing to keep in mind, there’s a possibility that it won’t work on all devices(so hardware is a key factor as well).

Some wifi cards do not support hotspot mode, so make sure to check on that as well.

Setup a Wifi hotspot in Linux Mint

In order to start setting up, you need to access the network connections menu in Linux Mint. You can do that by two ways, which are really simple. The first way is to just search for “Network connections” in the start menu and in search results you’ll get an Network connections icon.

How to turn your ubuntu laptop into a wireless access point

Other way is to access the network connections menu is by, clicking right click on the network icon, which is located on the taskbar, right besides the update notification icon. Right click on the icon and select the option – edit the network connections, and you’ll access the Network connections menu.

How to turn your ubuntu laptop into a wireless access point

Creating Wifi hostpot

In the network connections menu, on bottom left, there’s a plus sign. Click on the plus sign in order to create a new connection. A prompt window will open, where it asks what kind of network connection we need to setup. In the selection drop box, we need to select WiFi and click on create button. Next, a window will open in which we need to enter our parameters.

How to turn your ubuntu laptop into a wireless access point

How to turn your ubuntu laptop into a wireless access point

How to turn your ubuntu laptop into a wireless access point

First field is the connection name – You set the name you like for your new connection.

Next is SSID – This is the name of our WiFi hotspot. You need to set the name so you can recognize your hotspot and to connect on it.

Mode: under the Mode we need to select the option – hotspot. As it implies, it will set our WiFi to work as a hotspot.

Band: For a start, you can leave it as automatic, but this is essentially to will the WiFi emit 2.4 GHz or 5 GHz frequencies.

You can leave channel by default.

Device – Here we need to select our WiFi card from our laptop. Click on the dropdown and it will offer you a device named Wlo1 or Wlan1. Those names represent the WiFI card on your laptop.

How to turn your ubuntu laptop into a wireless access point

After that, we need to setup the security – that’s the next tab. By security, we will just set a password for our wifi hotspot. First field, security – click on the dropdown and select the option – WPA & WPA 2 personal. This is the encryption type we just selected and WPA & WPA2 is the strongest. Next field, password – in there you just type in your password for the wifi hotspot. And that’s all that is needed. After you enter all the parameters, click on the save button and you can use it and connect your other wifi devices.

How to turn your ubuntu laptop into a wireless access point

Setup a Wifi hotspot in Ubuntu

The process to setup wifi hotspot in Ubuntu is actually quite the same as is in Linux Mint. Linux mint is based of Ubuntu and they both are almost the same. They both have the same system tools. So that means, that in order to create wifi hotspot in Ubuntu, you just need to do the same process like for the Linux Mint. Just find and open the Network connections menu, it will look the same and have the same options and same parameters. Create a new wifi connection, set the mode for the hotspot, enter your SSID(wifi hotspot name), assign the wifi device on the connection, set the password and save your new connection.

Believe it or not but when it comes to handling networking nothing is like Linux and of course, Ubuntu is the part of that. Indeed, the enabling of a hotspot in Windows 10 is super easy just one click and Ubuntu is not behind as well, here you also just need to go through few steps, to get and activate a hotspot connection.

requirements

  • Ubuntu 20.04 LTS or older versions such as Ubuntu 19.04/18.04/16.04…
  • Wifi supported hardware interface
  • If you want to share the internet than an Ethernet connection with active internet.

Enable Wifi Hotspot in Ubuntu 20.04

There are two ways to create a Hotspot, one is through the general settings and the other one is by directly accessing the Gnome connection editor.

Method 1#: Using the General Settings.

Turn on Wifi Adapter

Click on the top right side arrow symbol given on Ubuntu 20.04 to reveal quick settings and then Turn ON the Wifi Adapter. Once you have done that click on the “Wifi Settings” option.

How to turn your ubuntu laptop into a wireless access point

Turn On WiFi Adapter

Turn on Ubuntu 20.04 Wi-Fi Hotspot

Under the Settings of Ubuntu 20.04 LTS, select the WiFi from the left side panel. After that click on the three dots given near the minimize icon in the top bar. This will pop-up further settings related to Wi-Fi. Here select the “Turn On Wi-Fi Settings“.

How to turn your ubuntu laptop into a wireless access point

Turn On Wifi hotspot ubuntu 20.04-min

Create a new hotspot connection

You will see a new window. Here you have to give some name to your Ubuntu hotspot connection which acts as SSID along with the password you want to use for the same. Finally, click on the Turn On option to start it.

How to turn your ubuntu laptop into a wireless access point

Create SSID and Password for hotspot

Visible networks

Under the WiFi settings, you will find the created WiFi hotspot along with all details of this new connection and a toggle button, that we can use to Switch on or off the same.

How to turn your ubuntu laptop into a wireless access point

Method 2nd: Using the GNOME NM Connection editor

Open NM Connection Editor in Ubuntu 20.04

Go to the Command Terminal of Ubuntu 20.04 and type the below command:

The above command will open the GNOME Network Connections manager. There click on the + icon given at the bottom to create a new connection.

How to turn your ubuntu laptop into a wireless access point

Add new connection from GNOME connection editor

Select the type of connection you want to create

From connection type, click on the drop-down box and select the WiFi connection as we want to create a hotspot.

How to turn your ubuntu laptop into a wireless access point

Add Wifi connection

How to turn your ubuntu laptop into a wireless access point

Choose a new connection type

Create SSID and select connection Mode

Here, we have to give some name to our Wi-Fi connection which works as SSID, we have given “h2smedia”, you can type whatever you would like to have. The next important thing is the MODE, here select the Hotspot from the dropdown box, otherwise, it will not create a Wi-Fi hotspot at all.

How to turn your ubuntu laptop into a wireless access point

Connection mode

Set Wi-Fi hotspot security in Ubuntu 20.04

Now, click on the Wi-Fi Security tab, select WPS & WPS2 Personal security type and then in the next column enter the password which you want to use with the created hotspot. Save it.

How to turn your ubuntu laptop into a wireless access point

Wifi security Ubuntu 20.04

Turn off or On Wi-Fi hotspot on Ubuntu 20.04

Finally, under the Wi-Fi settings, you will find your created connection with all detail required to connect it with other devices such as your Android smartphone or laptop. Toggle button can be used to switch it ON or OFF, in case you want to connect to some Wi-Fi network.

How to turn your ubuntu laptop into a wireless access point

Wifi hotspot created via nm connection editor

So, this was the quick tutorial on creating a Wi-Fi hotspot in Ubuntu Linux.

I’ve been around the block with this several times and nothing seems to hardware unblock the WiFi on this laptop.

I am running Ubuntu 10.04 LTS. Laptop is a Medion MD96350. Its built in keyboard is defective so I have to use a USB keyboard.

The WiFi worked fine until today, I returned home to find that my kids have been on the laptop and somehow disabled/hardware blocked the WiFi. And I cannot re-enable it.

On the original built in keyboard, the switch is a key combo press (FN+ an F key I can’t remember – the keyboard has since been removed).

There is a strip across the top of the base showing disc access status, battery indicator etc, power switch, then the WiFi indicator and some media indicators which are also keys (play, pause, prev. next.) which all light up blue, and get ‘bluer’ once ‘pressed’ (no physical button). The WiFi indicator no longer lights up. I’m unsure whether this is also a ‘key’, but nothing happens if it is ‘pressed’.

WiFi card info from sudo lspci -v

sudo rfkill list

sudo ifconfig wlan4 up

The driver is iwl3945, which is associated. I have tried removing it and reinstating it to no effect. I have tried various other things to no effect.

When I had windows installed, I could raise and switch off the card via windows with no problems.
I have since removed windows, and do not wish to reinstall it just to raise the WiFi card every time it is switched off in Ubuntu.

BIOS has the options to have the hardware switched off on boot, or in the state it was during the last shutdown. There is no option to have it switched on at boot.

So, my question is, since there appears to be no resolution for this directly, as in having Ubuntu being able to hardware unblock it, is there a way to map the FN key the laptops’ built in keyboard had, to my USB keyboard, and how. Or is there a way to access the built in media “buttons” (the strip across the top of the laptop) to be able to have Ubuntu recognise the WiFi “button” (if it is indeed a “button”)?

Best Answer

So, maybe I’ll get to delete my answer in deference to someone more knowledgeable, but my understanding.

  1. open a terminal and run xev
  2. mash on your fn key

My understanding is that fn ‘s signal is never sent to the os. Rather, it modifies the signals that other keys send. I’m wrong if xev shows anything in response to your mashing.

With this premise, I’ll guess that fn + wifi sends a signal directly to your hardware to toggle your wifi card off and on. Running windows or linux or whatever isn’t ever going to affect this cause and effect relationship.

However, you may be able to remap an fn combo like fn + wifi .

I don’t have a clue on this part of your question. If you could do it windows (mind, without using the keyboard..), then theoretically it’s possible in linux. You just need to hope the kernel module supporting your wifi card supports this, and then that someone has written ui software to take advantage of the feature.

If this is the core of your question, then it might be a duplicate of this one: Unblocking hardware switch Wifi

I want to run Ubuntu server 18 on my laptop. This by default does not use X windows, so there is no desktop environment. It also by default does not enable wifi. Servers don’t usually need wifi and desktop environments, right?

Anyway, I want both wifi and a desktop environment. I actually tried Ubuntu desktop with Gnome on this T420, but Firefox crashed several times, locking up the whole machine. Since I want the laptop to emulate a server environment for development I thought screw it, let’s install Ubuntu server on here and just add a light desktop environment.

These items are no longer outstanding for me, since I got NetworkManager working including the XFCE desktop widget.

  • Add other wifi networks
  • Switch between networks
  • Get nmtui to display and switch between wifi networks

I’m using a Lenovo ThinkPad T420. On a Windows machine, I followed the instructions on the Ubuntu website for creating a bootable USB stick.

On the T420 I had to go into the bios and move USB up the list so it would boot from the stick.

Installation of Ubuntu was smooth, all went perfectly well.

Install desktop environment

There are plenty of choices, mine was:

Wifi Networks device not managed

Imagine my delight when I first log into an X window session and realise that the laptop is not connected to the wifi/internet.

Get wifi working

This is based on a pretty poor understanding of what’s going on. Here’s what I guesstimate to be the situation.

As of Ubuntu 17, networking is managed by either of two approaches: NetworkManager or networkd .

Added to this, netplan is also used. See netplan.io

netplan reads YAML config files and generates config files for NetworkManager or networkd , depending on your preferences.

Also required, apparently, is wpasupplicant .

Turn on wifi radios:

Check your devices are all recognised, even if they’re not currently being “managed”:

wlp3s0 is the wifi device in my laptop. If yours doesn’t appear. good luck with that. Maybe try ifconfig up wlp3s0

Check your wifi is capable of detecting nearby routers:

Again, if your output is different here, good luck!

My /etc/netplan/01-netcfg.yaml looks like this, note that it renders config files for NetworkManager . This should enable the network widget in the XFCE desktop. If this doesn’t work, you can try renderer: networkd . That’s fine, but the desktop widget will not work, and you’ll need to use the command line to view and connect to networks. In this case, running sudo netplan try followed by sudo netplan apply seems to reliably re-connect to known networks if connection is lost. (Connections are lost very easily, e.g. on waking from sleep.)

Do not be distracted by /etc/network/interfaces ! Mine looks like this, note what the comments say, and note that there is nothing else in apart from the comments, i.e. it does nothing:

ifupdown is not on my system.

Running this seemed to get things working:

This is confusing. The netplan config file renders for networkd yet restarting the network-manager seems to apply the netplan changes to NetworkManager.

At some point I think I also restarted the wpa_supplicant service:

As of now the wifi is working perfectly. I have not yet rebooted. I notice that the wifi indicator panel in XFCE still says “WiFi Networks device not managed”, but I think that’s because it’s checking with NetworkManager , which is not being used.

Much random stabbing in the dark was involved, including the following, I have little idea if these were necessary but this is what Google led me to do:

Wireless access points (APs or WAPs) are networking devices that allow Wi-Fi devices to connect to a wired network. They form wireless local-area networks (WLANs).

An access point acts as a central transmitter and receiver of wireless radio signals. Mainstream wireless APs support Wi-Fi and are used in homes, public internet hotspots, and business networks to accommodate wireless mobile devices. The access point can be incorporated into a wired router or a stand-alone router.

Lifewire / Tim Liedtke

What Is a WAP Used For?

Stand-alone access points are small physical devices that closely resemble home broadband routers. Wireless routers used for home networking have access points built into the hardware and work with stand-alone AP units. When you use a tablet or laptop to go online, the device goes through an access point, either hardware or built-in, to access the internet without connecting via a cable.

Several mainstream vendors of consumer Wi-Fi products manufacture access points, which allow businesses to supply wireless connectivity anywhere they can run an Ethernet cable from the access point to a wired router. AP hardware consists of radio transceivers, antennas, and device firmware.

Wi-Fi hotspots commonly deploy one or more wireless APs to support a Wi-Fi coverage area. Business networks also typically install APs throughout their office areas. While most homes require only one wireless router with an access point built in to cover the physical space, businesses often use many. Determining the optimal locations for access point installations can be challenging even for network professionals because of the need to cover spaces evenly with a reliable signal.

Use Wi-Fi Access Points

If the existing router doesn’t accommodate wireless devices, which is rare, you can expand the network by adding a wireless AP device to the network instead of adding a second router. Businesses can install a set of APs to cover an office building. Access points enable Wi-Fi infrastructure mode networking.

Although Wi-Fi connections technically do not require the use of APs, they enable Wi-Fi networks to scale to larger distances and numbers of clients. Modern access points support up to 255 clients, while old ones support only about 20. APs also provide the bridging capability that enables a local Wi-Fi network to connect to other wired networks.

History of Access Points

The first wireless access points predated Wi-Fi. Proxim Corporation (a distant relative of Proxim Wireless) produced the first such device, branded RangeLAN2, in 1994. Access points achieved mainstream adoption soon after the first Wi-Fi commercial products appeared in the late 1990s.

While called WAP devices in earlier years, the industry gradually began using the term AP instead of WAP to refer to them (in part, to avoid confusion with Wireless Application Protocol), although some APs are wired devices.

In recent years, smart home virtual assistants have come into wide use. These include Google Home and Amazon Alexa, which fit into a wireless network much like computers, mobile devices, printers, and other peripherals via a wireless connection to an access point. They enable voice-activated interaction with the internet and control home-related devices, including lights, thermostats, electrical appliances, televisions, and more, throughout the Wi-Fi network that the access point enables.

You can use your Linux desktop to share your wired Internet connection wirelessly, by creating a Wi-Fi hotspot. This allows your computer to act like a wireless router, allowing other devices to connect to the Internet via its Wi-Fi.

Note that using these instructions you will NOT be able to use the same wireless network to both connect to the Internet and create a hotspot. Your need a wired Internet connection and an unused Wi-Fi on the same machine.

This articles shows how to create an a Wi-Fi hotspot on the Ubuntu 18.04 Gnome desktop, and how to edit its settings (change the password, SSID, etc.), a feature that’s hidden from the settings and menu. The hotspot uses infrastructure mode (the Wi-Fi mode will be set to “Hotspot”) by default, which allows sharing the Internet connection with Android devices.

How to create a Wi-Fi hotspot in Ubuntu 18.04 using Gnome desktop

1. To create a Wi-Fi hotspot, the first thing you’ll need to do is to turn on your Wi-Fi (if not already enabled):

This is done by going to the System menu and selecting Wi-Fi Off > Turn On .

2. Next, select Wi-Fi Settings from the system Wi-Fi menu:

How to turn your ubuntu laptop into a wireless access point

3. In the Wi-Fi Settings window, click on the Gnome menu icon from the window upper right-hand side corner, and select Turn On Wi-Fi Hotspot :

How to turn your ubuntu laptop into a wireless access point

Your new Wi-Fi hotspot uses AP (infrastructure) mode by default in Ubuntu 18.04, and the network SSID and password, as well as the security type (WPA/WPA2 is used by default in Ubuntu 18.04) are presented on the next screen – which is displayed immediately after your enable the Wi-Fi hotspot:

How to turn your ubuntu laptop into a wireless access point

If you are ok with the defaults and don’t want to change anything, that’s all you have to do to create a Wi-Fi hotspot in Ubuntu 18.04.

You won’t find any options to change these defaults though, at least not in this settings pane. If you want to change some of the hotspot settings, like the network SSID and password, there are two ways of doing this, which I’ll explain below.

How to change Wi-Fi hotspot settings in Ubuntu 18.04 (Gnome desktop)

Option 1: Edit the hotspot configuration file.

After creating a hotspot for the first time, a file called Hotspot is created in /etc/NetworkManager/system-connections , which holds some settings. So make sure to create a hotspot first, or else this file does not exist! You can then edit the configuration file with a text editor, for example Nano, like this:

In this file you can configure the network SSID (it appears as ssid= under [wifi] ), password (the Wi-Fi password is the value of psk= under [wifi-security] ), and other settings.

After making changes to the Hotspot file, save it (to save the file in Nano command line text editor, press Ctrl + O , then Enter , and then exit using Ctrl + X ).

After making changes to the hotspot configuration file you’ll need to restart Network Manager:

Option 2: NM Connection Editor.

How to turn your ubuntu laptop into a wireless access point

This tool lets you modify the hotspot Wi-Fi mode, band (choose between 2.4 Ghz and 5 Ghz if available), and more. You can start it by pressing Alt + F2 or opening a terminal and typing:

If you use nm-connection-editor in Ubuntu 18.04 to change the hotspot password and you use the default WPA & WPA2 Personal security, devices may not be able to connect to your hotspot, displaying an authentication / incorrect password error. At least this is how it worked in my case, using Ubuntu 18.04 to create the hotspot and an Android phone to connect to it.

I’m not sure why this happens when using NM Connection Editor, but the issue is not present if you edit the hotspot configuration manually. This is why I don’t recommend using NM Connection Editor to change a WPA/WPA2 hotspot password. Do it from the command-line instead (option 1, which doesn’t cause any issues).

After making any changes using nm-connection-editor , you’ll need to restart Network Manager:

It’s important to note that in both cases, to make sure all settings are preserved, only start a hotspot by selecting Turn On Wi-Fi Hotspot. from the Wi-Fi System Settings once. Use the Connect to Hidden Network. option for subsequent uses, then select the connection named Hotspot and click Connect :

How to turn your ubuntu laptop into a wireless access point

Ubuntu is one of the easiest Linux distributions to use thanks to its powerful and well-designed graphic interface. But what happens on servers where there isn’t one? How do I connect to a Wifi network to have the Internet from the terminal? Well, that’s the objective of this post, to learn how to connect to Wifi from the terminal on Ubuntu.

As I mentioned before, the great graphic interface of Ubuntu makes many tasks easy to do such as connecting to a network. However, in the case of servers with Ubuntu installed these do not have a graphical interface and you have to pull the terminal. But don’t worry it is much simpler than you might think.

So, let’s get started.

Learning how to connect to Wifi from terminal on Ubuntu

1.- How to get the name of the network interface of the Wifi card

One of the first things we have to do is to find out the name of the network interface of the Wifi card. In case you already know it, you can skip this step, but if you don’t, you can use the following command:

And in my case I get the following:

Usually, in the case of wireless cards, the name of the network interface starts with W. So in my case, it’s wlp5s0 .

If you don’t see one, it’s probably not connected or you have some driver problem.

Now we can continue.

2.- The connecting to wifi process

When no graphical interface is installed on Ubuntu, all network configuration is done by Netplan. That’s why the Netplan configuration file must be modified to establish the wifi connection.

So, first create a backup of the file before editing it:

Now we can edit it with the confidence of knowing that we have a backup done.

The file is in a YAML format so you have to be careful with white spaces and editing in general.

And, under the first configuration, add the basic information about the network you want to connect to as the SSID and the password:

Then, save the changes and before applying them, make sure that the wpa_supplicant service is running to avoid problems:

With the service running correctly, it now applies the changes in Netplan.

And now hopefully you should be able to connect to the WiFi network.

Alternative method: using nmtui

Alternatively, it is possible to use a tool called nmtui . This tool works in some systems where Network Manager manages the networks.

This method is quite convenient to use when for some reason the Ubuntu graphical interface fails.

To do this, just type the following command in the terminal:

And you will see the following screen where you can choose the Activate Connection option:

How to turn your ubuntu laptop into a wireless access point

Using NMTUI

Then, you will see a screen where you can see the connections available in the different network interfaces. Only, choose the WiFi network you want to connect to.

How to turn your ubuntu laptop into a wireless access point

Select the wifi network

Now you have to set the password in case the network is protected.

How to turn your ubuntu laptop into a wireless access point

Typing the wifi password

In the end, you will connect to the network. You can check this because a “*” will appear next to the connected network.

How to turn your ubuntu laptop into a wireless access point

Connect to Wifi from terminal

This method is quite easy and ideal for beginners.

Conclusion

It may seem that connecting to Wifi from a terminal in Ubuntu is something quite complicated but thanks to this post, you have been able to verify that it is not. So this can help you a lot in both home and production servers.

Also you can read:

So, share this post and join our Telegram channel and our Facebook page. Also, buy us a coffee 😉

How to turn your ubuntu laptop into a wireless access point

Let’s learn to connect to WiFi through the terminal (command line method). While working with Linux, sometimes it may happen that we don’t have access to a Graphical User Interface for example during Vanilla Arch Installation. Under such circumstances, we may need to connect to Wifi through the terminal.

Table of Contents

Steps to connect to WiFi through the terminal

In this module, we are going to learn how we can connect to a Wifi network using the command line interface.

Step 1: Identify Your Available Network Devices

First, we need to identify our network devices which we are going to use to connect to our wifi network. We can list our interfaces with the ip command:

Looking at the output of the latter, we should find a similar section in it’s output :

Here our interface is called wlan0 but it may be different for yours. Now we examine the output of the former which give us the following output for wlan0 :

The most important thing to notice here is that wlan0 is marked DOWN which we need to turn UP with the ifconfig command:

Alternatively, you can check the WiFi radio status with nmcli via:

If it is not enabled, you can do it with:

Finally you can check the status of your network interface cards with:

Note: If your wifi card is hard blocked on your Laptop/Computer, you need to execute the following and repeat the above steps.

Step 2: Scan For Available Wifi Netoworks

Now that we have our wifi card up and ready, we need to scan for available wifi networks with which we can connect to using :

This should list out the names of all the available wifi networks around you. Considering the former, we should get an output like :

Thus as we see we have the SSID of the wifi network we want to connect to.

Step 3: Connect To The Wifi Network

Now that we have the SSID of our we can simply connect to it with the following command:

After this our device should be connected to the wifi network.

You can check if you are connected by pinging the default gateway or if you want to check for internet connection, you can just type :

Since we can ping Google’s DNS servers, we can say that we now have an internet connection !

Conclusion

Hence we successfully connected to a wifi network from out CLI. Here we explicitly chose the nmcli command to do most of the work for us because it is available on a wide array of systems including live Arch Linux ISOs as well as is very easy to use and makes troubleshooting easy !

Remember that LaptopTestingTeam/FAQ can help with common problems and questions. Please add anything that could help others reporting bugs.

Once you’ve done all that, sit back and take a break! Thanks for helping Ubuntu run on your laptop.

* Please add a new column to the existing report if there is none for your current major version: If the existing columns are “Dapper” and “Edgy (current development version)”, and your version is Feisty, please make the column headers correspond to “Dapper”, “Edgy (pre-release version)”, “Feisty”.

The rest of this page supplements the LaptopTestingTeamTemplate.

Testing Tips

These are questions to help you test. Please fill out the table, as seen on LaptopTestingTeamTemplate.

Install

Did the installer complete without errors?

Basic Hardware Test

  • Does X start correctly?
    • After installation is complete, a graphical login window should appear
    • The X desktop should be sharp and clear. System/Preferences/Screen Resolution should default to the resolution of the screen
    • Can you browse the internet when plugged into the wired ethernet port?
    • Can you browse the internet when near a wireless access point?
    • Does it move the mouse pointer?
    • Does the right hand side emulate a mouse scroll wheel?
    • Does the trackpoint work?

    Advanced Hardware Test

    • Does the modem work?
      • Right click on the panel and select add to panel. Choose “Modem monitor” and click OK. Right click and select properties. Enter the password. Click add, and choose modem (PPP). Enter a phone number on the next screen. Enter username and password. Apply the changes and then select Activate from the phone applet menu. Does the machine dial out correctly?
      • This may or may not result in a dialog appearing on screen showing the current volume
      • Brightness up should raise the screen brightness, and down should lower it. On machines with light sensors, the hotkey should enable and disable this.
      • Without rebooting the machine, connect a monitor to the external display. Press the display key. Does a picture appear on the monitor? Is it correct?
      • When enabled, the wireless monitor applet in the top right of the screen should show a signal. When disabled, it should not.
      • On the phone, select “Discover devices”. See if the computer is listed.
      • Do USB ports on the docking station work?
      • Does the video out on the docking station work?
      • Do any removable media devices in the docking station work?
      • If the docking station contains a battery, does it show up correctly?
      • Does removing the docking station result in correct behaviour?
      • If the docking station is removed, does Ubuntu carry on running?
      • If the docking station is reattached, does the docking station still work?
      • If you have a PCMCIA/CardBus card to try with, is the device picked up? The lights on the device should light up.
      • If you have a device to try with, plug in a firewire device and see if it is detected.
      • Plug in a USB device, does it work? Using something simple for testing like a mouse is good.

      Power Management Test

      • Does pressing the sleep button cause the machine to sleep?
        • After a few seconds, the machine’s screen should go blank and the sleep light come on
        • After a few seconds, the machine should wake up. Moving the mouse should result in a screen unlock box appearing.
        • Does the keyboard still work after resume?
        • Does the network still work after resume?
        • Do USB devices work correctly?
        • Does the audio still work correctly?
        • The screen should go blank. Some time later, the machine should switch off.
        • Pressing the power button should result in the machine waking up. After a while, moving the mouse should result in a screen unlock box appearing.
        • Does the keyboard still work after resume?
        • Does the network still work after resume?
        • Do USB devices work correctly?
        • Does the audio still work correctly?

        Start a terminal and type the following:

        Questions

        • Another comment, can a foolproof means be found of adding columns to these tables? Perhaps Wiki has a gizmo that I don’t know about because I am such a beginner. [kenyon_karl (at) mail.com]
        • Please don’t drop old columns as long as there is a probability that someone uses that version and thus is interested in the information. Adding a new column is the appropriate way to go.
        • joosteto: the command is “invoke-rc.d” without spaces; you probably typed “invoke -rc.d”. Failing that, you could try: /etc/init.d/powernowd restart

        LaptopTesting (последним исправлял пользователь primes2h 2010-11-24 09:09:05)

        Capturing packets on a wireless LAN interface can be fun because you can see what other nearby laptops and access points are sending. By inspecting individual wireless LAN frames, you can see the detailed operation of the wireless LAN medium access control. I first tried capturing wireless LAN packets in 2002. Then, as it is now, the major difficulty was having drivers for your wireless card that support capturing (i.e. monitor or promiscuous mode). Then I used Cisco Aironet 350 PCMCIA cards, RedHat Linux and Ethereal (now called Wireshark). Nowadays many more cards are supported, but most features of capturing are usually only possible under Unix-like operating systems (its hard/impossible in Windows).

        Update 2015-03-09: The following instructions use iwconfig to enable monitor mode on wireless LAN interfaces in Linux; if written instructions for an alternative approach, using iw to enable monitor mode. I suggest reading/trying both; iw seems to be more powerful and now works more often for me than iwconfig .

        Here are some instructions for using my Samsung NC10 Ubuntu laptop to capture wireless LAN packets. First using the basic commands of iwconfig and tcpdump , and then the dedicated software Kismet. Of course capturing other peoples traffic may be illegal/unethical in some situations; don’t do it if you are not sure. Update (22 Mar 2012): Also I have a screencast below showing the steps on a Lenovo laptop. Either read on or watch the 16 minute video.

        Capture Wireless LAN Packets with tcpdump

        First make sure NetworkManager is not automatically connecting or turning interfaces on/off. Right-click on the network icon in Gnome and de-select Enable Networking (i.e. so networking is disabled).

        Turn the wireless LAN interface off (on my computer the OS labels the interface wlan0 ):

        Now use iwconfig to put the interface into monitor mode, check the interface status and then turn the interface on again:

        Update (29 Aug 2013): To set the channel to monitor you should select it before you enter monitor mode. That is, while the interface is in managed mode (e.g. connected to an AP), set the channel, e.g.:

        Packet capture software can now be used, and the wireless LAN card will capture all packets it can receive, even if they are not direct to your laptop. Here I use tcpdump:

        tcpdump will print out a single line on standard output for each packet received. Update (22 Mar 2012): the -n option prevents DNS lookups (e.g to convert an IP to DNS) – without this option it is possible that tcpdump will not capture all packets as it will be too slow performing the DNS lookups. To stop the capture press Ctrl-C . Note that by default in Ubuntu 12.04 and later tcpdump captures 65535 Bytes – effectively the entire packet. If you want to capture only a selection of the packet (e.g. first 64 Bytes to save storage space when capturing over a long period of time) and save to a file try:

        The file file.cap can now be opened in Wireshark for easier viewing.

        In monitor mode your wireless interface only receives packets–it cannot transmit (i.e. you have no normal network access via wireless). to return your wireless card to normal (managed) mode run:

        The wireless card is now associated with an access point again.

        Monitor Wireless LAN with Kismet

        Another way to monitor wireless LAN activities is to use a dedicated application like Kismet (on Windows similar software includes Netstumbler and Inssider). Kismet puts your wireless card into monitor mode and then provides a basic view of the different APs nearby (as identified by the captured packets).

        To install and configure on Ubuntu:

        You must edit the kismet.conf file to configure. Two things must be set (others are optional). First the SUID user should be set to your username:

        And the source needs to be set to identify your wireless LAN interface ( wlan0 on my computer, as well as the driver and card ( ath5k is the driver for my atheros based wireless card on my Samsung laptop. Steps for setting up Kismet on a Lenovo Ideapad V470 are described here.):

        After saving kismet.conf , start Kismet:

        If all is well, after a few seconds the Kismet interface will start showing you a list of APs. Press h for help and start exploring. To quit press Q . Make sure when Kismet exists it puts your wireless LAN interface back into managed mode. Check with iwconfig , and if not, do so your self with the above commands.

        In this tutorial, you’ll learn how to connect to wireless network from the terminal in Ubuntu. This is particularly helpful if you are using Ubuntu server where you don’t have access to the regular desktop environment.

        I primarily use desktop Linux on my home computers. I also have multiple Linux servers for hosting It’s FOSS and related websites and open source software like Nextcloud, Discourse, Ghost, Rocket Chat etc.

        I use Linode for quickly deploying Linux servers in cloud in minutes. But recently, I installed Ubuntu server on my Raspberry Pi. This is the first time I installed a server on a physical device and I had to do extra stuff to connect Ubuntu server to WiFi via command line.

        In this tutorial, I’ll show the steps to connect to WiFi using terminal in Ubuntu Linux. You should

        • not be afraid of using terminal to edit files
        • know the wifi access point name (SSID) and the password

        Connect to WiFi from terminal in Ubuntu

        How to turn your ubuntu laptop into a wireless access point

        It is easy when you are using Ubuntu desktop because you have the GUI to easily do that. It’s not the same when you are using Ubuntu server and restricted to the command line.

        Ubuntu uses Netplan utility for easily configuring networking. In Netplan, you create YAML file with the description of network interface and with the help of the netplan command line tool, you generate all the required configuration.

        Let’s see how to connect to wireless networking from the terminal using Netplan.

        Step 1: Identify your wireless network interface name

        There are several ways to identify your network interface name. You can use the ip command, the deprecated ipconfig command or check this file:

        This should give you all the available networking interface (Ethernet, wifi and loopback). The wireless network interface name starts with ‘w’ and it is usually named similar to wlanX, wlpxyz.

        Take a note of this interface name. You’ll use it in the next step.

        Step 2: Edit the Netplan configuration file with the wifi interface details

        The Netplan configuration file resides in /etc/netplan directory. If you check the contents of this directory, you should see files like 01-network-manager-all.yml or 50-cloud-init.yaml.

        If it is Ubuntu server, you should have cloud-init file. For desktops, it should be network-manager file. This is one of the several ways Ubuntu desktop differs from Ubuntu server.

        The Network Manager on the Linux desktop allows you to choose a wireless network. You may hard code the wifi access point in its configuration. This could help you in some cases (like suspend) where connection drops automatically.

        Whichever file it is, open it for editing. I hope you are a tad bit familiar with Nano editor because Ubuntu comes pre-installed with it.

        YAML files are very sensitive about spaces, indention and alignment. Don’t use tabs, use 4 (or 2, whichever is already used in the YAML file) spaces instead where you see an indention.

        Basically, you’ll have to add the following lines with the access point name (SSID) and its password (usually) in quotes:

        Again, keep the alignment as I have shown or else YAML file won’t be parsed and it will throw an error.

        Your complete configuration file may look like this:

        I find it strange that despite the message that changes will not persist across an instance reboot, it still works.

        Anyway, generate the configuration using this command:

        And now apply this:

        If you are lucky, you should have network connected. Try to ping a website or run apt update command.

        However, things may not go as smooth and you may see some errors. Try some extra steps if that’s the case.

        Possible troubleshooting

        It is possible that when you use the netplan apply command, you see an error in the output that reads something like this:

        It is possible that wpa_supplicant service is not running. Run this command:

        Run netplan apply once again. If it fixes the issue well and good. Otherwise, shutdown your Ubuntu system using:

        Start your Ubuntu system again, log in and generate and apply netplan once again:

        It may show warning (instead of error) now. It is warning and not an error. I checked the running systemd services and found that netplan-wpa-wlan0.service was already running. Probably it showed the warning because it was already running and ‘netplan apply’ updated the config file (even without any changes).

        It is not crtical and you may check that the internet is probably working already by running apt update.

        I hope you were able to connect to wifi using the command line in Ubuntu with the help of this tutorial. If you are still facing trouble with it, do let me know in the comment section.