How to Access Shares on Windows 11 from Ubuntu

This post shows students and new users how to connect to shares on Windows 11 from Ubuntu desktop.

By default when you open Ubuntu file manager, it should find network shares that are automatically advertise across the local network. Similar to Windows systems, Ubuntu uses SMB protocol to connect to Windows shares that are advertised and shared.

Remote users can connect over the network and access shared files and folders as if they were directly connected to the local machines. This is a convenient way to make files and folders available to other people on your local network.

When shares are advertised Ubuntu and other desktop computers should be able to view and connect to the shared resources.

However, if the shares are not advertised, users on the same network will have to manually connect to the shares by typing the resource network address. The steps below will show you how to do that.

Ubuntu and Windows 11 should work seamlessly when it comes to file sharing since both will still use SMB protocol. Some things and settings have changed so much that folks will have to learn new ways of using Windows.

Despite all these new changes in Windows 11, filesharing between Windows and Ubuntu should still work.

Enable Network Discovery in Windows 11

As we mentions above, shares must be advertised in order for other devices to view or access. In Windows, Network Discovery needs to be turned for advertising of shares to be viewed from other devices.

If your Windows devices are not able to see or discovery each other on your private network, it might likely be that Network Discovery is disabled.

To enable Network Discovery, continue below.

Windows 11 has a centralized location for majority of its settings. From system configurations to creating new users and updating Windows, all can be done from its System Settings pane.

To get to System Settings, you can use the Windows key + i shortcut or click on Start ==> Settings as shown in the image below:

Alternatively, you can use the search box on the taskbar and search for Settings. Then select to open it.

Windows Settings pane should look similar to the image below. In Windows Settings, click Network & internet, then select Ethernet on the right pane of your screen shown in the image below.

In Ethernet settings pane, under Network profile type, choose Private. This profile will allow devices in your network to be discovered. This profile should also be selected if you need file sharing or use apps that communicate over this network.

The private profile is suitable for home, work places and network that are trusted.

If you have other networks like Wi-Fi (if you’re connected to a wireless network) or Ethernet (if you’re connected to a network using a network cable), you can also set the profile type to be Private.

When you’re done, exit and network discovery should be enabled.

Turn on Public Folder Sharing in Windows 11

Use the steps below to setup file sharing.

Windows 11 has a centralized location for majority of its settings. From system configurations to creating new users and updating Windows, all can be done from its System Settings pane.

However, change account username is still done in the old Control Panel. To get to Control Panel, you can click on Start and start typing Control Panel as shown in the image below:

In the Control Panel, select Network and Internet as highlighted in the image below.

On the next pane, select Network and Sharing Center as highlighted below.

Next, select Change advanced sharing settings as highlighted below.

In the Advanced sharing center, select the Private (current profile) and Turn on file and printer sharing.

Save your changes and exit.

On the same Advance sharing options page, scroll down All networks.

There you should see settings for Public folder sharing, Media streaming, File sharing connections and Password protected sharing. Windows should automatically turn on file and printer sharing in private networks. However, in some instances, this will not be enabled.

If you can not automatically find printers and shared resources in your private network, then File sharing option may be disabled.

If you enable password protected sharing, only people who have accounts on the local computer or in domain environment will be able to access shared files and printers.

Make your changes and save, then exit.

The settings above can easily be done using the commands below when run as administrator.

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

You must open the command prompt as administrator to run the commands above.

Access shares on Windows 11 from Ubuntu

Now that Network Discovery and file sharing is enabled, you can now connect to Ubuntu and view shares on Windows devices.

To browse Windows files over the network, open File Manager application from the Activities overview (top left corner) or click File Manager on the dock and click Other Locations in the sidebar.

If Network Discovery is enabled and file sharing enable, you should see shared file and folders in the Windows Network folder above.

If not, run the commands below to install Samba.

sudo apt update
sudo apt install samba

In the file manager, click Other Locations in the sidebar. In Connect to Server, enter the address of the server, in the form of a URL. Details on supported URLs are listed below If you have connected to the server before, you can select it from the Recent Servers list.

Then click the Connect button when you’re ready to connect.


Another format with multiple shared folders:


Windows computers use a proprietary protocol to share files over a local area network. Computers on a Windows network are sometimes grouped into domains for organization and to better control access. If you have the right permissions on the remote computer, you can connect to a Windows share from the file manager.

You should see Windows shares if you have access to them.

If accessing the shares and you’re prompted for login name and password, type in the Windows account login info. This account must have access to view the shared content.

How to access Ubuntu files from Windows

On the Ubuntu machine, we’ll want to create a folder to share with Windows systems. Run the commands below to create a folder called samba in the system root directory.

sudo mkdir /samba

After that, set the group ownership to sambashare and permission to allow member of the group to access the folder.

sudo chgrp sambashare /samba
sudo chmod 2770 /samba

After changing the folder permission to allow sharing, run the commands below to add your Ubuntu account to allow access via Samba.

Replace yourusername with your Ubuntu account.

sudo smbpasswd -a yourusername

Next, set Samba password and enable your Ubuntu account to access Samba shares.

sudo smbpasswd -a yourusername
sudo smbpasswd -e yourusername

Next, add your user account to sambashare group.

sudo usermod -a -G sambashare yourusername

After that, open Samba configuration file by running the commands below.

sudo nano /etc/samba/smb.conf

Then add these lines at the bottom of the file and save.

    path = /samba
    browseable = yes
    read only = no
    force create mode = 0660
    force directory mode = 2770
    valid users = @sambashare

After saving the file, restart Samba by running the commands below.

sudo systemctl restart smbd
sudo systemctl restart nmbd

At this point you should be able to access the /samba folder on Ubuntu system using your account. When prompted, type in your Ubuntu username and password.

That should do it!


This post showed you how to enable Windows Network Discovery and enable file sharing to access shared content from Ubuntu. If you find any error above, please use the comment form below to report.