How to Connect Two Computers via Wi-Fi: A Step-by-Step Guide with Setup for Windows, macOS, and Linux

Connecting two computers Wi-Fi Cable-free networking is a challenge faced by both novice users and experienced system administrators. In some cases, it's necessary for quick file transfers, in others for collaboration on a local network, and sometimes even for sharing the internet from one PC to another. However, the solutions to this problem vary greatly depending on the operating system, the hardware capabilities of the devices, and even the version of the network adapter drivers.

In this article we will look at all current methods Connecting two computers via Wi-Fi: from standard Windows functions to advanced settings via the command line. You'll learn how to create access point on one PC, how to connect to an existing network without a router, and what hidden parameters affect connection speed and stability. And also, how to avoid common errors that prevent computers from "seeing" each other.

1. Methods for connecting two computers via Wi-Fi: which one to choose?

Before you begin setting up, determine the purpose of the connection. This will determine the optimal method:

  • 📁 File transfer — a temporary computer-to-computer network is sufficient (ad-hoc).
  • 🌐 Internet Sharing — I need a regime SoftAP (software access point) or router.
  • 🔗 Gaming/Streaming — a stable network with minimal latency is required (preferably via a router).
  • 🖥️ Remote access - a combination of Wi-Fi + RDP or VNC.

If you have Wi-Fi router, the most reliable way is to connect both computers to it. This guarantees stability and speed up to 1 Gbps (with the support of Wi-Fi 6). If you don't have a router, you'll have to create a direct network between your PCs. The table below compares all methods:

Method Speed Complexity Need a router? Suitable for...
Net ad-hoc (Windows) Up to 54 Mbps Low No File transfers, games (with lags)
Mode SoftAP (mobile hotspot) Up to 300 Mbps Average No Internet distribution, streaming
Connecting via a router Up to 1 Gbps Low Yes Any tasks (optimal)
Wi-Fi Direct Up to 250 Mbps High No Direct data exchange (rarely supported)

Please note: If one of the computers is running under macOS or Linux, method ad-hoc It may not work due to driver issues. In this case, it's better to use access point mode or router.

📊 Which OS do you use most often?
Windows 10/11
macOS
Linux
Other

2. Connection via a computer-to-computer network (ad-hoc) in Windows

This method is suitable for Windows 7/10/11 and allows you to create a temporary network without a router. The main disadvantage is the low speed (up to 54 Mbps) and possible problems with drivers on new adapters.

Instructions for Windows 11 (for Windows 10, the steps are similar, but the menu path may differ):

  1. Open Settings → Network & Internet → Mobile Hotspot.
  2. Scroll down and click Wi-Fi Direct network (if the option is missing, use command line).
  3. Enter the network name (SSID) and password (minimum 8 characters).
  4. On the second computer, connect to the created network as if it were a regular Wi-Fi network.

If option Wi-Fi Direct missing, create a network via command line:

netsh wlan set hostednetwork mode=allow ssid="MyAdHoc" key="12345678" keyUsage=persistent

netsh wlan start hostednetwork

After executing the commands, the network will appear in the list of available networks. To delete it, use:

netsh wlan stop hostednetwork

netsh wlan set hostednetwork mode=disallow

The Wi-Fi adapter driver has been updated to the latest version.

The firewall is disabled on both PCs (temporarily)

The network name (SSID) does not contain Cyrillic characters or spaces.

The network password consists of Latin letters and numbers-->

⚠️ Attention: On some laptops (eg. Dell XPS or HP Spectre) built-in Wi-Fi adapters do not support the mode ad-hocIn this case, use an external USB adapter or mode SoftAP.

3. Creating an access point (SoftAP) for Internet distribution

If you need not only to connect two computers, but also share the Internet from one to another, use the mode SoftAPThis works more reliably than ad-hoc, and maintains speeds up to 300 Mbps (provided that the adapter supports Wi-Fi 5 or newer).

Setting up in Windows 11:

  1. Go to Settings → Network & Internet → Mobile Hotspot.
  2. In the field Sharing an Internet connection Select the connection through which the PC receives the Internet (for example, Ethernet or Wi-Fi).
  3. Click Change and set the network name (SSID) and password.
  4. Enable the option Allow use of my internet connection.

