How To Mount Windows 11 Shares On Ubuntu 24.04 LTS

Mount Windows 11 Shares On Ubuntu 24.04 LTS

This article provides instructions on how to mount Windows shares on Ubuntu. Use the Common Internet File System (CIFS), a network file-sharing protocol, if you wish to mount Windows 11 shares or Windows shares on Ubuntu or any other Linux-based operating system.

How To Mount Windows 11 Shares On Ubuntu 24.04 LTS

We need to configure a few settings and protocols so that Ubuntu can mount Windows 11 shares.

How To Enable Network Discovery in Windows 11

First, we confirm that Windows 11’s network discovery is turned on. On a private network, you cannot see Windows devices if your network discovery is disabled.

You can easily enable Network Discovery in Windows 11 with the following steps.

  • Use the Windows key + I shortcut for System Settings, you can go to system settings via Start ==> Settings, Or you can use the search box on the taskbar and search for Settings.
  • In Windows Settings Panel, You can see the Network & Internet option on the right side of the pane. You need to click Network & Internet, then select Ethernet on the right pane of your Windows Settings Panel.
  • After clicking on the Ethernet setting, You will have two network profile types.  You need to select the Private network profile. This profile will allow devices in your network to be discovered.

Now you need to turn on Public Folder Sharing in Windows 11.

How To Turn on Public Folder Sharing in Windows 11

In Windows 11, you must first navigate to the Cpanel before choosing Network and Internet. You will notice the Network and Sharing Center option in the right pane after selecting the Network and Internet option. Change advanced sharing settings is located on the left side of the pane in the Network and Sharing Center window. To alter the advance sharing settings, click on it. A list of options will appear; from there, choose Private (current profile) and Turn on file and printer sharing. Save your edits, then close the window.

At this point, Windows ought to activate printer and file sharing on private networks automatically, and you ought to be able to see the Public folder sharing settings. The file sharing feature might be disabled if you are still unable to view shared files or printers.

You can also easily enable the file and print sharing by running following command:

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

Now, you need to have Folders on Windows that you want to share.

How To Create Windows Shares For Linux

To share a folder, you  need to have a folder in Windows. You must make one folder for sharing if you don’t already have one. Right now, sharing the folder is crucial. Use the Start button to navigate to the computer management option.  The Shared Folders option is located in the left pane of the Computer Management panel. Expand the Shared Folders folder, then right-click on Shares and choose New Share. You must choose the folder you created in the previous step or that you wish to share. You can also set the shared folder permissions using this setting wizard.  After creating and configuring the Windows shares, You need to configure Ubuntu or Linux from where you are going to access the Windows share.

Mount Windows shares on Ubuntu Linux

Now, you need to install the CIFS utility package on Ubuntu by running the following commands to install CIFS on Ubuntu.

sudo apt update
sudo apt install cifs-utils

Run the following command to mount a  Windows share to the /mnt/Windows_Share_created directory on Ubuntu Linux.

sudo mount -t <strongcifs -o username=<Windows_User_Name> //Windows_PC_IP/<ShareName> /mnt/Windows_Share_created

It might ask for your Windows account password. If you want to include the password along with the command:

sudo mount -t cifs -o username=<Windows_User_Name>,password=<Windows_Password> //Windows_PC_IP/<ShareName> /mnt/Windows_Share_created

If you don’t want to always type the mount commands to mount Windows shares, you can go through the following steps to automatically mount the shares.

Run the commands:

sudo nano /etc/fstab

Then enter the following commands at the bottom of the file and save.

//Windows_PC_IP/ShareName  /mnt/Widows_Share_created  cifs  credentials=/etc/credentials,file_mode=0755,dir_mode=0755 0   0

Now It will automatically mount the shares.

Run the commands below to unmount the share.

sudo umount /mnt/win_share

Leave a Comment