How to Share a Wi-Fi Network Between Two Computers: 3 Proven Methods

Connecting two computers to a shared Wi-Fi network is a challenge faced by both novice users and experienced system administrators. Such a network allows for quick file sharing, online gaming, data synchronization, or even using one PC as a server for another. However, standard instructions often miss the nuances: why Windows 11 refuses to recognize the second computer, and how to bypass the restrictions. macOS Sonoma or why the data transfer rate through ad-hoc network 5 times lower than through a router.

In this article, we will look at three current connection methods - from a classic connection via a router to creating a direct Wi-Fi network (ad-hoc) and the use of technology Wi-Fi DirectWe will pay special attention to typical errors: why computers cannot see each other on the network, how to set up shared access to folders without compromising security, and what to do if IP addresses conflict. All instructions have been verified. Windows 10/11, macOS Ventura/Sonoma and popular distributions Linux (Ubuntu, Mint).

📊 Why do you need a shared network between PCs?
File sharing
Online games
Remote control
Internet Sharing
Other

1. Method #1: Connecting via a Wi-Fi router (recommended)

The most reliable and simple method is to use your home router as an intermediary. It automatically assigns IP addresses, manages traffic and ensures a stable connection. It's compatible with all operating systems and requires no additional hardware.

To allow computers to see each other on the network, follow these steps:

  • 🔌 Connect both computers to the same Wi-Fi network (network name - SSID — must match).
  • 🖥️ On Windows: go to Control Panel → Network and Internet → Network and Sharing Center → Change advanced sharing settingsTurn on network discovery and file sharing.
  • 🍎 On macOS: open System Preferences → Sharing and activate the option File sharing.
  • 🐧 On Linux: install the package samba (for Ubuntu:
    sudo apt install samba
    ) and configure the config /etc/samba/smb.conf.

After setup, check the visibility of computers:

  • On Windows: open File Explorer → Network.
  • On macOS: V Finder select a tab Net.
  • On Linux: use the command
    smbtree
    or nautilus smb://.

Both PCs are connected to the same Wi-Fi network|

Network discovery is enabled on both devices|

Firewall does not block ports 137-139 (Windows)|

The shared folder permissions are configured correctly.

-->

⚠️ Attention: If the computers cannot see each other, check your firewall settings (Windows Defender, Kaspersky, Avast often block local traffic). Add an exception for ports 137-139 (TCP/UDP) and 445 (SMB).

2. Method #2: Direct connection (Ad-Hoc network) without a router

If you don't have a router at hand, you can create one direct Wi-Fi connection (ad-hoc) between two computers. This method works on Windows And Linux, but it has limitations: the data transfer speed is lower, and the stability of the connection depends on the Wi-Fi adapter drivers.

Instructions for Windows 10/11:

  1. Open Command line on behalf of the administrator.
  2. Create ad-hoc-network command:
    netsh wlan set hostednetwork mode=allow ssid=MyAdHoc key=12345678 keyUsage=persistent

    (replace MyAdHoc And 12345678 to your network name and password).

  3. Start the network:
    netsh wlan start hostednetwork
  4. On the second PC, connect to the created network MyAdHoc.

For Linux use nmcli:

nmcli dev wifi hotspot ifname wlan0 ssid MyAdHoc password "12345678"

(replace wlan0 to the name of your Wi-Fi adapter).

OSMax. speedStabilityDifficulty of setup
Windows 10/11up to 50 MbpsAverageLow
macOSup to 30 MbpsLowHigh
Linux (Ubuntu)up to 70 MbpsHighAverage
⚠️ Attention: On macOS Creation ad-hoc-networking through the terminal often leads to an error "Operation not permitted"In this case, use the utility Create Ad-Hoc Network from App Store or connect to a network created with Windows/Linux.
Why is the speed in ad-hoc lower than through a router?

In an ad-hoc network, data is transmitted directly between devices without routing optimization, which increases overhead. The router, on the other hand, uses specialized protocols (e.g., 802.11ac/ax) and hardware acceleration to increase throughput.

3. Method #3: Wi-Fi Direct (for modern devices)

Wi-Fi Direct — a technology that allows devices to connect directly without an intermediary (router). It is supported by most modern laptops and PCs with adapters. Intel Wi-Fi 6, Qualcomm FastConnect or BroadcomThe main advantage is high speed (up to 1 Gbps) and ease of connection.

How to enable Wi-Fi Direct:

  • 🖥️ On Windows 11: go to Settings → Network & Internet → Wi-Fi → Advanced settings and turn it on Wi-Fi Direct.
  • 🍎 On macOS: use AirDrop (automatically uses Wi-Fi Direct for file transfer).
  • 🐧 On Linux: install wpa_supplicant and set up the connection via wpa_cli.

Once activated, one computer becomes the "access point" and the other becomes the client. Use standard protocols to exchange files (SMB, FTP or SSH).

4. Setting up shared access to files and folders

