SMB, also known sometimes as CIFS, is the protocol in charge of providing shared access to files and printers on Windows networks. To make things simpler we use both terms interchangeably. This service can run directly over TCP port 445, but it can also use the NetBIOS API.
The Linux CIFS filesystem is composed of two parts: the kernel code (referred to by the name of the kernel module, cifs) and the user-space mount tools. The cifs kernel filesystem support is generally built as a module and loaded when a user attempts to connect to an SMB/CIFS file server using the mount command. The easiest way to tell whether your Linux host possesses cifs support is to examine the contents of /proc/filesystems. Check this file and look for the term cifs listed in the output:
$ cat /proc/filesystems | grep cifs nodev cifs
Mounting a SMB/CIFS File Share
The general syntax for accessing a SMB/CIFS file share is:
$ mount.cifs //server/share mount_point [-o options ]
In case you encounter below error while running the mount.cifs command:
mount.cifs: command not found
you may try installing below package as per your choice of distribution.
|Debian||apt-get install cifs-utils|
|Ubuntu||apt-get install cifs-utils|
|Alpine||apk add cifs-utils|
|Arch Linux||pacman -S cifs-utils|
|Kali Linux||apt-get install cifs-utils|
|CentOS||yum install cifs-utils|
|Fedora||dnf install cifs-utils|
|Raspbian||apt-get install cifs-utils|
|Docker||docker run cmd.cat/mount.cifs mount.cifs|
Features and Benefits of CIFS
According to Microsoft, CIFS/SMB has a series of features that give it many benefits over other network protocols.
- Integrity and concurrency: CIFS allows concurrent access to the same file, while providing the needed locking mechanisms to prevent conflicts.
- Optimization for slow links: The CIFS protocol has been optimized over the years to work well even over slow links.
- Security: A CIFS server allows both anonymous as well as authenticated secure access to the resources.
- Performance and stability
- Unicode file names