How to Enable File Sharing Between Ubuntu and Windows 11
File sharing between Ubuntu and Windows 11 lets you move files back and forth between both operating systems over your home network in about 10 minutes without using USB drives. This connection relies on Samba, a free tool that allows Linux computers to share files using the same network language as Windows.
Once you finish the setup, your Windows 11 shared folders show up right inside the Ubuntu file manager, and your Ubuntu files appear on your Windows desktop.
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
Turning on file sharing in Windows 11 allows your Ubuntu computer to see and connect to your Windows folders over your home network. You do this through the Control Panel by opening the Network and Sharing Center, changing the advanced sharing settings, and turning on network discovery and file and printer sharing.
- Click Start and type Control Panel .

windows 11 control panel - Click Network and Internet.

windows 11 control panel network and internet - Select Network and Sharing Center.

windows 11 network and sharing center - Click Change advanced sharing settings.

windows 11 change advanced sharing settings - Under the Private section, turn on File and printer sharing.

windows 11 advanced sharing center 1 - Scroll down to All networks and ensure these settings are active so you can access your folders.

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.
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
Accessing Windows shares from Ubuntu takes just a few clicks inside the built-in File Manager. You connect directly to your Windows computer by opening Other Locations, typing your Windows machine’s network address, and entering your Windows login details to browse the shared folders.
- Open your File Manager.
- Click Other Locations in the left sidebar.

ubuntu and windows 11 file sharing - If you do not see your Windows computer, you may need to install the sharing tool by opening your terminal and running:
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:
smb://servername/Share_name
Or if you have a specific folder to open:
smb://10.0.2.18/users/Richard/Documents



How to access Ubuntu files from Windows
Accessing Ubuntu files from Windows requires Samba (a tool that lets different operating systems share files over a network). You install Samba, create a shared folder on your Ubuntu system, and change the folder permissions so your Windows computer has permission to open it.
- Open the terminal and create a folder:
sudo mkdir /samba
- Set the permissions so others can use it:
sudo chgrp sambashare /samba sudo chmod 2770 /samba
- Add your user account to the sharing list (replace yourusername with your actual Ubuntu name):
sudo smbpasswd -a yourusername
- Set a password for your Samba share:
sudo smbpasswd -a yourusername sudo smbpasswd -e yourusername
- Add your account to the share group:
sudo usermod -a -G sambashare yourusername
- Open the configuration file:
sudo nano /etc/samba/smb.conf
- Add these lines to the bottom of the file and save it:
path = /samba
browseable = yes
read only = no
force create mode = 0660
force directory mode = 2770
valid users = @sambashare
- Restart the service to apply changes:
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?
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.
Thank you very much.
I have tried many tutorials to connect to Windows network share and by far this was the easiest.
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.