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)
- Create a directory to use as the mount point.
- sudo mkdir /mnt/backup
- Edit the file system table to include the new mount point.
- sudo vi /etc/fstab
- 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 0
- 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 <escape>:wq<return>
- Reload the fstab file to mount the share.
- sudo mount -a
- Check the mount was successful by listing the contents of the share.
- ls /mnt/backup
Things You'll Need
- An Ubuntu server. You can download it from http://www.ubuntu.com