User Tools

Site Tools


wiki:linux:basics:mount_windows_file_share_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wiki:linux:basics:mount_windows_file_share_linux [2025/01/07 13:08] – removed - external edit (Unknown date) 127.0.0.1wiki:linux:basics:mount_windows_file_share_linux [2025/01/07 13:08] (current) – ↷ Page moved from mount_windows_file_share_linux to wiki:linux:basics:mount_windows_file_share_linux Greg
Line 1: Line 1:
 +====== How To Mount a Windows File Share on Linux ======
  
 +1. Make sure the required packages/libraries are installed:
 +
 +Debian/Ubuntu: <code>apt install -y cifs-utils</code>
 +
 +RHEL/clones: <code>dnf install -y cifs-utils</code>
 +
 +2. Create a text file in ''/root'' with your file server credentials:
 +
 +<code>sudo vim /root/.windowsShare</code>
 +
 +3. Add the following contents:
 +
 +<code>
 +username=myuser
 +password=secretpassword
 +</code>
 +
 +4. Create a mount point for your share:
 +
 +<code>sudo mkdir /mnt/my_share</code>
 +
 +5. Open ''%%/etc/fstab%%'' with your favorite text editor, e.g. vim:
 +
 +<code>sudo vim /etc/fstab</code>
 +
 +6. Add the following line at the end of the file:
 +
 +<code>//server.domain.com/share_name /mnt/my_share cifs defaults,_netdev,uid=my_unix_user,credentials=/root/.windowsShare 0 0</code>
 +
 +7. Mount the share to your system (or reboot):
 +
 +<code>sudo mount /mnt/my_share</code>
 +
 +8. You're done! Yay!