On macOS (Ventura and newer) the access point is created like this:

  1. Open System Preferences → Sharing.
  2. Select Public Internet and indicate the source (for example, Ethernet).
  3. On the list For computers using: mark Wi-Fi.
  4. Click Wi-Fi settings and configure the network (name, channel, security) WPA2/WPA3).

For Linux (Ubuntu/Debian) use the utility nmcli:

nmcli dev wifi hotspot ifname wlan0 ssid "MyHotspot" password "12345678"
⚠️ Attention: If the Internet connection disappears on the main PC after enabling the hotspot, check the settings NAT V Network and Control Center (Windows) or iptables (Linux) Often the problem is solved by restarting the service. Internet Connection Sharing (ICS).
netsh wlan set hostednetwork channel=6-->

4. Connecting via a Wi-Fi router: the most reliable method

If you have Wi-Fi routerConnecting two computers through it is the best option. This guarantees:

  • 🔌 Stable connection without interruptions.
  • 📶 Speed ​​up to 1 Gbps (at Wi-Fi 6 and gigabit ports).
  • 🔒 Customizable VLAN to isolate traffic.
  • 🖥️ Support for any OS (Windows, macOS, Linux, even ChromeOS).

Instructions:

  1. Connect both computers to the router via Wi-Fi or cable.
  2. Make sure both devices are on the same subnet (eg. 192.168.1.x).
  3. Open access to shared folders or configure RDP/SSH for remote control.

If computers cannot see each other on the network:

  • 🔍 Check your settings Working group (must match on both PCs).
  • 🛡️ Temporarily disable your firewall and antivirus.
  • 📡 Make sure that the router is enabled DHCP (automatic distribution of IP addresses).
Problem Cause Solution
Computers can't ping Different subnets or disabled DHCP Set static IPs in one subnet (eg. 192.168.1.10 And 192.168.1.11)
Low transmission speed 2.4 GHz channel congestion Switch to 5 GHz or change the channel in your router settings.
No access to shared folders Missing rights or blocked SMB Turn on SMB 1.0 V Control Panel → Programs → Turn on Windows features
How to check the connection speed between PCs?

Use the utility iPerf3:

1. On the first PC, start the server: iperf3 -s

2. On the second PC, connect to it: iperf3 -c [IP_of_the_first_PC] -t 20

The result will show the actual speed in Mbps and delays (jitter).

5. Direct connection via Wi-Fi Direct (ad-hoc alternative)

Wi-Fi Direct — a technology that allows devices to connect directly, without a router. It's supported by most modern laptops and smartphones, but on PCs, its implementation depends on drivers.

How to check support:

  1. Open device Manager (devmgmt.msc).
  2. Find your Wi-Fi adapter (e.g. Intel AX200 or Qualcomm Atheros).
  3. Check the tab Additionally - there should be an option Wi-Fi Direct or P2P.

If there is support, enable it. Wi-Fi Direct through:

  • 🖥️ Windows: Settings → Devices → Bluetooth & other devices → Add a device → Wireless display or dock.
  • 🍎 macOS: Use AirDrop (automatically uses Wi-Fi Direct).
  • 🐧 Linux: Utility wpa_cli with the team wpa_cli p2p_find.

The main advantage Wi-Fi Direct - high speed (up to 250 Mbps) and low latency. The downside is that not all adapters support this mode, and setup is more complicated than SoftAP.

