Connecting two or more laptops to a local network via Wi-Fi is a challenge faced by students, office workers, or simply users who need to quickly share files without using flash drives or cloud services. This connection method allows data transfer at speeds of up to 500 Mbps (depending on the Wi-Fi standard), share printers, play online games, or even collaborate on documents. But how do you do this correctly to avoid errors and ensure a stable connection?
Many people mistakenly believe that a router is required to create a network between laptops. In fact, there are three main methods: through access point (if one of the laptops acts as a router), using ad-hoc networks (direct connection of devices) or via an existing Wi-Fi router. Each method has its own nuances, and the choice depends on your needs, operating system, and the technical capabilities of your devices. In this article, we'll cover all the methods step by step—from preparing the equipment to troubleshooting common problems.
⚠️ Important: If you plan to transmit sensitive data, make sure the network is password-protected. Open networks are vulnerable to traffic interception!
1. Preparing laptops for network creation
Before you begin setup, check that your devices meet the minimum requirements. Both laptops must have working Wi-Fi adapters (built-in or external) and support at least the standard 802.11n (better - 802.11ac or Wi-Fi 6 for high speed). Also, make sure that both devices have the latest network card drivers installed. You can check this in Device Manager (For Windows) or through Terminal (For macOS/Linux).
If you use Windows 10/11, update your system to the latest version - older builds may lack features for creating hosted network (virtual access point). On macOS check that it is turned on Internet access sharing V System Preferences → Sharing. For Linux You may need to install packages hostapd And dnsmasq.
- 🔹 Windows: Update your Wi-Fi adapter driver via
Device Manager → Network Adapters. - 🔹 macOS: Make sure that in
Network settingsWi-Fi is enabled and there are no restrictions on creating networks. - 🔹 Linux: Check support AP-mode team
iw list | grep "AP". - 🔹 General: Disable firewalls and antivirus software during setup (they may block the connection).
⚠️ Attention: On some laptops (especially with adapters) Realtek) function hosted network can be disabled at the BIOS level. If the command netsh wlan show drivers shows Hosted network supported: No, update your BIOS or use an external Wi-Fi adapter.
2. Method 1: Creating a network via an access point (Windows)
This method is suitable if one of the laptops will distribute the Internet or serve as the center of a local network. Windows This is done via the command line or the graphical interface. Let's look at both options.
Step 1: Launch the access point via the command line
Open Command prompt as administrator and run the following commands:
netsh wlan set hostednetwork mode=allow ssid="MyLaptopNet" key="Password123" keyUsage=persistent
netsh wlan start hostednetwork
Where MyLaptopNet — the network name, and Password123 — password (minimum 8 characters). To enable Internet sharing, go to Control Panel → Network Connections, find your primary connection (eg. Ethernet), right-click → Properties → Access and allow the connection to be used for Local Area Connection* X (where X is the virtual adapter number).
Step 2: Connecting a Second Laptop
On the second device, find the created network MyLaptopNet in the list of available Wi-Fi networks and connect to it by entering the password. Once connected, make sure both laptops are on the same subnet (e.g. 192.168.173.X). To do this, run the following in the command line:
ipconfig
If IP addresses are not assigned automatically, configure them manually (e.g. 192.168.173.10 And 192.168.173.11 with a mask 255.255.255.0).
The network is visible in the Wi-Fi list|The password is entered correctly|IP addresses are assigned (checked via ipconfig/ifconfig)|Internet sharing is enabled (if needed)-->
3. Method 2: Ad-hoc network (direct connection without a router)
Ad-hoc (from the Latin "for this") is a type of network where devices connect directly to each other without an intermediary (router). This method works on Windows 7/10/11, macOS And Linux, but has a speed limit (usually up to 150 Mbps, even if the adapters support 802.11ac).
Setting up on Windows:
- Open
Control Panel → Network and Sharing Center → Set up a new connection. - Select
Setting up a wireless computer-to-computer network(V Windows 10/11 This item may be missing - use the command line). - Specify a network name (eg.
DirectLink), security typeWPA2-Personaland password. - Connect the second laptop to the created network.
Setup on macOS:
Open System Preferences → Sharing, select Internet access sharing and in the section For computers using: mark Wi-Fi. Click Wi-Fi settings and set up the network name, channel and password. Second MacBook Connect to this network as you would to a regular Wi-Fi.
⚠️ Attention: IN Windows 10/11 creation function ad-hoc The network has been removed via the graphical interface. Use the command line:
netsh wlan set hostednetwork mode=allow ssid="DirectLink" key="Password123" keyUsage=persistent
netsh wlan start hostednetwork
| operating system | Max ad-hoc speed | Supported standards | Is a router required? |
|---|---|---|---|
| Windows 7/8.1 | up to 150 Mbit/s | 802.11a/b/g/n | No |
| Windows 10/11 | up to 300 Mbps* | 802.11n/ac** | No |
| macOS | up to 250 Mbps | 802.11n/ac | No |
| Linux | depends on the driver | 802.11a/b/g/n/ac | No |
* When using the command line.
** On some adapters Intel And Broadcom.
4. Method 3: Using an existing Wi-Fi router
If you have a router, the most reliable way to create a network between laptops is to connect them to the same Wi-Fi network. This method provides high speeds (up to 1 Gbps at standard Wi-Fi 6) and minimal latency, which is important for gaming or streaming data.
Step 1: Connect both laptops to the router
Make sure both devices are connected to the same network (eg. TP-Link_5G). Check that the router has assigned them IP addresses from the same subnet (for example, 192.168.0.X). To do this, follow these steps:
- 🔹 On Windows:
ipconfig(look for the lineIPv4 address). - 🔹 On macOS/Linux:
ifconfigorip a.
Step 2: Set up file sharing
To allow laptops to "see" each other, enable network discovery:
- 🔹 Windows: Open
Control Panel → Network Settings → Sharing Optionsand turn it onNetwork discoveryAndFile and Printer Sharing. - 🔹 macOS: IN
System Preferences → Sharingturn onFile sharingand add folders to the shared list. - 🔹 Linux: Install
samba(sudo apt install samba) and configure the config/etc/samba/smb.conf.
⚠️ Attention: If the laptops don't see each other, check that they are on the same network. working group (Windows) or domain (macOS/Linux). By default in Windows This WORKGROUP, V macOS — computer name.
How to check a workgroup in Windows?
Open Control Panel → System → Advanced system settings → Computer nameThe "Workgroup" field must match on both PCs.
5. Checking the connection and troubleshooting
After setting up the network, check its functionality. The easiest way is to use the command ping:
ping 192.168.X.X
Where 192.168.X.X — IP address of the second laptop. If the packets pass without loss (0% loss), the connection is established correctly. If not, check the following:
- 🔹 Firewall: Temporarily disable it on both devices.
- 🔹 IP addresses: Make sure they are on the same subnet (eg.
192.168.1.10And192.168.1.11). - 🔹 Drivers: Update your Wi-Fi adapter drivers (especially on Windows).
- 🔹 Wi-Fi channel: If you use ad-hoc, try changing the channel to 6 or 11 (less busy).
Typical errors and solutions:
| Error | Possible cause | Solution |
|---|---|---|
| The network is not visible | Not supported ad-hoc or Wi-Fi is disabled | Use an access point or router |
Hosted network couldn't be started |
The driver does not support hosted network | Update your driver or use an external adapter. |
| No access to files | Access rights are not configured | Check your sharing settings |
| Low speed | Interference or outdated Wi-Fi standard | Switch to 5 GHz or use a router |
6. Optimize network speed and security
To get the most out of your Wi-Fi network between laptops, follow these guidelines:
Speed up:
- 🔹 Use range
5 GHz(less busy than2.4 GHz). - 🔹 Set a fixed channel (eg.
36or149) instead ofAuto. - 🔹 If the router supports Wi-Fi 6, turn on
WPA3AndOFDMA. - 🔹 For ad-hoc select network standard
802.11ninstead of802.11g.
Security improvements:
- 🔹 Use
WPA2-PSKorWPA3(never -WEP). - 🔹 Turn it off
WPS(vulnerable to hacking). - 🔹 Hide the network SSID (in the router settings or when creating an access point).
- 🔹 Set up MAC filtering (allow connection only for MAC addresses of your laptops).
⚠️ Attention: If you are transmitting sensitive data (such as work documents), consider using VPN within a local network or encryption of folders (BitLocker, VeraCrypt).
7. Alternative connection methods
If Wi-Fi isn't working for some reason, consider alternative ways to connect laptops:
- 🔹 Ethernet cable: Direct connection via
LANgives speed up to1 Gbps(needed) crossover cable or regular UTP for modern adapters). - 🔹 Bluetooth: Suitable for transferring small files (speed up to
3 Mbps). - 🔹 USB cable: Special cables USB-Link allow you to connect two PCs at speeds up to
480 Mbps. - 🔹 Mobile hotspot: If one of the laptops has 4G/5G, you can share the Internet via your phone.
When to choose an alternative:
Wi-Fi isn't always optimal. For example, for transferring large files (videos, backups), it's better to use Ethernet - it is more stable and faster. Bluetooth It's convenient for syncing contacts or small documents, but not suitable for gaming or streaming video. If you need to connect laptops over a distance of more than 10 meters, consider Powerline adapters (data transmission via electrical wiring).
FAQ: Frequently asked questions about setting up a network between laptops
Is it possible to create a network between a Windows laptop and a Mac?
Yes, but you need to take into account the nuances:
- 🔹 On Windows set up ad-hoc network or access point.
- 🔹 On macOS Connect to this network as you would to a regular Wi-Fi.
- 🔹 For file sharing on Mac turn on
SMB(System Preferences → Sharing → Optionsand markSMB file sharing).
If it doesn't work ping, check the firewall settings on both devices.
Why is file transfer speed low (1-2 MB/s)?
Reasons and solutions:
- 🔹 Wi-Fi 2.4 GHz: Switch to
5 GHzor change the channel to a less busy one. - 🔹 Ad-hoc network: Maximum speed -
150 Mbps(near18 MB/s). Use an access point or router. - 🔹 Interference: Keep laptops away from microwaves, cordless phones, and other sources of interference.
- 🔹 Power saving settings: IN Windows disable the option
Allow the device to turn off to save powerin the properties of the Wi-Fi adapter.
How to transfer files between laptops without setting up a shared folder?
Options:
- 🔹 HTTP server: On one laptop, run a local server (for example, via
python -m http.server 8000), and on the second one, open it in the browserhttp://[IP address]:8000. - 🔹 FTP: Use programs like FileZilla Server (Windows) or built-in FTP server on macOS/Linux.
- 🔹 Specialized programs: LocalSend, Snapdrop or Resilio Sync (work without prior configuration).
Is it possible to play online games through such a network?
Yes, but with some reservations:
- 🔹 Ad-hoc network: Suitable for older games (Counter-Strike 1.6, Warcraft III), but there may be high latency (
ping). - 🔹 Access point or router: Optimal for modern games (Valorant, Dota 2).
- 🔹 Ethernet: The best option to minimize lags.
For gaming over Wi-Fi, disable QoS in the router settings and set the traffic priority for gaming ports.
How can I make the network automatically connect when I start my laptops?
Instructions:
- 🔹 Windows (access point): Create
.bat-file with commands:
@echo offnetsh wlan start hostednetwork
pause
and add it to startup (Shell:Startup).
- 🔹 macOS: Enable the option
Remember the networksin the Wi-Fi settings. - 🔹 Linux: Add the launch command hostapd V
rc.localorsystemd.