Windows

How to Enable File Sharing Between Ubuntu and Windows 11

Richard
Written by
Richard
Jul 17, 2021 Updated Apr 26, 2026 4 min read
How to Enable File Sharing Between Ubuntu and Windows 11

This guide helps you connect your Ubuntu computer to shared folders on a Windows 11 PC. By doing this, you can easily move files back and forth between the two systems.

Why do this?

Sharing files between different operating systems makes working on projects much faster. You won’t need a USB drive to move files between your computers anymore.

What happens when done?

Once you finish these steps, your Windows folders will show up in your Ubuntu file manager, and your Ubuntu folders will be visible to your Windows PC.

Enable Network Discovery in Windows 11

Windows needs to “announce” that it has files to share. If this is turned off, other computers cannot find it. First, turn on Network Discovery in Windows 11. Read more about this here: How to enable Network Discovery on Windows 11.

Turn on File Sharing in Windows 11

You must allow Windows to share files on your private network.

  1. Click Start and type Control Panel.

    Windows 11 Control Panel for settings adjustment

  2. Click Network and Internet.

    Network and Internet settings in Windows 11 Control Panel

  3. Select Network and Sharing Center.

    Network and Sharing Center in Windows 11

  4. Click Change advanced sharing settings.

    Advanced sharing settings in Windows 11

  5. Under the Private section, turn on File and printer sharing.

    Windows 11 Advanced Sharing Center configuration

  6. Scroll down to All networks and ensure these settings are active so you can access your folders.

    Turning off password protected sharing in Windows

Note: You can also run these commands as an administrator in the Command Prompt to enable these settings quickly:

💻Code
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes

Access Windows Shares from Ubuntu

Now that Windows is ready, let’s connect from Ubuntu.

  1. Open your File Manager.
  2. Click Other Locations in the left sidebar.

    File sharing setup between Ubuntu and Windows 11

  3. If you do not see your Windows computer, you may need to install the sharing tool by opening your terminal and running:
🐧Bash / Shell
sudo apt update
sudo apt install samba

In the Connect to Server box at the bottom, type the address of your Windows computer like this:

💻Code
smb://servername/Share_name

Or if you have a specific folder to open:

💻Code
smb://10.0.2.18/users/Richard/Documents
Accessing Windows 11 shares from Ubuntu

When prompted, enter your Windows username and password to gain access.

Ubuntu accessing shared folders from Windows
Ubuntu connecting to Windows 11 shared resources

How to access Ubuntu files from Windows

To share a folder from Ubuntu, you need to set up a tool called Samba.

  1. Open the terminal and create a folder:
🐧Bash / Shell
sudo mkdir /samba
  1. Set the permissions so others can use it:
🐧Bash / Shell
sudo chgrp sambashare /samba
sudo chmod 2770 /samba
  1. Add your user account to the sharing list (replace yourusername with your actual Ubuntu name):
🐧Bash / Shell
sudo smbpasswd -a yourusername
  1. Set a password for your Samba share:
🐧Bash / Shell
sudo smbpasswd -a yourusername
sudo smbpasswd -e yourusername
  1. Add your account to the share group:
🐧Bash / Shell
sudo usermod -a -G sambashare yourusername
  1. Open the configuration file:
🐧Bash / Shell
sudo nano /etc/samba/smb.conf
  1. Add these lines to the bottom of the file and save it:
💻Code
    path = /samba
    browseable = yes
    read only = no
    force create mode = 0660
    force directory mode = 2770
    valid users = @sambashare

  1. Restart the service to apply changes:
🐧Bash / Shell
sudo systemctl restart smbd
sudo systemctl restart nmbd

Summary

  • Connectivity: Ubuntu and Windows 11 use the SMB protocol to talk to each other.
  • Visibility: You must enable Network Discovery in Windows so other devices can find it.
  • Permissions: You need to set up specific share permissions and passwords to keep your files secure.
  • Tools: Samba is the essential software used to bridge the gap between Ubuntu and Windows file systems.

[share]

How do I access Windows 11 shared folders from Ubuntu?

You can access Windows 11 shared folders from Ubuntu by opening the Ubuntu file manager, which automatically detects SMB-based network shares on your local network. If the share does not appear automatically, you can manually connect by entering the specific network address of the resource.

Why can't my Ubuntu computer see my Windows 11 shared files?

If your Ubuntu computer cannot see your Windows 11 shared files, it is likely because Network Discovery or File and Printer Sharing is disabled on your Windows machine. Ensure that both settings are enabled within the Advanced Sharing Settings in the Windows Control Panel.

Is it safe to enable file sharing between Windows 11 and Ubuntu?

Yes, it is generally safe if you keep password-protected sharing enabled, which ensures that only users with valid local accounts can access your shared files. Always ensure you are on a private network and avoid enabling file sharing on public Wi-Fi connections.

How do I enable Network Discovery on Windows 11 for file sharing?

To enable Network Discovery, navigate to the Windows Control Panel, go to Network and Sharing Center, and select 'Change advanced sharing settings.' From there, you can turn on Network Discovery and File and Printer Sharing for your private network profile.

Can I use command line tools to enable file sharing on Windows 11?

Yes, you can use the 'netsh advfirewall' command in an elevated Command Prompt or PowerShell window to configure firewall rules for file sharing. This is a faster alternative to navigating through the graphical Control Panel menus.

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2469 articles → Twitter

📚 Related Tutorials

How to Enable File and Printer Sharing in Windows 11
Windows How to Enable File and Printer Sharing in Windows 11
Windows 11 Control Panel Shortcuts Guide
Windows Windows 11 Control Panel Shortcuts Guide
How to Turn On or Off Public Folder Sharing in Windows 11
Windows How to Turn On or Off Public Folder Sharing in Windows 11
How to Enable or Disable Sharing Host Folders with Windows Sandbox in Windows 11
Windows How to Enable or Disable Sharing Host Folders with Windows Sandbox in Windows 11

2 responses to “How to Enable File Sharing Between Ubuntu and Windows 11”

  1. Thank you very much.
    I have tried many tutorials to connect to Windows network share and by far this was the easiest.

  2. Command prompt as administrator. Get this.

    C:\Windows\System32>netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yesnetsh advfirewall firewall set rule group=”Network Discovery” new enable=Yes
    ‘group’ is not a valid argument for this command.

Leave a Reply

Your email address will not be published. Required fields are marked *