If you have a multi-operating systems environment, you can use Microsoft SMB/CIFS protocol to allow file sharing between Windows, Linux, and macOS systems. On Linux systems, you’re going to be using Samba to share and access files over SMB/CIFS. For this tutorial, we’re going to be creating a shared folder on a Ubuntu machine, configuring Samba to allow access to the shared resource, and configuring Windows 11 to be able to get to the shared resource. To get started with sharing the Ubuntu folder so users on Windows 11 can access it, follow the steps below:

How to enable file sharing in Windows 11

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 on the Start menu, then search for “Command Prompt” as highlighted below. Then right-click on the Command Prompt apps and select Run as administrator. When the command prompt app opens, run the commands below In some cases, you’ll also want to switch the network profile to Private mode in Windows 11. To do that, click on Start ==> Settings ==> Network & internet ==> Ethernet and select Private.

How to install Samba on Ubuntu

Now that file sharing is enabled in Windows, go and install Samba. Samba enables file and printer sharing on Ubuntu systems. The commands below will install Samba.

How to find Workgroup name in Windows 11

Because we want both the Windows 11 and Ubuntu machines to be in the same workgroup, let’s find out what workgroup Windows belongs to. Then we’ll add Ubuntu to the same group. On the Windows 11 machine, open the command prompt and type the commands below: Look for the Workstation domain line to see the Workgroup Windows belongs to. By default, it’s WORKGROUP.

How to configure Samba on Ubuntu

At this point, Windows should be configured for file sharing and network discovery as well as switch to the Private network profile. Now go and configure the Ubuntu machine to be part of the same workgroup as Windows, and configure Samba share. Run the commands below to edit Samba’s default configuration file. Then edit the lines below in the smb.conf file to match the lines in the code block below: Save and exit

How to create Samba shares

Next, run the commands below to create the folder you’re sharing in the configuration file. The folder called share will be created in the /srv/samba/ directory. Finally, run the commands below to restart Samba and related services. Now open Windows File Explorer and you should browse to the Ubuntu share using the server name or IP address followed by the shared resource name. You should also be able to map the Ubuntu share to Windows 11. That’s it! Conclusion: This post showed you how to create Ubuntu Samba shares and allow access from Windows 11 machines. If you find any error above, please use the comment form below to report.