HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

mount.cifs — Mount SMB (Server Message Block) or CIFS (Common Internet File System) shares. Note: You can also do

Submitted by: @import:tldr-pages··
0
Viewed 0 times
servercommandmount.cifsclimountblocksmbmessage
linux

Problem

How to use the mount.cifs command: Mount SMB (Server Message Block) or CIFS (Common Internet File System) shares. Note: You can also do the same thing by passing the -t cifs option to mount. More information: <https://manned.org/mount.cifs>.

Solution

mount.cifs — Mount SMB (Server Message Block) or CIFS (Common Internet File System) shares. Note: You can also do the same thing by passing the -t cifs option to mount. More information: <https://manned.org/mount.cifs>.

Connect using the specified username or $USER by default (you will be prompted for a password):
mount.cifs -o user={{username}} //{{server}}/{{share_name}} {{mountpoint}}


Connect as the guest user (without a password):
mount.cifs -o guest //{{server}}/{{share_name}} {{mountpoint}}


Set ownership information for the mounted directory:
mount.cifs -o uid={{user_id|username}},gid={{group_id|groupname}} //{{server}}/{{share_name}} {{mountpoint}}

Code Snippets

Connect using the specified username or `$USER` by default (you will be prompted for a password)

mount.cifs -o user={{username}} //{{server}}/{{share_name}} {{mountpoint}}

Connect as the guest user (without a password)

mount.cifs -o guest //{{server}}/{{share_name}} {{mountpoint}}

Set ownership information for the mounted directory

mount.cifs -o uid={{user_id|username}},gid={{group_id|groupname}} //{{server}}/{{share_name}} {{mountpoint}}

Context

tldr-pages: linux/mount.cifs

Revisions (0)

No revisions yet.