This post shows students and new users the steps to share a user’s public folder on Ubuntu with Windows 11 systems using Samba. Every Ubuntu user home directory has a public folder. The folder is called Public and it is not shared by default, however you can easily share this folder with other people on your local network.

When you share the Public folder, users who are directly connected to your local network will be able to browse and access it. While sharing it, you can also choose to share so that guests (people without a user account) can also access it.

To share with Windows systems, Samba must be installed. Samba is an open source implementation of the SMB / CIFS network file sharing protocol that enables users to access files, printers, and other shared resources.

This post can also be applied to other Linux folders that you want to share with Windows systems.

To start sharing the public folder in the Ubuntu user directory with Windows, please follow the steps below.

How to share folders on Ubuntu Linux

When you log into your Ubuntu desktop and explore File Explorer, you will find the Public folder in your home directory. All accounts on the Ubuntu system have one. The folder is there to share with other users, including Windows users.

If you are using Ubuntu Linux system and want to share the public folder in your home directory, just open File Explorer, then right-click on the public folder and select Local Network Sharing as highlighted below.

In the folder sharing settings panel, check the box “Share this folder”To share with others.

When you check the box, a pop-up screen will open asking you to install a folder sharing service. This will install Samba on Ubuntu.

Click the Install Service button to continue.

In the following windows, click Install on pc to install Samba.

Then check the boxes for Allow others to create and delete files in this folder” and “Guest access”If you want to share other Windows users who should have rights to create and delete folders.

After that, click on the Create Share button to share the folder.

On Ubuntu system, run the following commands to add your account to the Samba shared group. Replace Richard with your own username.

sudo gpasswd sambashare -a richard

Next, create a Samba password for your account. Replace Richard again with your own account name.

sudo smbpasswd -a richard

Finally, restart Samba.

sudo systemctl restart smbd.service nmbd.service

How to enable Windows 11 file sharing

Now that the folder is shared in Ubuntu, the first thing you’ll want to do to access Ubuntu shares from Windows is to allow file sharing and network discovery.

To quickly enable file sharing in Windows 11, click the Start menu, then search “Symbol of the system”As highlighted below. Then right-click on command prompt applications and select Execute as an administrator.

When the command prompt application opens, run the following commands

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

In some cases, you will also want to change the network profile to Private mode in Windows 11. To do this, click Home ==> Settings ==> Network and Internet ==> Ethernet and select Private.

Turn on public folder sharing in Windows 11

Follow the steps below to set up file sharing.

Windows 11 has a centralized location for most of its settings. From system settings to creating new users and updating Windows, everything can be done from your System settings crystal.

However, the account username change is still done in the old Control Panel. To access the Control Panel, you can click Start and start writing Control Panel as shown in the following picture:

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

In the next panel, select Networks and shared resources as highlighted below.

Then select Change advanced sharing settings as highlighted below.

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

Save your changes and exit.

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

There you should see the settings for public folder sharing, media streaming, file sharing connections, and password protected sharing. Windows should automatically enable file and printer sharing on private networks. However, in some cases, this will not be enabled.

If you cannot automatically find printers and shares on your private network, file sharing may be disabled.

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

Make your changes and save, then exit.

After enabling sharing, find the Ubuntu public folder using the server’s hostname or IP address. When prompted, enter the Samba account name and password that you created earlier.

You should see the public folder that you shared.

You should do that!


In this tutorial we have seen how to share the Ubuntu public folder with Windows systems. If you find any errors above or have something to add, use the comment form below.

Write A Comment