How To Mount Windows 11 Shares On Ubuntu Linux

Guide To Mount Windows 11 Shares On Ubuntu Linux

This post shows the user’s guide to mounting Windows shares on Ubuntu. If you want to mount Windows 11 shares or Windows shares on Ubuntu or any Linux-based operating system then you need to use a Common Internet File System (CIFS), a network file-sharing protocol.

How To Mount Windows 11 Shares On Ubuntu Linux

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

At first, we make sure that network discovery is enabled in Windows 11. If your network discovery is not enabled, you won’t be able to see Windows devices on a private network.

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

You need to go to the Cpanel in Windows 11 first and then select Network and Internet. After clicking on Network and Internet option, you will see the Network and Sharing Center option in the right pane. In-Network and sharing center window, you will see  Change advanced sharing settings on the left side of the pane. You need to click on Change advance sharing settings, and you will see the various options from where you need to select Private (current profile) and Turn on file and printer sharing. Save your changes and exit.

Now, Windows should automatically turn on file and printer sharing in private networks and you should see settings for Public folder sharing. if you are still unable to see the shared files or printers then the File sharing option may be disabled.

You can also easily enable file and print sharing with the 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

Basically, you need to have a folder in Windows that you are looking to share. If you don’t have then you need to create one folder for sharing purposes. Now, the most important part is sharing the folder. Go to the computer management option via the start button.

In the Computer Management panel, you will see the Shared Folders option in the left pane. You need to expand Shared Folders and right-click Shares, then select New Share. You need to select the folder that you want to share or that you have created in the above step. In this configuration wizard, you can also configure the permissions on the shared folders.

After creating and configuring Windows shares, now 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. Run 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
READ More Relevant Stuff:  Ubuntu 21.10 Beta Released
One thought on “How To Mount Windows 11 Shares On Ubuntu 22.04 LTS”
  1. Making a local user in Windows (Computer Management>Local Users and Accounts.Users>Action>New User) makes it work. Include a password with Never Expire and Cannot Change Password.

Leave a Reply

Your email address will not be published. Required fields are marked *