In a mixed enviroment of Windows and Linux, you may often use Samba/Windows shares. Traditionally, the use of GVFS and CIFS to access Windows shares on Linux PCs is common. Personally, I prefer CIFS as it works more predictably, reliably, and faster.
The Server Message Block (SMB) Protocol is the network file sharing protocol of Microsoft Windows. The set of message packets defining a particular version of the protocol is called a dialect. The Common Internet File System (CIFS) is a dialect of SMB. Both SMB and CIFS are also available on VMS. Both SMB and CIFS are also available on other operating systems like Linux and Android via alternate implementations which are not officially supported by Microsoft.
With cifs-utils on Linux, you can easily mount a share to any folder you want using the
mount command. Also, you can configure a mount point for CIFS with the
The problem comes when the remote computer becomes inaccessible. e.g. when the remote computer is shutting down, or when you have your network connection interrupted, the mounted share gives you a terrible experience.
Every time you try to navigate to the mount point's parent directory with a file manager app, it freezes. When you try to use autocompletion with bash, it causes a delay if the mount point matches the name pattern.
To solve this problem, I have tried the lazy unmount option. It is the
umount -l command that must be familiar to many Linux users. However, it didn't help me.
After some experiments, I have figured out the following solution.
To force unmount a CIFS share in Linux, do the following.
- Open your favorite terminal app.
- Type the following command:
sudo umount -a -t cifs -l, then supply your password.
- If the sudo command is not available in your environment, switch to root with the
sucommand, and then issue the command
umount -a -t cifs -l
This has resolved my issue. If you are using another working solution, do not hesitate to share it in the comments.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: