How to Mount a Windows Share on an Ubuntu Server
How to Mount a Windows Share on an Ubuntu Server
Access a windows share as if it was part of the Linux file system. The example here is for an Ubuntu server, but will probably work with most other Linux distributions.

This example will mount a windows share at /mnt/backup
Steps

Install samba file system utilities. sudo apt-get install smbfs (In new version install sudo apt-get install cifs-utils)Mount a Windows Share on an Ubuntu Server Step 1Bullet1.jpg

Create a directory to use as the mount point. sudo mkdir /mnt/backupMount a Windows Share on an Ubuntu Server Step 2Bullet1.jpg

Edit the file system table to include the new mount point. sudo vi /etc/fstabMount a Windows Share on an Ubuntu Server Step 3Bullet1.jpg

Append the following snippet to the end of the file. 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 0Mount a Windows Share on an Ubuntu Server Step 4Bullet1.jpg

Save and exit. 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 :wqMount a Windows Share on an Ubuntu Server Step 5Bullet1.jpg

Reload the fstab file to mount the share. sudo mount -aMount a Windows Share on an Ubuntu Server Step 6Bullet1.jpg

Check the mount was successful by listing the contents of the share. ls /mnt/backupMount a Windows Share on an Ubuntu Server Step 7Bullet1.jpg

What's your reaction?

Comments

https://tupko.com/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!