Q. How do I mount CIFS Windows Server / XP / Vista Shared folder under Linux operating systems?
A. Common Internet File System is an application-level network protocol mainly used to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. You can easily access CIFS share from Linux and mount them as a regular filesystem.
Mount Linux CIFS share
Mount CIFS with the default local filesystem permissions:
# mkdir /mnt/cifs
# mount -t cifs //server-name/share-name /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft
# mount -t cifs //192.168.101.100/sales /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft
OR
# mount.cifs //192.168.101.100/sales /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft
Where,
- username=shareuser : specifies the CIFS user name.
- password=sharepassword : specifies the CIFS password. If this option is not given then the environment variable PASSWD is used. If the password is not specified directly or indirectly via an argument to mount, mount will prompt for a password, unless the guest option is specified.
- domain=nixcraft : sets the domain (workgroup) of the user
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 9 comments… read them below or add one }
Hi,
i can mount windows share when using gnome mount.
but if i use CLI then how to mount without password since there is no password required for my windows share..
-EKram
use the guest option.
….,guest,…..
help is available from the CLI with:
man mount.cifs
When i am performing mounting, it giving me error like cifs file system not found
Do you have samba installed?
Thank you, this article really helped me!
How can you specify username/pw in /etc/fstab for automatic mounting?
@Drew: You can add a line similar to below to /etc/fstab
//WindowsHost/Sharename /LocalMountPoint cifs username=,credentials=/etc/cifsauth{any file},domain=[workgroup/WindowsHostName/Most of the time can be left blank] 0 0
Two zeros at end of line are important as it will prevent boot failure when windows share is unavailable.
Format of credentials file (/etc/cifsauth)
username=
password=
This article is very helpful can we permanent mount this ??????????????
how to mount a ubuntu share on ubuntu using command line?