Sharing the Internet from a laptop via command line — is a universal way to create a Wi-Fi hotspot without third-party software. It works even where the Windows graphical interface refuses to cooperate: in case of driver failures, lack of administrator rights on some corporate networks, or on stripped-down versions of the OS. But there are some nuances: not all adapters support the mode. SoftAP (software access point), and incorrect commands can lead to network conflicts.
In this article you will find not only step-by-step instructions with commands for netsh, but also an analysis of typical mistakes (like Failed to start hosted network), ways to check hardware compatibility, and tips for boosting the signal. We'll also compare this method with alternatives—Windows Mobile Hotspot and third-party utilities like Connectify or mHotspotIf you urgently need to share internet with your phone, tablet, or another PC, read on.
Hardware Compatibility Check: Does Your Laptop Support Wi-Fi Sharing?
Before entering commands, make sure your Wi-Fi adapter capable of operating in the mode SoftAPThis is not a universal feature: some older or cheaper models (for example, chip-based adapters) Realtek RTL8188CE or Broadcom 4313) may not support creating an access point. Here's how to check:
Open command prompt as administrator (click
Win + X→Terminal (Administrator)).Enter the command:
netsh wlan show driversFind the line
Hosted network support. If it is indicated thereYes— we can continue. IfNo- your adapter is not suitable.
Another criterion is - Windows versionOn . Windows 7 And Windows 8.1 Additional drivers may be required, and Windows 11 sometimes there are conflicts with the function Mobile hotspotIf you have Linux or macOS - this method will not work (other commands are used there, for example, create_ap for Linux).
⚠️ Attention: If the command output netsh wlan show drivers There is no line about hosted network support, please update the adapter driver via device Manager or the manufacturer's website. In rare cases, rolling back the driver to an older version helps.
Preparing your laptop: Setting up a network connection before sharing
To distribute the Internet, the laptop itself must be connected to the network - via Ethernet, USB modem or another Wi-Fi adapter (if there are two of them). If you use mobile Internet (3G/4G), make sure that your tariff allows data sharing (some operators block this functionality).
Next, check that:
- 🔹 On a laptop VPN is disabled (it may conflict with the distribution).
- 🔹 In
Network and Control CenterincludedGeneral accessfor the connection through which the laptop receives the Internet. - 🔹 Windows Firewall does not block incoming connections (temporarily disable it for testing).
- 🔹 On a laptop there are no active access points from third-party programs (for example, Virtual Router Plus).
If you are distributing the Internet with Ethernet, run in the command line:
netsh interface ipv4 set address "Ethernet" static 192.168.137.1 255.255.255.0
This command sets a static IP for the primary connection, which will help avoid conflicts with DHCP when distributing.
☑️ Preparing for Wi-Fi distribution
Creating an Access Point: Commands for Starting Wi-Fi Distribution
Now we move on to the main stage. All commands are entered in command prompt as administratorIf you closed it, reopen it (administrator rights are required!).
Step 1: Set the network name (SSID) and password. Replace MyWiFi And 12345678 to your values (password - at least 8 characters):
netsh wlan set hostednetwork mode=allow ssid=MyWiFi key=12345678
Step 2: Start the hosted network:
netsh wlan start hostednetwork
If everything went well, you will see the message: The hosted network is launchedNow we need to enable internet sharing:
Open
Control Panel → Network and Sharing Center → Change adapter settings.Find the connection through which the laptop receives the Internet (for example,
EthernetorWireless network), right-click →Properties→ tabAccess.Check the box
Allow other network users to share your Internet connectionand select from the listLocal Area Connection* X(where X is a number, usually from 1 to 10).
Troubleshooting: What to do if Wi-Fi isn't working?
Even if you enter commands correctly, errors may still occur. Here are the most common errors and their solutions:
| Error | Cause | Solution |
|---|---|---|
Failed to start the hosted network. The group or resource is not in the required state. |
The adapter driver does not support SoftAP or conflicts with other services. | Update your driver or roll it back to a previous version. Check if your antivirus software is blocking the distribution (for example, Kaspersky). |
Connection to the network cannot be achieved because the maximum number of users is already connected. |
By default, Windows limits the number of connected devices (usually 1-2). | Change the limit with the command: netsh wlan set hostednetwork maxclients=10 (where 10 is the new maximum number of devices). |
| The devices connect, but the internet doesn't work. | IP sharing or conflict is not configured. | Check your sharing settings (see step 3 of the previous section). Run the following in CMD: ipconfig /release, then ipconfig /renew. |
The WLAN AutoConfig service is not running. |
The system service is disabled. WLAN AutoConfig. | Run it with the command: net start Wlansvc or turn on services.msc. |
Critical detail: If Wi-Fi sharing is not restored automatically after rebooting the laptop, add the command netsh wlan start hostednetwork V Task Scheduler Windows with the "At system startup" trigger.
⚠️ Attention: On some laptops with Intel Wi-Fi 6 (AX200/AX210) Command line sharing is unstable due to driver issues. In this case, use the built-in Mobile hotspot (Windows 10/11) or third-party utilities.
Signal Optimization: How to Boost Your Laptop's Wi-Fi Signal
The signal from a software access point is weaker than that of a regular router, but it can be improved:
- 📶 Laptop positioning: Place it on an elevated surface (such as a table), away from metal objects and other sources of interference (microwaves, cordless phones).
- 🔄 Changing the Wi-Fi channel: By default, Windows selects a channel automatically, but it may be overloaded. Check for available channels in the program. Wi-Fi Analyzer (Android) or inSSIDer (PC), then change the channel with the command:
netsh wlan set hostednetwork channel=6(where 6 is the channel number from 1 to 11 for 2.4 GHz or from 36 to 165 for 5 GHz).
- 🔋 Energy Saving: IN Device Manager Disable the option for the Wi-Fi adapter
Allow the computer to turn off this device to save power(tabPower management). - 🔌 Laptop power supply: When running on battery power, Windows may limit the power supplied by the adapter. Connect the laptop to a 220V power source.
If the signal is still weak, consider purchasing USB Wi-Fi adapter with an external antenna (for example, TP-Link TL-WN823N or ASUS USB-AC56). Such devices support SoftAP and provide a more stable signal.
Why is my internet speed when sharing data slower than on my laptop?
When distributing Wi-Fi via SoftAP Speed may drop by 30-50% due to software packet processing. This is normal: the laptop is not optimized for router use. To reduce losses, disable background downloads (torrents, cloud syncs) and use the 5 GHz channel (if your adapter supports it).
Alternative Wi-Fi Sharing Methods: When the Command Line Doesn't Work
If netsh refuses to cooperate, try these methods:
-
Windows Mobile Hotspot (Windows 10/11):
Go to
Settings → Network & Internet → Mobile HotspotSelect the internet source (Ethernet/Wi-Fi) and clickTurn onCons: Limited to 8 connected devices and potential conflicts with VPN. -
Third-party programs:
- 🔧 Connectify Hotspot — paid, but with advanced settings (MAC address filtering, ad blocker).
- 🆓 mHotspot — free, supports up to 10 devices, but contains ads.
- 🛠️ Virtual Router Plus - simple, but may not work on Windows 11.
Modem mode on a smartphone:
If the laptop is connected to the Internet via USB modem or smartphone, it's easier to distribute Wi-Fi directly from your phone (in the settings) Access point and modem). This will save your laptop's resources.
Comparison of methods:
| Way | Pros | Cons |
|---|---|---|
Command line (netsh) |
No software installation required, works on all versions of Windows. | Difficult to set up, possible driver errors. |
| Windows Mobile Hotspot | Simple interface, stable operation. | 8 device limit, conflicts with VPN. |
| Third-party programs | Additional functions (e.g. traffic control). | Advertising, possible data leaks (especially in free versions). |
Security: How to protect your hotspot?
By default, a network created through netsh, uses a security protocol WPA2-PSK - it's reliable, but there are some nuances:
- 🔐 Complex password: Use a combination of letters, numbers, and symbols (eg.
WiFi@MyLaptop#2026). Avoid simple passwords like12345678orqwerty. - 🔄 Changing your password regularly: If you frequently share Wi-Fi in public places, change the password once a week.
- 👥 Device limitation: By default, anyone can connect to your network. To restrict access, use MAC address filtering (requires third-party software, such as Connectify).
- 🛡️ Disabling distribution: After use, stop the network with the command:
netsh wlan stop hostednetworkThis will prevent unauthorized connections when you are not using the hotspot.
If you are distributing the Internet in in a public place (for example, in a cafe or coworking space), consider creating guest network via a router instead of sharing from a laptop. This is safer: guest traffic is isolated from your main network.
⚠️ Attention: Some internet providers (especially mobile carriers) block Wi-Fi hotspots if they violate their plan's terms. For example, plans marked "Smartphones Only" may restrict laptop use as a hotspot. Check your plan's rules in your account.
FAQ: Answers to frequently asked questions
Is it possible to share Wi-Fi from a laptop if it is connected to Wi-Fi (without Ethernet)?
Technically yes, but it requires two Wi-Fi adapters: one for connecting to the internet, the other for distributing data. Most laptops only have one adapter, so this scenario is impossible. The exception is laptops with M.2 slots, where you can install a second Wi-Fi module.
Alternative: Connect your laptop to the internet via USB modem (4G/5G) or Ethernet, and use Wi-Fi for distribution.
Why doesn't Wi-Fi automatically connect after rebooting my laptop?
Team netsh wlan start hostednetwork Resets on reboot. To automate startup:
Create a file
start_wifi.batwith the teamnetsh wlan start hostednetwork.Put it in startup: click
Win + R, entershell:startupand drag the file into the folder that opens.
Or customize Task Scheduler Windows, as described above.
How to share Wi-Fi on a laptop running macOS or Linux?
On macOS use the built-in function General access:
Go to
System Preferences → Sharing.Select
Public Internet→ specify the source (Ethernet/Wi-Fi) and checkWi-Fion the listConnect computers via.Click
Wi-Fi settingsand set the network name/password.
On Linux (Ubuntu/Debian) install the utility create_ap:
sudo apt install create_ap
sudo create_ap wlan0 eth0 MyWiFi 12345678
(Where wlan0 — Wi-Fi interface, eth0 — interface with the Internet).
Is it possible to share Wi-Fi from a laptop? Windows 7?
Yes, but with some reservations:
- 🔹 Required SP1 (Service Pack 1) or newer.
- 🔹 Your Wi-Fi adapter driver must support SoftAP (check through
netsh wlan show drivers). - 🔹 There may be issues with IPv6 - disable it in the connection properties if devices are not connecting.
The commands are the same as for Windows 10/11, but a reboot may be required after setting up sharing.
How do I know how many devices are connected to my hotspot?
Windows doesn't have a built-in tool for monitoring devices connected to it. SoftAP. Use:
- 🔹 Team:
arp -a— will show IP and MAC addresses of devices on the local network. - 🔹 Third-party utilities: Wireless Network Watcher (NirSoft) or Angry IP Scanner.
- 🔹 Router: If your laptop is connected to the router via Ethernet, check the list of devices in the router's web interface (usually at
192.168.1.1).