Mounting a windows share on linux

24Dec 2010

Mounting a windows share on linux

by Craig Mayhew on Fri 24th Dec 2010 under Linux/Ubuntu
This command will mount a windows share on Ubuntu 10.10 (and obviously other versions):


sudo mount -t cifs //1.2.3.4/ShareName/ /media/share -o username=yourUserName,password=yourPassword,allow_other


"1.2.3.4" - The name of the server with the share
"ShareName" - The name of the shared folder
"/media/share" - The local folder the share will be mounted to
"yourUserName" - The username for the share
"yourPassword" - The password for the share

If you don't have a password, you really should have one for security but here is the command anyway:


sudo mount -t cifs //1.2.3.4/ShareName/ /media/share -o allow_other


If you get the error:


mount: //1.2.3.4/ShareName/ is not a valid block device


Then you may need to install samba file sharing:


sudo apt-get install smbfs


Linux/Ubuntu   Samba  


© 2005-2024 Craig Mayhew