⚠️ Attention: On some adapters Realtek (For example, RTL8821CEWi-Fi Direct is unstable due to driver errors. In this case, update the firmware from the manufacturer's official website or use alternative methods.

6. Security settings: how to secure the connection?

When creating a direct Wi-Fi network between computers, many people forget about security. This can lead to:

  • 🕵️‍♂️ Traffic interception (if using an open network or WEP).
  • 💻 Unauthorized connection third devices.
  • 📂 Access to shared folders without password.

Minimum protective measures:

  1. Use WPA2-PSK or WPA3 (Not WEP or an open network!).
  2. Set a complex password (at least 12 characters, with numbers and special characters).
  3. Turn it off SSID Broadcast (hiding the network name) is not a security feature, but it will reduce the number of accidental connections.
  4. Configure your firewall to block unwanted connections:
netsh advfirewall firewall add rule name="Block Wi-Fi Direct" dir=in interface=type=wireless action=block

To transfer confidential data (such as work documents), use VPN or SSH tunnel over a Wi-Fi connection. On Windows, this can be done via OpenVPN, on Linux - via ssh -L.

7. Solving typical connection problems

If the computers cannot see each other or the connection keeps dropping, check the following:

Problem Possible cause Solution
The network is being created, but you can't connect. Driver or Wi-Fi channel incompatibility Update your adapter driver or change the channel to 6/11 in 2.4 GHz
Low speed (less than 10 Mbps) Automatic switching to 802.11b or interference Set the mode manually 802.11n/ac in the adapter settings
Constant connection breaks Saving Wi-Fi adapter energy Disable the option Allow the device to turn off to save power in the Device Manager
File sharing isn't working. Blocking SMB or different versions of the protocol Turn on SMB 1.0 or upgrade to SMB 3.0

If the problem is not resolved, please check event logs:

  • 🖥️ Windows: Event Viewer → Windows Logs → System (look for errors with the source WLAN-AutoConfig).
  • 🐧 Linux: dmesg | grep wifi or journalctl -u NetworkManager.
⚠️ Attention: On some laptops Lenovo And ASUS built-in utilities (for example, Lenovo Vantage) can block creation ad-hoc networks. Before setting them up, disable them in startup.

FAQ: Frequently asked questions about connecting a PC via Wi-Fi

Is it possible to connect a Mac and a Windows PC via Wi-Fi?

Yes, but it's better to use router or mode SoftAP (mobile hotspot). Method ad-hoc It works unstable on macOS due to driver issues. Broadcom. Alternative - Wi-Fi Direct, if the adapters support it.

Why is file transfer speed via Wi-Fi lower than via cable?

Wi-Fi is always slower than Ethernet because:

  • Interference from other networks (especially in the 2.4 GHz range).
  • Protocol limitations (eg. 802.11n maximum 300 Mbps, and 802.11ac — up to 1 Gbit/s).
  • Encryption overhead (WPA2 "eats" ~20% of speed).

To speed up the transfer:

  1. Switch to range 5 GHz.
  2. Use FTP or SFTP instead of SMB.
  3. Disable power saving for your Wi-Fi adapter.
How to transfer files between PCs without network settings?

If you don't want to mess around with Wi-Fi settings, use alternative methods:

  • 📱 Local chat: Telegram (sending files via "Saved Messages").
  • ☁️ Cloud: Google Drive, Dropbox or Yandex Disk (suitable for small files).
  • 🔌 Direct connection: Cable USB-C/Thunderbolt (speed up to 10 Gbps).
  • 📡 Bluetooth: Slowly (until 3 Mbps), but does not require any settings.
Is it possible to play online between two PCs via Wi-Fi?

Technically yes, but with some caveats:

  • 🎮 For strategies (StarCraft, Age of Empires): It will even do ad-hoc network, but lags are possible.
  • 🏎️ For shooters (CS:GO, Valorant): You need a router with 5 GHz And QoS (traffic prioritization).
  • 🖥️ For MMO (World of Warcraft): Wi-Fi is not recommended - cable is better.

To reduce delays:

  1. Disable background downloads on both PCs.
  2. Use TCP/IP instead of NetBIOS.
  3. Turn it on in your router WMM (QoS) to prioritize gaming traffic.
How to share internet from Windows to macOS via Wi-Fi?

Do the following:

  1. On a Windows PC, enable mobile hotspot (Settings → Network & Internet → Mobile Hotspot).
  2. Select an internet source (eg. Ethernet).
  3. On your Mac, connect to the created network as you would to a regular Wi-Fi network.
  4. If the Internet doesn't work, check your settings. ICS (public access) in Network and Control Center.

If macOS doesn't connect:

  • Try changing the security type from WPA2 on WPA2/WPA3.
  • Update the Wi-Fi adapter driver on your Windows PC.
  • Temporarily disable the firewall on both devices.