Mounting Windows Shares in Linux

Windows network shares can be accessed from Linux using CIFS/SMB. This is useful when a Linux machine needs to read or write files on a Windows share or NAS.

Install CIFS tools

sudo apt install cifs-utils

Create a mount point

sudo mkdir -p /mnt/windows-share

Mount the share manually

sudo mount -t cifs //server/share /mnt/windows-share -o username=myuser

You will normally be prompted for the password. Avoid putting passwords directly into commands or shell history.

Unmount when finished

sudo umount /mnt/windows-share

For permanent mounts, use a protected credentials file and update /etc/fstab carefully. Test manual mounting first before making boot-time changes.

Leave a Comment