Skip to content
Follow
Ubuntu Linux Windows

How to Mount Windows 11 Shares on Ubuntu Linux

Richard
Written by
Richard
Oct 12, 2021 Updated Jun 19, 2026 3 min read
How to Manage Phone Number Visibility in Microsoft Teams
How to Manage Phone Number Visibility in Microsoft Teams

You mount Windows 11 shares on Ubuntu Linux by using the Samba client to access shared folders directly from your Ubuntu desktop.

This process effectively bridges your Windows 11 file system with your Ubuntu environment, enabling seamless file transfer and collaboration.

You’ll typically use the command `sudo apt update && sudo apt install cifs-utils` to install the necessary tools, which are part of the Samba suite.

⚡ Quick Answer

Install `cifs-utils` on Ubuntu, create a mount point folder, and use the `mount` command with your Windows IP, share name, and credentials. For permanent mounting, add an entry to your `/etc/fstab` file.

Enable Network Discovery in 🪟 Windows 11

To let your Ubuntu computer see your Windows 11 PC for sharing files, you need to turn on Network Discovery in Windows settings.

To get to System Settings, use the Windows key + I shortcut or click Start ==> Settings.

Opening Windows 11 settings to configure network sharing for Ubuntu
windows 11 start settings

In Windows Settings, click Network & Internet, then select Ethernet.

Navigating to Network and Internet settings in Windows 11
windows 11 network internet

Under Network profile type, choose Private. This allows devices on your network to see your computer.

Enabling network discovery settings in Windows 11 for file sharing
network discovery in windows 11 profile

Turn on Public Folder Sharing in 🪟 Windows 11

Sharing files and folders from your Windows 11 PC to Ubuntu requires turning on file and printer sharing in the Network and Sharing Center.

Accessing the Windows 11 Control Panel for advanced network configuration
windows 11 control panel

Select Network and Internet.

Selecting Network and Internet options within Windows 11 Control Panel
windows 11 control panel network and internet

Select Network and Sharing Center.

Opening the Network and Sharing Center on Windows 11
windows 11 network and sharing center

Select Change advanced sharing settings.

Accessing advanced sharing settings to enable Windows 11 file shares
windows 11 change advanced sharing settings

Under Private, select Turn on file and printer sharing.

Configuring advanced network sharing options for Ubuntu Linux connectivity
windows 11 advanced sharing center 1

Note: You may need administrator privileges to change these settings. You can also run these commands in an administrator Command Prompt:

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

How to mount Windows shares on Ubuntu Linux

Mounting Windows shares on Ubuntu Linux is simple once you install the cifs-utils tool and use the correct mount command.

🐧Bash / Shell
sudo apt update
sudo apt install cifs-utils

Create a folder to act as your mount point:

🐧Bash / Shell
sudo mkdir /mnt/Windows_Share

Mount the share using the mount command:

🐧Bash / Shell
sudo mount -t cifs -o username=<Windows_UserName> //WindowsPC_IP/<ShareName> /mnt/Windows_Share

Let’s break down what those terms mean:

  • -t cifs: Tells Ubuntu to use the CIFS/SMB protocol.
  • username: Your Windows login name.
  • //192.168.1.5/ShareName: The network path to your Windows folder.
  • /mnt/Windows_Share: The folder on Ubuntu where files will appear.

Advanced Mount Options and Security

For better security when you mount Windows shares on Ubuntu, use a credentials file instead of typing your password directly in the terminal.

💻Code
nano /home/user/.smbcredentials

Add these lines to the file:

💻Code
username=generic_user
password=your_password
domain=WORKGROUP

Protect the file so only you can read it:

🐧Bash / Shell
sudo chown root: /etc/credentials
sudo chmod 600 /etc/credentials

Use this command to mount using the file:

🐧Bash / Shell
sudo mount -t cifs -o credentials=/etc/credentials //WindowsPC_IP/<ShareName> /mnt/Windows_Share

How to auto-mount with /etc/fstab

You can make your Windows share automatically mount every time your Ubuntu computer starts by adding a specific line to the /etc/fstab file.

🐧Bash / Shell
sudo nano /etc/fstab

Add this line to the bottom of the file:

💻Code
//WindowsPC_IP/ShareName  /mnt/Widows_Share  cifs  credentials=/etc/credentials,file_mode=0755,dir_mode=0755 0   0

The _netdev option ensures the system waits for the network to be active before trying to mount the share.

Summary Table

MethodPersistenceBest For
Manual MountTemporaryQuick, one-time file access
/etc/fstabPermanentAutomatic access at startup

Summary

Mounting Windows shares on Ubuntu allows for easy file sharing. By enabling Network Discovery on Windows and using the cifs-utils package on Ubuntu, you can connect systems securely. Use the /etc/fstab file for permanent access, and always use a credentials file to keep your passwords safe.

Why am I getting a ‘Permission Denied’ error when mounting?

Permission denied usually happens if the Windows username or password is incorrect, or if the Windows folder does not have sharing permissions enabled for your user account. Double-check your credentials and ensure the user has ‘Read/Write’ access in the Windows folder properties under the ‘Sharing’ tab.

How do I mount a Windows share that requires a specific SMB version?

If your Windows share connection fails on Ubuntu, you might need to specify the SMB version, like 3.0 or 2.0, in your mount command or fstab entry.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Enable File and Printer Sharing in Windows 11
Windows How to Enable File and Printer Sharing in Windows 11
How to Enable File Sharing Between Ubuntu and Windows 11
Windows How to Enable File Sharing Between Ubuntu and Windows 11
Windows 11 Control Panel Shortcuts Guide
Windows Windows 11 Control Panel Shortcuts Guide
How to Access Control Panel in Windows 11
Windows How to Access Control Panel in Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

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