Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is a simple way to (temporarily) mount a windows share from within Ubuntu 11.04 via the command line?

Basically, I'd like the path /home/myuser/windowsbox to map to a windows share. (Need to supply user/pass/domain)

Most of the tutorials I can find use fstab for a permanent mapping. The GUI options do not let me specify a local path for the mounting.

Thank you

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Just use mount -t cifs to do it from command line. Consult manpage for mount to learn about additional options like user/password/explicit filename encoding/file ownership etc. You would unmount it using umount /home/myuser/windowsbox

In particular see the uid/gid options. This will let normal users access the share.

There's also smbfs as mount type but please don't use it since it's being obsoleted by cifs.

share|improve this answer
+1 for the obsoletion reminder on smbfs. – Tim Brigham Oct 5 '11 at 15:38

Open a command line and enter the following.

smbmount //MYWINBOX/MYSHARE /mnt/winstuff -o username=domain//username 

From here you should be able to enter your password and mount your volume.

share|improve this answer
On my machine I get the error: mount.cifs: permission denied: no match for /home/myuser/windowsbox found in /etc/fstab – nonot1 Oct 5 '11 at 22:11

What is the name of your Windows share that you're trying to map? This is how I've done temporary mapping (substitute //mywinbox/myshare with the network path to the widows share you want to map and with the username credentials to connect to your Windows box):

sudo mount -t cifs //mywinbox/myshare /home/myuser/windowsbox -o username=<username>

It would probably be recommended that you house your mappings in a more established location such as /mnt/windowsbox then perhaps create a symlink in the /home/myuser directory. Just a thought for consistency.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.