Situations where you need to quickly provide internet access to a smartphone, tablet, or another laptop arise quite often, especially if the router suddenly stops working or you're on a business trip. Operating system Linux has powerful built-in networking tools that let you turn your laptop into a fully-fledged access point in minutes. Unlike Windows, which often requires third-party software, Linux distributions can create hotspot natively, using standard graphical interface utilities or the command line.
Before you begin setting up, you need to make sure your network adapter supports access point mode. Most modern Wi-Fi modules, especially those using chipsets from Intel or Atheros, do this job perfectly without installing additional drivers. However, if you're using specific hardware or older USB dongle models, protocol compatibility issues may arise. In this guide, we'll cover both graphical methods available in popular desktop environments and console commands for advanced users.
It's important to understand that creating an access point is different from a regular network connection, as the laptop takes on the functions of a router, distributing IP addresses and managing traffic. For stable internet distribution, the laptop must be connected to a wired Ethernet network or have an active connection via a 4G/5G USB modem. Trying to distribute Wi-Fi while receiving internet via the same wireless channel is only possible with two physical adapters or support for WDS technology, which is rare and requires complex configuration.
Checking network adapter compatibility
The first step should always be hardware diagnostics, as not every Wi-Fi adapter is capable of operating in AP (Access Point) mode. To obtain detailed information about your network interface, use the terminal utility iw list, which displays all supported operating modes. You need to find the section Supported interface modes and make sure the word is in the list APIf this mode is not available, you won't be able to activate the access point programmatically, and the adapter will need to be replaced.
It's also worth paying attention to the frequency ranges your device supports. Modern standards allow operation in both the 2.4 GHz and 5 GHz bands, but older devices may not detect the higher-frequency network. However, the 5 GHz band offers higher speeds and is less susceptible to interference from household appliances, which is critical for transmitting large amounts of data. Checking these parameters will help avoid situations where a network is established but client devices simply cannot detect it.
To quickly check your adapter's capabilities, you can run the following command in the terminal, filtering out unnecessary information:
iw dev | grep iface -A 10 | grep "Supported interface modes" -A 6
If the command output contains the desired value AP, then you have the technical capability to share the internet. Otherwise, the system will only report the modes managed (client) and monitor (monitoring), which makes creating a hotspot impossible on this equipment.
⚠️ Attention: Some proprietary drivers (such as Broadcom or older versions of Realtek) may incorrectly report supported modes or block access point mode. If the command shows AP support but the network doesn't create, try replacing the driver with an open-source equivalent. linux-firmware.
Creating an access point via the graphical interface
The easiest and most accessible way to share WiFi from a Linux laptop is to use built-in graphical shell features like NetworkManager, which is the de facto standard for Ubuntu, Fedora, Mint, and Debian distributions. This method requires no command line knowledge and is ideal for beginners, allowing you to set up a network similar to how you would on a smartphone. Simply click the network icon in the system tray and select the appropriate menu item.
The setup process is intuitive: go to network settings, select to create a new Wi-Fi network or access point mode, then enter a name (SSID) and password. The system will automatically select the optimal security settings, typically suggesting an encryption standard. WPA2/WPA3, which provides reliable protection of transmitted data from unauthorized connections. Once the hotspot is activated, other devices will be able to find your network in the list of available connections.
In some desktop environments, such as GNOME or KDE Plasma, the interface may differ slightly, but the logic remains the same. If you can't find the Create Hotspot button in the quick menu, access the full system settings via the section Settings → Network → Wi-FiThey often contain hidden additional options that allow you to fine-tune your broadcast channel and hide your network from prying eyes.
☑️ Configuring GUI hotspot
Setting up a hotspot via the terminal (nmcli)
For system administrators and minimalists, the ideal solution is to use a command line utility. nmcli, which is part of the NetworkManager package. This tool provides complete control over network connections and allows you to create, modify, and delete access point profiles without accessing the graphical interface. The command syntax may seem complex at first glance, but it is highly predictable and logical.
To create a new access point, you need to create a command specifying the connection type, device name, network SSID, and security key. Below is an example command that will create a secure network named "MyLinuxHotspot" with the password "SecurePass123":
nmcli device wifi hotspot ssid MyLinuxHotspot password SecurePass123
After executing this command, the system will automatically activate the created profile, and the laptop will begin broadcasting a signal. If you need to change the parameters of an existing network, for example, change the channel or security type, you can use the command nmcli connection modify indicating the profile name and new parameter values.
Using the terminal is especially convenient when setting up servers without a graphical shell or when you need to automate internet sharing via scripts. You can program the access point to launch at system startup or when a specific USB device is connected, which makes this method nmcli an extremely flexible tool in the hands of an experienced user.
Troubleshooting driver and compatibility issues
Despite excellent hardware support in the Linux kernel, users sometimes encounter issues where an access point is created but devices fail to connect, or devices see the network but don't receive an IP address. Often, the root cause of the problem lies in the wireless adapter drivers, which may incorrectly implement AP mode or require manual firmware installation. Troubleshooting begins with reviewing the system logs using the command dmesg or journalctl, where you can find initialization errors.
A common issue is frequency band conflicts: the adapter may be configured to operate only in a specific region or band that is not supported by the client device. In such cases, forcing the channel and frequency to be specified when establishing a connection can help. It's also worth checking whether power saving mode is enabled for the Wi-Fi adapter, which can turn off the module when there is no active data transfer, disconnecting the connection with clients.
The table below shows common problems and their solutions in the Linux environment:
| Problem | Possible cause | Solution |
|---|---|---|
| Devices don't see the network | Incorrect range (5GHz vs 2.4GHz) | Change the channel to 1-11 or the range to 2.4 GHz |
| "Failed to create AP" error | The driver does not support AP mode. | Check iw list, update firmware |
| No internet access | NAT or DNS not configured | Check IPv4 settings (Shared to other computers) |
| Low speed | Interference or the old 802.11g standard | Use 5 GHz, check channel load |
⚠️ Attention: If you're using a VPN client, it may intercept all traffic and block internet sharing within your local network. You should add an exception for local addresses in your VPN settings or temporarily disable protection to test it.
Setting up security and restricting access
Security of the access point you create is a critical aspect, especially if you are in a public place or office where intruders may attempt to connect to your network. Encryption standard WPA2-Personal is a minimum requirement, but modern Linux systems allow the use of a more advanced protocol WPA3, if your hardware supports it. Using weak passwords or an open network is strongly discouraged, as all traffic will be transmitted in cleartext.
For an additional layer of security, you can configure MAC address filtering, allowing connections only to trusted devices. While MAC addresses are easy to spoof, this will create an additional barrier to unauthorized users. Additionally, in your firewall settings (e.g., ufw or firewalld) It is worth making sure that packet transmission between interfaces is allowed, but the ports for managing the system from the external network are closed.
What is MAC filtering?
This is an access control method where network equipment (in this case, your laptop) checks the unique physical address of each connecting device. If the address isn't on the whitelist, network access is blocked, even if the password is entered correctly.
Keep in mind that a laptop distributing Wi-Fi consumes more power because the wireless module operates in high-power mode. If you're running on battery power, this can significantly reduce battery life. It's recommended to connect the device to a power source or configure it to automatically turn off the access point when the battery level drops below a certain threshold.
Frequently Asked Questions (FAQ)
Is it possible to share Wi-Fi if the laptop is connected to the Internet via Wi-Fi?
In most cases, a single Wi-Fi adapter can't simultaneously receive and transmit a signal on the same frequency. This requires two adapters (for example, a built-in one and a USB one) or support for interface virtualization technology, which is unstable. The optimal solution is to connect your laptop to the internet via an Ethernet cable.
Why does the phone see the network, but says "Failed to connect"?
This is most often due to incompatibility between security standards or frequency bands. Try changing the security type to WPA2/WPA3 Mixed Mode or switching the broadcast channel in the access point settings to a more common one (e.g., 1, 6, or 11 for 2.4 GHz).
How do I find out who is connected to my hotspot?
You can use the utility arp -a or a team nmcli device show in the terminal to see a list of active connections and their IP/MAC addresses. The number of connected clients is also sometimes displayed in NetworkManager's graphical settings.
Are access point settings reset after reboot?
If you've created a connection profile (which is the default in NetworkManager), the settings are saved. However, the access point itself may not automatically turn on at system startup. To enable automatic startup, you can add the connection activation command to your startup scripts or use nmcli connection up id "Profile_Name".