Creating a network is only half the battle. For computers to exchange data, you need to set up public accessLet's look at the process using an example. Windows 11:

  1. Right-click on the folder → Properties → Access → Share.
  2. Select a user All and set the resolution Reading and writing.
  3. Go to the tab Security and add a group All with full rights.

On macOS:

  • Open System Preferences → Sharing.
  • Add a folder to the list Shared folders.
  • Set up user rights Guest or a specific account.
⚠️ Attention: Never share an entire drive (eg. C:\ or /). This creates a critical vulnerability: an attacker on your local network will be able to access system files, passwords, and personal data.

5. Troubleshooting common problems

Even with proper setup, errors can still occur. Let's look at the most common ones:

ProblemCauseSolution
Computers can't see each other.Network discovery is disabledTurn on in Settings → Network → Sharing options
No access to shared folderIncorrect access rightsCheck your settings Security And Access
Low transmission speedAn outdated protocol (802.11n) is used.Update your Wi-Fi driver or switch to 5 GHz
Constant disconnectionsInterference from other networksChange the Wi-Fi channel in your router settings.

If the problem persists, check:

  • 🔄 IP addresses: do it
    ipconfig /all
    (Windows) or
    ifconfig
    (Linux/macOS) Make sure both PCs are on the same subnet (e.g. 192.168.1.x).
  • 🛡️ Antivirus: temporarily disable Kaspersky, Avast or ESET - they can block SMB traffic.
  • 🔧 SMB protocol: on Windows 11 enable support SMB 1.0 (not safe!) or update the client to SMB 3.0.

6. Security: How to protect your shared network

A local area network (LAN) between two computers can become vulnerable if precautions aren't taken. Key risks include:

  • 🕵️‍♂️ Traffic interception: data is transmitted in clear text (unless encryption is used).
  • 🚪 Unauthorized access: If your Wi-Fi password is weak, a third user can connect to the network.
  • 🦠 Spread of viruses: An infected file on one PC can be automatically copied to another.

How to minimize risks:

  1. Use WPA3 to encrypt Wi-Fi (or at least WPA2-AES).
  2. Disable sharing for the user Guest.
  3. Configure your firewall to block incoming connections from outside your local network.
  4. To transfer confidential data, please use SSH or SFTP instead of SMB.
⚠️ Attention: If you are connecting to a shared network in a public place (for example, via Wi-Fi in a cafe), Never enable network discovery or file sharing.. Use VPN or SSH tunnel to protect traffic.

7. Alternative methods of data exchange

If you are unable to set up a shared network, consider alternative methods:

  • 📁 Cloud services: Google Drive, Dropbox or Yandex Disk (suitable for small files).
  • 🔌 Direct cable connection: through Ethernet or USB-C (speed up to 10 Gbps).
  • 📡 Bluetooth: slow (up to 3 Mbps), but does not require network configuration.
  • 💾 Local FTP server: For example, FileZilla Server or built-in FTP in macOS.

For games on a local network (for example, Minecraft or CS:GO) can be used Hamachi or ZeroTier - They create a virtual network over the Internet, emulating a local connection.

FAQ: Frequently Asked Questions

Is it possible to connect a Windows computer and a Mac to the same network?

Yes, but there are some nuances:

  • On macOS enable support SMB V System Preferences → Sharing → Options.
  • On Windows turn it off SMB 1.0 and use SMB 2.0/3.0.
  • It's easier to use for file sharing AirDrop (Mac → Mac) or cloud services.
Why is file transfer speed via Wi-Fi lower than via cable?

Wi-Fi has physical limitations:

  • Interference from other networks (especially in apartment buildings).
  • Protocol Limitations 802.11 (even Wi-Fi 6 loses Gigabit Ethernet in stability).
  • Encryption overhead (WPA3 reduces speed by 10-15%).

For maximum speed use Wi-Fi 6E (6 GHz) or switch to 5 GHz with channel width 80 MHz.

How to transfer files between computers without setting up a network?

Quick methods without complex settings:

  1. Local chat: use Telegram or Discord to send files via private messages.
  2. QR code: Generate a QR code for a file using QR File Transfer and scan it with a second PC.
  3. USB drive: the most reliable method for large files (up to 2 TB).
Is it possible to play online if one computer is on Windows and the other is on Linux?

Yes, but it requires:

  • Use cross-platform games (Minecraft Java, Team Fortress 2, OpenTTD).
  • Tune Wine or Proton to run Windows games on Linux.
  • For LAN games (For example, CS 1.6) network emulation may be required via Hamachi.
Why did computers stop seeing each other after a Windows update?

The culprits:

  • Disabling SMB 1.0: starting from Windows 10 1709, the protocol is disabled by default due to vulnerabilities.
  • Updating Wi-Fi drivers: New drivers may reset settings ad-hoc-networks.
  • Security policies: Windows 11 Blocks "insecure" connections on public networks.

Solution: enable SMB 2.0+ V Control Panel → Programs → Turn on Windows features.