Combining two laptops into local network via Wi-Fi — a challenge faced by students collaborating on projects, gamers playing multiplayer games offline, or employees in small offices sharing files. Unlike a wired connection (Ethernet), wireless communication requires proper network configuration, protocol selection, and sometimes even manual assignment of IP addresses. In this article, we'll examine all the current methods—from creating ad-hoc-networks in Windows before using the mode Hotspot on macOS, and we'll also look at typical errors and their solutions.
It is important to understand that a local network via Wi-Fi between two devices works without a router, but it has speed limitations (maximum ~50-70% of the adapter's theoretical throughput) and stability. If you need to transfer large files (for example, videos in 4K), it is better to use Ethernet-cable or external drive. However, for most tasks—sharing folders, playing games over a local network, or syncing data—a Wi-Fi connection is perfectly sufficient.
1. Methods for connecting laptops via Wi-Fi: which one to choose?
There are three main methods for creating a local network between two laptops without a router:
- 🔹 Ad-hoc network (Windows/Linux) - a temporary point-to-point network where one device acts as host, and the second one connects to it. Supported by all versions of Windows starting from XP, but in Windows 10/11 hidden in the interface.
- 🔹 Hotspot mode (Windows 10+/macOS/Linux) — one laptop distributes Wi-Fi, the other connects to a regular access point. More stable, but requires support.
Hosted Networkin the Wi-Fi adapter driver. - 🔹 Wi-Fi Direct - a modern protocol for direct connection (as Bluetooth, but faster). Supported by most laptops after 2015, but the setup depends on the adapter manufacturer (Intel, Qualcomm, Broadcom).
The choice of method depends on the operating system and hardware capabilities. For example, Wi-Fi Direct — the easiest way for Windows 11 And macOS Monterey, but may not work on older adapters. Ad-hoc It's universal, but requires manual IP configuration. Below is a comparison table:
| Method | Speed | Difficulty of setup | OS support | Restrictions |
|---|---|---|---|---|
| Ad-hoc | Up to 54 Mbps (802.11g) | Average | Windows, Linux | No support on macOS, slower Hotspot |
| Hotspot | Up to 300+ Mbps (802.11n/ac) | Low | Windows 10+, macOS, Linux | Needs support Hosted Network in the driver |
| Wi-Fi Direct | Up to 1 Gbps (802.11ac/ax) | Low | Windows 8.1+, macOS 10.10+, Linux (with drivers) | Not all adapters support it, there may be problems with drivers. |
If you're not sure which method to choose, start with Wi-Fi Direct (if your laptops were released after 2016) or Hotspot (for versatility). Ad-hoc leave it in case the first two options don't work.
2. Method 1: Creating an Ad-hoc Network in Windows (without a Router)
Ad-hoc (from Latin "for this purpose") is a temporary network where one device acts as host, and the second one connects to it. Windows 10/11 This function is hidden, but it can be launched through command line or Control PanelThe instructions below are suitable for Windows 7/8.1/10/11.
Step 1: Check for support
Not all Wi-Fi adapters support ad-hocTo check, open Command line as administrator and enter:
netsh wlan show drivers
Find the line in the output Hosted network support. If it is indicated there Yes, we can continue. If No - try updating the driver or use another method.
Step 2: Creating a Network
In the same command line, run:
netsh wlan set hostednetwork mode=allow ssid="MyAdHocNet" key="12345678" keyUsage=persistent
Where:
- 🔹
MyAdHocNet— network name (can be replaced) - 🔹
12345678— password (minimum 8 characters)
Then start the network:
netsh wlan start hostednetwork
Make sure the Wi-Fi adapter is enabled on both laptops|The network password contains at least 8 characters|The connection to other networks is disabled on the second laptop|Antivirus software is not blocking the network connection-->
Step 3: Configuring IP addresses
By default ad-hoc-the network does not distribute IP automatically (DHCP), so the addresses need to be set manually:
- On host laptop (which distributes the network) go to
Control Panel → Network and Internet → Network and Sharing Center → Change adapter settings. - Find a new connection
Wireless Network Connection 2(or similar), right-click →Properties→Internet Protocol version 4 (TCP/IPv4). - Install:
- 🔹 IP address:
192.168.1.1 - 🔹 Subnet mask:
255.255.255.0
- 🔹 IP address:
192.168.1.2.⚠️ Attention: If there is no network access after connecting, check firewall. IN Windows Defender go toAllow interaction with the app → Change settingsand check the boxes forFile and Printerin the sectionPrivate network.
Step 4: Checking the connection
On the second laptop, open Command line and enter:
ping 192.168.1.1
If pings are successful (responses like Reply from 192.168.1.1: number of bytes=32...), the network is working. Now you can configure folder sharing or start a network game.
3. Method 2: Using Hotspot Mode (Windows/macOS/Linux)
Mode Hotspot (or "access point") is a more modern and stable method than ad-hocHere, one laptop distributes Wi-Fi, and the second connects as if it were a regular router. The main advantage is automatic IP distribution (DHCP), so there is no need to configure addresses manually.
For Windows 10/11:
Step 1: Enable Mobile Hotspot
Go to Settings → Network & Internet → Mobile Hotspot. Here:
- 🔹 In the field
Sharingselect an Internet connection (if you need to share the Internet) or leave itNo. - 🔹 Click
Changeand set the network name (SSID) and password (minimum 8 characters). - 🔹 Turn on the toggle switch
Allow use of my internet connection.
Step 2: Connecting a Second Laptop
On the second device, find the created network in the Wi-Fi list and connect using the specified password. If you don't need internet access, you can disable it in the hotspot settings.
⚠️ Attention: On some laptops with adapters Realtek Your mobile hotspot may not work. In this case, update the driver from the manufacturer's official website or use ad-hoc.
For macOS:
On MacBook hotspot mode is enabled through System Preferences → Sharing:
- Select
Public Internetin the left menu. - In the field
Share connectionplease indicateEthernetorWi-Fi(if you distribute the Internet). - In the section
For computers usingmarkWi-Fi. - Click
Wi-Fi settingsand set the network name (SSID) and password. - Turn on
General accesstoggle switch on the left.
For Linux (Ubuntu/Debian):
IN Linux The hotspot is configured via nmcli or NetworkManagerOpen a terminal and run:
sudo nmcli dev wifi hotspot ifname wlan0 ssid"MyHotspot" password"12345678"
Where wlan0 — the name of your Wi-Fi adapter (check with the command ip a).
4. Method 3: Wi-Fi Direct - direct connection without settings
Wi-Fi Direct — is a technology that allows devices to connect to each other directly, without creating a network. It works as Bluetooth, but with Wi-Fi speed. Most laptops after 2015 support this standard, but the setup interface depends on the adapter manufacturer (Intel, Qualcomm, Broadcom).
For Windows 10/11:
Step 1: Check for support
Open device Manager (Win + X → Device Manager), find your Wi-Fi adapter in the section Network adapters and check its model. For example, adapters Intel AX200, Qualcomm Atheros QCA61x4 or Broadcom 802.11ac support Wi-Fi Direct.
Step 2: Connect via "Projecting to this computer"
IN Windows 10/11 function Wi-Fi Direct often hidden under the screen projection option:
- Click
Win + K(or openSettings → System → Project to this PC). - Select
Available everywherein the sectionConnection. - On the second laptop, in the Wi-Fi list, find the device with the name of your PC (for example,
DESKTOP-ABC123) and connect.
For macOS:
On MacBook Wi-Fi Direct works through the function AirDrop or Shared screen:
- Open
Finder → AirDrop. - Make sure that in the settings
Who should be allowed to discover?selectedAll. - On the second MacBook also open AirDrop — devices must detect each other.
To transfer files, simply drag and drop them into the window. AirDrop to the target laptop.
For Linux:
IN Linux Wi-Fi Direct configured via utility wpa_cliInstall it (if not) and run:
sudo wpa_cli -i wlan0 p2p_find
Then find the device in the list and initialize the connection:
sudo wpa_cli -i wlan0 p2p_connect [Device MAC address] pbc go_intent=15
⚠️ Attention: On some laptops Wi-Fi Direct may conflict with BluetoothIf the connection fails, temporarily disconnect Bluetooth on both devices.
Why might Wi-Fi Direct not work?
If your Wi-Fi adapter does not support Wi-Fi Direct, or the driver is outdated, the function will not be available. Also, some manufacturers (for example, Dell or HP) block it in the BIOS for corporate models. In this case, check the BIOS settings (section Wireless or Network Stack) or use alternative methods (Hotspot or ad-hoc).
5. Setting up shared access to files and folders
After creating a local network between laptops, all that remains is to configure public accessto share files. The process varies depending on the OS, but the general logic is the same: share the folder and set permissions.
For Windows:
Step 1: Sharing the folder
Right-click on the folder → Properties → Access → ShareIn the drop-down list, select All and press Add. Set the resolution level (Reading or Reading and writing).
Step 2: Security settings
Go to the tab Security → Change → Add and enter All (or Everyone). Set permissions (Full access, Change or Reading).
Step 3: Access from another laptop
On the second PC, open Conductor and in the address bar enter:
\\192.168.1.1\folder_name
Or through Net In the side menu, find the name of the first laptop and open the shared folder.
For macOS:
On MacBook:
- Open
System Preferences → Sharing. - Turn on
File sharing. - Click
+underShared foldersand add the desired folder. - In the section
Usersselect an account orAlland set the rights.
To connect from another Mac, V Finder select Go → Connect to server and enter smb://192.168.1.1.
For Linux:
IN Ubuntu/Debian install Samba for folders:
sudo apt install samba
Then edit the config:
sudo nano /etc/samba/smb.conf
Add to the end of the file:
[shared]path = /path/to/folder
browsable = yes
read only = no
guest ok = yes
Restart the service:
sudo systemctl restart smbd
⚠️ Attention: If an error appears when accessing a folderAccess denied, check the permissions on a folder in Linux with the commandchmod 777 /path/to/folder(temporary solution) or configure users insmb.conf.
6. Solving typical connection problems
Even with proper configuration, a local Wi-Fi network may not work. Below - common mistakes and ways to correct them.
| Problem | Possible cause | Solution |
|---|---|---|
| The network being created is not visible on the second laptop. | Incompatible Wi-Fi standards (eg. 802.11n vs 802.11ac) |
In the host adapter settings, set the mode 802.11b/g/n (universal) |
| There is a connection, but there is no access to files | Firewall is blocking SMB (port 445) |
Add a rule to your firewall to allow TCP 445 And UDP 137-138 |
| Slow file transfer speed | Automatic channel width limitation in ad-hoc | Use Hotspot or Wi-Fi Direct, or connect via cable |
| Error: "Failed to start hosted network" | Wi-Fi driver does not support Hosted Network |
Update the driver from the manufacturer's website or use Wi-Fi Direct |
If nothing helps:
- 🔹 Check that on both laptops VPN is disabled - it can block local traffic.
- 🔹 Make sure that antivirus (For example, Kaspersky, Avast) does not block network discovery.
- 🔹 Try it disable IPv6 in the properties of the network adapter (sometimes conflicts with IPv4).
7. Local network security via Wi-Fi
A local network between two laptops seems secure, but there are risks:
- 🔹 Traffic interception - If the network is not password protected, a third device can connect to it.
- 🔹 Data leak - When sharing folders without a password, anyone on the network can read or change files.
- 🔹 Attacks through SMB vulnerabilities - protocol
SMBv1has critical vulnerabilities (eg EternalBlue).
How to protect yourself:
- Always use complex password for Wi-Fi network (minimum 12 characters, with numbers and special characters).
- Turn it off
SMBv1in Windows:Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol - Set up public access only for specific users, and not for
All. - After completing the work turn off the network (especially in public places).
⚠️ Attention: Never use a local Wi-Fi network to transmit confidential data (passwords, banking documents) in public places. Even with a password, traffic can be intercepted using Wireshark or Aircrack-ng.
8. Alternative ways to connect laptops
If Wi-Fi isn't suitable (for example, due to low speed or incompatible adapters), consider alternatives:
- 🔹 Ethernet cable — the most stable and fastest connection (up to 1 Gbps). Suitable for transferring large files or playing games.
- 🔹 Bluetooth — slower than Wi-Fi (up to 3 Mbps), but easier to set up. Suitable for transferring small files.
- 🔹 USB cable - by using USB-to-USB adapter or cable USB Networking You can create a network with speeds up to 480 Mbps (USB 2.0).
- 🔹 Cloud services - If both laptops have internet access, it is easier to upload files to Google Drive, Dropbox or Yandex Disk.
Speed comparison:
| Method | Speed | Difficulty of setup | When to use |
|---|---|---|---|
| Wi-Fi (Hotspot) | 50-300 Mbps | Low | A universal option for most tasks |
| Ethernet | 100-1000 Mbps | Low | Large file transfers, gaming, streaming |
| Bluetooth | 1-3 Mbps | Very low | Transfer of small files (photos, documents) |
| USB Networking | up to 480 Mbps | Average | If there is no Wi-Fi adapter or Ethernet port |
FAQ: Frequently Asked Questions
Is it possible to connect a laptop with Windows and macOS to the same network?
Yes, but there are some nuances:
- 🔹 If you use Hotspot or Wi-Fi Direct, there will be no problems - macOS connect to Windows as to a regular access point.
- 🔹 For ad-hoc on macOS you need to manually create a network through
System Preferences → Network → Wi-Fi → Advanced → Create network. - 🔹 When sharing files, make sure that Windows protocol enabled
SMB2/3(VControl Panel → Programs → Turn Windows features on or off).
Why is file transfer speed via Wi-Fi lower than via cable?
This is due to the peculiarities of wireless communication:
- 🔹 Interference - other Wi-Fi networks, microwaves, Bluetooth devices reduce speed.
- 🔹 Protocol Limitations - V ad-hoc the maximum speed usually does not exceed 54 Mbps (
802.11g). - 🔹 Overheads — encryption (
WPA2) and error control take up to 30% of the bandwidth.
To improve speed:
- 🔹 Switch from ad-hoc on Hotspot or Wi-Fi Direct.
- 🔹 Use the channel
5 GHz(if adapters support it). - 🔹 Place laptops closer to each other (within 1-2 meters).