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
- 1Install samba file system utilities.
- 2Create a directory to use as the mount point.
- sudo mkdir /mnt/backup
- 3Edit the file system table to include the new mount point.
- sudo vi /etc/fstab
- 4Append the following snippet to the end of the file. Scroll to the end and press ato 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
- 5Save 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 <escape>:wq<return>
- 6Reload the fstab file to mount the share.
- sudo mount -a
- 7Check the mount was successful by listing the contents of the share.
- ls /mnt/backup
Comments
Post a Comment