Mount SMB file share from Linux using gio

  1. Knowledge Base
  2. Operating System
  3. Systems Administration
  4. Linux
  5. Mount SMB file share from Linux using gio

Type the following command from the terminal command prompt $:

$ gio mount smb://<servername>/<sharename>

Where <servername> is the fully qualified domain name (FQDN) of the server, <sharename> is the name of the share on that server. The system will spit back the message:

Password required for share <sharename> on <servername>

When prompted enter the following:

User [admin]: ad\NetID
 
Domain [WORKGROUP]: ad

Password: YourPassword

once the mount is created it will create a temporary path located at  the following path, for example:

# /run/user/1000/gvfs/smb-share\:server\=host.domain.com\,share\=files/

At the terminal command prompt $ enter the following string where <userid> is the currently logged in Linux user id, <servername> is the fully qualified domain name (FQDN) of the server, <sharename> is the name of the share on that server and <mountpoint> is the name of a folder you would like to create to access the mapped path

ln -s /run/user/<userid>/gvfs/smb-share\:server\=<servername>\,share\=<sharename>/ ~/<mountpoint>

Note: The gio command is not persistent and you will have to run it each time the computer is rebooted.  The symbolic link should still be persistent upon re-running the gio command. 

Leave a Reply

Your email address will not be published. Required fields are marked *