smbfs

On Linux, the smbfs filesystem can be used to mount SMB shares onto the Linux filesystem in a manner similar to mounting disk partitions on NFS filesystems. The result is so transparent that users on the Linux system might never be aware that they are accessing files through a Windows or Samba server. Files and directories appear as any other files or directories on the local Linux system, although there are a few differences in behavior relating to ownership and permissions.[27]

Although smbfs is based on the Samba code, it is not itself part of the Samba distribution. Instead, it is included with Linux as a standard part of the Linux filesystem support.

The smbmount and smbmnt programs are part of the Samba distribution and are needed on the client to mount smbfs filesystems. Samba must be compiled with the --with-smbmount configure option to make sure these programs are compiled. They refer to smb.conf for information they need regarding the local system and network configuration, so you will need a working smb.conf file on the system, even if it is not acting as a Samba server.

Mounting an smbfs Filesystem

The smbmount command is used to mount an smbfs filesystem into the Linux filesystem. The basic usage is:

# smbmount 
               Share-UNC mount-point
                -o 
               options

Replace Share-UNC with the UNC for the SMB share, and mount-point with the full path to the directory in the Linux filesystem to use as the mount point. The options argument is used to set the exact manner in which ...

Get Using Samba, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.