Mount Windows Folders from Linux

Hello, friends. In this post, you will learn how to mount Windows shared folders on Linux. You will be surprised how easy it is. Let’s get started.

One of the most common situations we face in a network is file sharing. Although many sysadmins may not like it, it is often the fastest way to share information within the organization.

Previously, we have explained how to install and configure a Samba server which is an important method for this purpose, but being a server, it requires a central Linux machine.

How to do it the other way around? That is to say that it is Windows that shares the folder, you will see.

Mount shared Windows folders on Linux

The first thing to do is to share the folder from Windows. This process is simple, just right-click on the folder and assign appropriate permissions (Total Control).

Then, if you’d like, create a test file.

Share a windows folder
Share a windows folder

It is also necessary to know the IP address of the Windows system, or at least the hostname.

Now it is necessary to install a Linux package called cifs-utils this command is a member of Samba and is a kernel instruction to mount remote resources from Windows.

In the case of Debian, Ubuntu and derivatives, you can install it with this command

sudo apt update
sudo apt install cifs-utils

This is enough.

The next step is to create a new folder, which is where we will mount the Windows folder

mkdir windows

Of course, you can change the name of the folder to whatever you want. In this case, I put windows but it can be another one.

Now follow this structure, you can mount the folder

sudo mount.cifs //[Windows-IP]/[shared-folder-name] [folder-to-mount] -o user=[Windows-account]

So for this example, where the IP address of the Windows machine is with a shared folder named sample and the user Angelo would look like this

sudo mount.cifs // /home/angelo/windows/ -o user=Angelo
Mount a Windows folder on Linux
Mount a Windows folder on Linux

You will be asked for the password, and the folder will be mounted. The only thing left to do is to access it from the file browser.

Shared folder in Linux
Shared folder in Linux

As you can see, the process is so easy that it’s scary 🙂


Mounting Windows folders on Linux is easy to do. So, there are not too many excuses not to do it.

cifs-utils website

I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook