How to Mount a Windows Share on an Ubuntu Server
Install samba file system utilities., Create a directory to use as the mount point., Edit the file system table to include the new mount point., Append the following snippet to the end of the file., Save and exit., Reload the fstab file to mount the...
Step-by-Step Guide
-
Step 1: Install samba file system utilities.
sudo apt-get install smbfs (In new version install sudo apt-get install cifs-utils) -
Step 2: Create a directory to use as the mount point.
sudo mkdir /mnt/backup , sudo vi /etc/fstab , Scroll to the end and press a to append text.
Note that the text should all be on one line. //YOUR_SERVER/YOUR_SHARE /mnt/backup cifs domain=YOUR_DOMAIN,username=YOUR_USERNAME,password=YOUR_PASSWORD 0 0 , To exit vi you leave edit mode by pressing escape.
Then enter command mode by typing colon.
Then enter wq to write and quit.
Type <escape>:wq<return>
sudo mount
-a , ls /mnt/backup -
Step 3: Edit the file system table to include the new mount point.
-
Step 4: Append the following snippet to the end of the file.
-
Step 5: Save and exit.
-
Step 6: Reload the fstab file to mount the share.
-
Step 7: Check the mount was successful by listing the contents of the share.
Detailed Guide
sudo apt-get install smbfs (In new version install sudo apt-get install cifs-utils)
sudo mkdir /mnt/backup , sudo vi /etc/fstab , Scroll to the end and press a to append text.
Note that the text should all be on one line. //YOUR_SERVER/YOUR_SHARE /mnt/backup cifs domain=YOUR_DOMAIN,username=YOUR_USERNAME,password=YOUR_PASSWORD 0 0 , To exit vi you leave edit mode by pressing escape.
Then enter command mode by typing colon.
Then enter wq to write and quit.
Type <escape>:wq<return>
sudo mount
-a , ls /mnt/backup
About the Author
Shirley Jenkins
With a background in realestate, Shirley Jenkins brings 5 years of hands-on experience to every article. Shirley believes in making complex topics accessible to everyone.
Rate This Guide
How helpful was this guide? Click to rate: