Mounting a remote Shared Folder

From Gentoo Linux Wiki

Jump to: navigation, search

Instructions to access Windows shared folder on a remote computer using native kernel modules.

Contents

[edit] Configuration

In order to mount a remote filesystem, you must configure your kernel accordingly.

Linux Kernel Configuration: CIFS File system support
File Systems  --->
     [*] Network File Systems  --->
          <*>   CIFS support (advanced network filesystem, SMBFS successor)
          [*]     CIFS Statistics
          [*]     CIFS Extended attributes

Refer to the official kernel configuration article to compile and install your fresh kernel.

[edit] Usage

Use the following terminal command to mount a remote folder, replacing IP_OR_NAME with the IP or the computer name, SharedFolderName with the the Shared folder name and /mnt/sharedfolder with the local folder you want to link with.

[edit] CIFS (Windows)

Make a target directory:

mkdir /mnt/sharedfolder

Mount the remote share:

mount -t cifs //IP_OR_NAME/SharedFolderName /mnt/sharedfolder

If you need credentials to access the remote folder, use the following :

mount -t cifs //IP_OR_NAME/SharedFolderName /mnt/sharedfolder -o "username=X,passwd=Y"

You can also specify if the share is read/write (rw), read only (ro) or write only (wo) with the -o parameter. Here is a complete working example :

mount -t cifs //192.168.1.101/SharedDocs /mnt/sharedfolder -o "rw,username=admin,passwd=password"

[edit] See Also

  • NFS - Creating and mounting shares using NFS
Personal tools