Sharing the internet with Linux Mint via Wi-Fi is a challenge faced by owners of laptops and PCs with wireless adapters. Unlike Windows or macOS, where the process is highly automated, Linux requires manual configuration or the use of specialized utilities. This article will help you deploy an access point (AP) on Linux Mint 21.x (based on Ubuntu 22.04/24.04) with minimal effort, even if you've never worked with the terminal.
We will consider three methods: through built-in tools NetworkManager, using the utility create_ap and the classic way with hostapd + dnsmasqEach option has its advantages: the first is suitable for beginners, the second is for stable operation with modern adapters, and the third is for advanced users who require fine-tuning. Important: Not all Wi-Fi adapters support access point mode (AP mode) - check the compatibility of your device before setting up.
If you're sharing internet from a laptop, make sure it's connected to the network via Ethernet or a USB modem. Sharing mobile internet (3G/4G) will require additional routing configuration. All commands in this article were tested on Linux Mint 21.3 Cinnamon with kernel 5.15+, but will also work with other editions (MATE, Xfce) with minimal modifications.
1. Checking Wi-Fi adapter compatibility
Before setting up an access point, make sure your Wi-Fi adapter supports the mode. Access Point (AP)Not all devices are capable of distributing the network—this is especially true for budget USB adapters and some built-in chips.
To check compatibility, run in terminal:
iw list | grep -A 10 "Supported interface modes"
Look for the line in the output * APIf it's not there, your adapter won't be able to distribute Wi-Fi in access point mode. In this case, you have two options:
- 🔄 Use the mode Ad-Hoc (outdated, not supported by most modern devices).
- 🛒 Purchase an external Wi-Fi adapter with AP support (we recommend models with chips) Ralink RT5370, Realtek RTL8188EU or Atheros AR9271).
Also check if Wi-Fi is blocked at the BIOS/UEFI level or by a hardware switch (relevant for some laptops) Lenovo, HP And Dell). If the adapter is displayed in the system, but does not connect to networks, run:
rfkill list
Look for lines with Soft blocked: yes or Hard blocked: yesYou can unblock it with the command:
sudo rfkill unblock wifi
2. Sharing Wi-Fi via NetworkManager (the easiest way)
Modern versions Linux Mint supplied with the utility NetworkManager, which can create hotspots in just a few clicks. This method is suitable for one-time internet sharing without complex setup.
Instructions:
- Open the network menu in the lower right corner of the panel (Wi-Fi icon).
- Select
Create a new Wi-Fi hotspot...(in the English version -Create New Wi-Fi Network...). - Set network parameters:
- 📛 Network name (SSID): any name in Latin (for example,
Mint-Hotspot). - 🔒 Security: select
WPA & WPA2 Personal(do not useOpen network!). - 🔑 Password: minimum 8 characters (we recommend using letters, numbers and special characters).
- 📛 Network name (SSID): any name in Latin (for example,
Create and confirm the action.After this, your access point will appear in the list of available networks. Connect devices (smartphone, tablet, or another PC) to it and test internet access. If there's no internet connection, make sure your primary connection (Ethernet or mobile data) is active and not blocked by a firewall.
☑️ Check before distribution via NetworkManager
⚠️ Attention: NetworkManager can automatically turn off an access point after 30-60 minutes of inactivity. To avoid this, create an access point in the terminal with the following parameter: --persist (see next section).
3. Sharing Wi-Fi using the create_ap utility (recommended method)
Utility create_ap - this is a wrapper over hostapd And dnsmasq, which simplifies access point setup. It supports most modern Wi-Fi adapters and allows for flexible network configuration.
Install create_ap from repositories:
sudo apt update && sudo apt install create_ap
Basic command to start the access point (replace wlan0 to the name of your Wi-Fi interface, and eth0 — to the Internet interface):
sudo create_ap wlan0 eth0 Mint-Hotspot MySuperPassword
Explanation of parameters:
| Parameter | Description | Example of meaning |
|---|---|---|
wlan0 |
Wi-Fi interface name (check via ip a) |
wlp3s0, wlx00c0caabc123 |
eth0 |
Internet interface (Ethernet or USB modem) | enp0s3, eth1 |
Mint-Hotspot |
Network name (SSID) | MyLinuxAP |
MySuperPassword |
Password (minimum 8 characters) | Linux123! |
Additional options for stable operation:
- 🔄
--no-virt— disables the virtual interface (may help with errors). - 📶
--channel 6— sets a fixed channel (useful in apartment buildings). - 🔒
--hidden- makes the network hidden (SSID is not broadcast). - ⏳
--persist— the access point does not turn off when there are no clients.
Example of a command with additional parameters:
sudo create_ap wlan0 eth0 MyNetwork SecurePass123 --channel 6 --persist --no-virt
⚠️ Attention: If after launchcreate_apan error appearsNL80211_DRIVER_UNINITIALIZED, upgrade your Linux kernel to version 5.4+, or use another method (section 4).
How do I find out the name of my Wi-Fi interface?
Run the command ip a and look for an interface with a name starting with wlan, wlp or wlx. For example:
2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
In this example, the interface name is wlp3s0.
4. Manually configuring an access point with hostapd and dnsmasq (for advanced users)
If the previous methods did not work or you need maximum flexibility (e.g., setting the range, filtering MAC addresses), use the bundle hostapd (for Wi-Fi control) and dnsmasq (for distributing IP addresses).
Install the required packages:
sudo apt install hostapd dnsmasq
Stop the services to configure them manually:
sudo systemctl stop hostapd
sudo systemctl stop dnsmasq
Create a configuration file for hostapd:
sudo nano /etc/hostapd/hostapd.conf
Add the following lines to the file (replace the parameters with your own):
interface=wlan0driver=nl80211
ssid=MyLinuxAP
hw_mode=g
channel=6
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=SecurePassword123
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Now set it up dnsmasq to distribute IP addresses. Edit the file /etc/dnsmasq.conf:
sudo nano /etc/dnsmasq.conf
Make sure the file contains the following lines (comment out or delete the rest):
interface=wlan0dhcp-range=192.168.100.100,192.168.100.200,255.255.255.0,24h
dhcp-option=3,192.168.100.1
server=8.8.8.8
server=8.8.4.4
Start the services manually for testing:
sudo hostapd /etc/hostapd/hostapd.conf
sudo dnsmasq
If everything works, add the services to startup:
sudo systemctl unmask hostapdsudo systemctl enable hostapd
sudo systemctl enable dnsmasq
sudo systemctl start hostapd
sudo systemctl start dnsmasq
⚠️ Attention: When setting manuallyhostapdAnddnsmasqmay conflict with NetworkManagerTo avoid problems, disable Wi-Fi management in NetworkManager for the interfacewlan0:sudo nmcli dev set wlan0 managed noAfter this, reboot the system.
5. Troubleshooting common errors
When sharing Wi-Fi on Linux Mint, users often encounter common problems. Here are the most common ones and how to solve them:
| Error | Cause | Solution |
|---|---|---|
Device or resource busy |
The interface is busy with another process (e.g. NetworkManager) | Stop conflicting services:
Or disable Wi-Fi control:
|
SIOCSIFADDR: No such device |
Invalid interface name or adapter does not support AP mode. | Check the interface name (ip a) and adapter compatibility (iw list) |
| The access point is created, but the Internet is not distributed | There is no routing between interfaces | Enable IP packet forwarding:
And configure NAT:
|
Failed to create interface in create_ap |
Insufficient rights or conflict with other network services | Run the command with sudo and add a flag --no-virt |
If after all these steps the access point does not appear, check the logs:
sudo journalctl -u hostapd -f
or for create_ap:
sudo create_ap --debug wlan0 eth0 MyNetwork MyPass
Often the problem lies in the Wi-Fi adapter drivers. For chip-based adapters Realtek (For example, RTL8188EU, RTL8812AU) you may need to install proprietary drivers:
sudo apt install rtl8812au-dkms
6. Access point optimization and security
Creating a hotspot is only half the battle. To ensure it works reliably and securely, follow these recommendations:
- 🔐 Complex password: Use a password of at least 12 characters with letters, numbers, and special characters. Avoid simple combinations like
12345678orqwerty. - 📡 Channel selection: In apartment buildings, Wi-Fi networks often overlap. Check channel load with the command:
sudo iwlist wlan0 scanning | grep ChannelSelect the least crowded channel (for example, 1, 6, or 11 for 2.4 GHz).
- 🔄 Client Limitation: If you are distributing the Internet to a limited number of devices, enable MAC address filtering in
hostapd.conf:macaddr_acl=1accept_mac_file=/etc/hostapd/accept_mac.listTo file
accept_mac.listAdd allowed MAC addresses (one per line). - ⏱️ Auto power off: To turn off the access point after a certain time, use
atorsystemd-timers. Example:echo "sudo systemctl stop hostapd" | at now + 2 hours
To improve connection stability:
- 📶 Disable Wi-Fi adapter power saving:
sudo iwconfig wlan0 power off - 🔧 Increase the transmit power (if your adapter supports it):
sudo iwconfig wlan0 txpower 20(the maximum value depends on the adapter model, usually 20–30 dBm).
If you are sharing internet via a mobile connection (3G/4G modem), make sure that your operator is not blocking data transfer traffic. Some plans (for example, Megaphone or Beeline) restrict the use of the phone/modem as an access point.
7. Alternative methods of distributing the Internet
If sharing via Wi-Fi is not possible (for example, due to an incompatible adapter), consider alternative options:
- 🔌 Ethernet Bridge: If you have a second PC or router, connect them via cable and set up a bridge between the interfaces. This will require configuration.
bridge-utils. - 📡 Bluetooth PAN: You can share your internet connection via Bluetooth (speeds up to 3 Mbps). Enable it in the Bluetooth settings as "Personal Area Network."
- 🔗 USB cable (Reverse Tethering): For Android devices, you can use a USB cable and a program gnirehtet (installed via
snap). - 📶 External router: Connect the Ethernet cable from your PC to the WAN port of the router and configure it in "Repeat/Extender" mode.
To share via Bluetooth, follow these steps:
- Install packages:
sudo apt install blueman - Open Blueman Manager (from the menu or command
blueman-manager). - Turn on Bluetooth visibility and connect the device.
- In the device context menu, select
Personal Area Network → Access Point.
The speed will be lower than Wi-Fi, but it will be enough for instant messaging or light surfing.
FAQ: Frequently Asked Questions about Wi-Fi Sharing on Linux Mint
Is it possible to share Wi-Fi and be connected to another network at the same time?
Yes, but for this to work your Wi-Fi adapter must support the mode. AP+STA (simultaneous operation as an access point and client). Most built-in laptop adapters don't support this. Solution:
- Use two Wi-Fi adapters (built-in + USB).
- Connect to the Internet via Ethernet or a 4G modem, and leave Wi-Fi for distribution.
Check AP+STA support with the command:
iw list | grep -A 5 "valid interface combinations"
Look for combinations with AP And managed.
Why is the internet speed via shared Wi-Fi lower than via cable?
This is normal because:
- The Wi-Fi adapter divides the bandwidth between receiving and transmitting data.
- The Wi-Fi protocol has overhead for encryption and connection management.
- Interference from other networks (especially in the 2.4 GHz range) affects the signal.
To improve speed:
- Switch to the 5 GHz band (if the adapter supports it).
- Use 40 MHz wide channels (in
hostapd.confaddhw_mode=aAndchannel=36for 5 GHz). - Turn off adapter power saving (
iwconfig wlan0 power off).
How can I make the access point start automatically when the system starts?
For create_ap:
- Create a service:
sudo nano /etc/systemd/system/create_ap.service - Add to file:
[Unit]Description=Wi-Fi Hotspot
After=network.target
[Service]
ExecStart=/usr/bin/create_ap wlan0 eth0 Mint-Hotspot MyPassword --persist
ExecStop=/usr/bin/pkill create_ap
[Install]
WantedBy=multi-user.target - Activate the service:
sudo systemctl enable create_apsudo systemctl start create_ap
For hostapd + dnsmasq:
They're already added to startup in section 4. To make sure everything's working, check the status:
sudo systemctl status hostapd
sudo systemctl status dnsmasq
Is it possible to share Wi-Fi with Linux Mint in a virtual machine?
Technically yes, but with some caveats:
- 🖥️ The virtual machine must have direct access to the Wi-Fi adapter (mode
PCI Passthrough). This is not possible in VirtualBox or VMware—the adapter will be emulated, and AP mode will not work. - 🔧 Solution: Use USB Wi-Fi adapter and transfer it to the VM through the USB devices menu. VirtualBox this is done through
Devices → USB → [Your adapter]. - ⚠️ Performance will be lower due to virtualization overhead.
The best option is to distribute Wi-Fi from the host OS (Windows/Linux), and connect to the created network in the VM.
How to change the name (SSID) or password of an access point without restarting it?
If the access point is already running:
- For
create_ap: stop the process (Ctrl+Cin the terminal) and run it again with new parameters. - For
hostapd:- Edit
/etc/hostapd/hostapd.conf. - Restart the service:
sudo systemctl restart hostapd
- Edit
Changes take effect immediately after restarting. Clients will be disconnected and must reconnect with the new password.