Skip to content
Follow
Windows

How to Enable File Sharing Between Ubuntu and Windows 11

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

File sharing between Ubuntu and Windows 11 works by setting up Samba on your Ubuntu computer.

Samba is a free program that speaks the same language as Windows for sharing files and printers. This lets you easily move files and access things on both your Ubuntu and Windows 11 PCs.

This connection means you can see your Windows 11 shared folders right in Ubuntu’s file manager. Likewise, you can get to your Ubuntu shares from your Windows 11 computer without needing USB drives.

⚡ Quick Answer

Enable file sharing by configuring Samba on Ubuntu and ensuring Network Discovery and File Sharing are active in Windows. Access Windows shares from Ubuntu via the File Manager using smb://servername/Share_name, and access Ubuntu shares from Windows by setting up Samba on Ubuntu.

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

To share files between Ubuntu and Windows 11, you first need to turn on file sharing in Windows. This setting is found in the Control Panel, under the Network and Sharing Center, and then in the advanced sharing settings. Making sure this is active is the first step for successful Ubuntu Windows 11 file sharing.

  1. Click Start and type Control Panel.

    Windows 11 Control Panel for settings adjustment
    windows 11 control panel

  2. Click Network and Internet.

    Network and Internet settings in Windows 11 Control Panel
    windows 11 control panel network and internet

  3. Select Network and Sharing Center.

    Network and Sharing Center in Windows 11
    windows 11 network and sharing center

  4. Click Change advanced sharing settings.

    Advanced sharing settings in Windows 11
    windows 11 change advanced sharing settings

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

    Windows 11 Advanced Sharing Center configuration
    windows 11 advanced sharing center 1

  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
    windows turn off password protected sharing

You can quickly enable file sharing settings for Windows 11 by running specific commands as an administrator in the Command Prompt. This method is particularly useful for users who prefer command-line operations over graphical interfaces.

💻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

Once you’ve set up file sharing on your Windows 11 computer, you can easily access those shared folders directly from your Ubuntu machine using its File Manager. Simply open the File Manager, click ‘Other Locations’ in the sidebar, and then type in your Windows computer’s network address to connect and browse your files.

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

    File sharing setup between Ubuntu and Windows 11
    ubuntu and windows 11 file sharing

  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
windows 11 shares access from ubuntu
⚠️Warning
When prompted, enter your Windows username and password to gain access.
Ubuntu accessing shared folders from Windows
ubuntu access windows shared folders
Ubuntu connecting to Windows 11 shared resources
ubuntu access windows 11 shares

How to access Ubuntu files from Windows

Accessing your Ubuntu files from Windows is possible by setting up a shared folder using a tool called Samba. This involves creating a specific folder on your Ubuntu system and then adjusting its permissions so that your Windows computer can see and access it. This process ensures smooth Ubuntu Windows 11 file sharing in both directions.

  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

Connecting Ubuntu and Windows 11 for file sharing relies on the SMB protocol, requiring network discovery to be visible and Samba for access.

Was this guide helpful?

Was this 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.

📚 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 Comments

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

    Reply
  • 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.

    Reply

Leave a Comment

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