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...

7 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Install samba file system utilities.

    sudo apt-get install smbfs (In new version install sudo apt-get install cifs-utils)
  2. 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
  3. Step 3: Edit the file system table to include the new mount point.

  4. Step 4: Append the following snippet to the end of the file.

  5. Step 5: Save and exit.

  6. Step 6: Reload the fstab file to mount the share.

  7. 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

S

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.

95 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: