How Do I Map a Network Share On Linux?
Given an SMB file share available on your network as
\\sharename\budget\ that you wish to have mapped to the Confluence server as
/mnt/share/budget, perform the following steps:
Make sure the necessary dependencies are installed for mounting an SMB share; for Debian based systems please run
sudo apt-get install cifs-util
Ensure you have a mount point for the network share e.g.,
/mnt/share/budgetby creating a new folder using
sudo mkdir -p /mnt/share/budget.
Prepare a credentials file by creating a file located at
/root/.smbcredentialswhich contains the following:
where myusername and mypassword are changed to a username and password accepted by the network share server.
Create a new entry in the file
/etc/fstabwith the following information:
//sharename/budget /mnt/share/budget cifs credentials=/root/.smbcredentials,sec=ntlm,iocharset=utf8 0 0
credentials=/root/.smbcredentials should point to the credentials file mentioned above.
Run the following command
sudo mount -aor restart the Linux server to mount the configured network share
The mapped network share should now be available at