How to Mount a Windows Share Folder on Linux

There are major differences between Linux and Windows systems, and different file systems and protocols are used. Sharing files between them can be difficult, especially since they use two different sharing protocols.

But this does not mean that it is impossible to mount Windows shared folders on Linux. Please follow the instructions below.

Share your Windows folder

Before doing anything, you need to make sure that Windows is properly set up to allow network file sharing.

To enable this feature on Windows 10, right-click the network icon in the notification area of ​​the Windows taskbar. From here, click “Open Network and Internet Settings.”

Under the Status category, click Sharing Options.

Windows Network Sharing Settings Menu

In the Windows Sharing Options menu, make sure that “Open Network Discovery” and “Open File and Printer Sharing” are enabled.

Click the radio button next to both options to make sure this is the case.

Windows enable network sharing

Click “Save Changes” to save your settings. Once this is done, open Windows File Explorer and find the folder you want to share with your Linux PC.

Right-click the folder and click Properties.

Windows folder properties menu

In the folder properties, click the Sharing tab, and then click Advanced Sharing. Click to enable the Share this folder check box, and then click Permissions.

Windows shared folder

Under the Permissions section, set control permissions for the folder. By default, Windows will grant read-only access to files.

If you want to allow everyone to read or write to the folder, click Allow for the Full Control permission set. Set these permissions to suit your own needs.

Windows folder sharing permissions

When done, click OK three times to close each dialog box.

Your folder should now be shared on the network and accessible from your Linux PC.

Install CIFS-utils

Depending on your Linux distribution, you might be able to mount Windows shared folders automatically in the distribution’s file browser.

However, this may not work. The safest way to mount a Windows shared folder on Linux is to use the CIFS-utils package and mount the folder on a Linux terminal.

This gives Linux machines access to SMB file shares used by Windows PCs.

Install Cifs utility for Linux

To install CIFS-utils, open a new terminal window. For Ubuntu and Debian based distributions, type:

sudo apt install cifs-utils

For Arch users, enter:

pacman -S cifs-utils

After installation, you can mount Windows shared folders from a Linux terminal.

Mount Windows SMB share on Linux

You need to create a mount directory before you can mount a Windows SMB shared folder on Linux. Linux will mirror the contents of the shared folder here.

To do this, open a terminal window and type:

sudo mkdir /mnt/share

Once created, type the following:

sudo mount.cifs //Windows/SharedFolder /mnt/share -o user=account

Replace “Windows” with the IP address or host name of your Windows PC and “SharedFolder” with the name of the shared folder. For username, replace “Account” with your Windows username or full Microsoft account email.

Linux installation folder command

You will be asked for your Windows password before the installation process is complete. Type and click Enter. If you use the correct information, the Windows folder should now be installed and accessible in the folder you created.

Share files between Linux and Windows

Mount Windows and Linux shared folders, no matter what operating system you use, you can freely access the most important files. The SMB protocol is well supported on Linux, so after installing the CIFS-utils package, you can easily find it difficult to continue to access Windows files and folders.

If you only want to use one system, here are the five best Linux distributions available for Windows users.

Ranch
                        
                    
                    Ranch

Sidebar