Linux mount SMB share to specific Folder
Go to solution
Solved by RONOTHAN##,
Usually if you need to mount a NAS to a specific folder, you'll want it mounted every single time, in which case you should be using the fstab instead.
In order to do the fstab method, run the command:
sudo nano /etc/fstab
This will bring up a window that lists all the drive mounts that happen on boot. Add the following line to the bottom of the file:
//NAS_IP/Backups /Path/To/BackupDel cifs username=correctusername,password=correctpassword 0 0
Once done, make sure to test before rebooting. Run the following command, and if it doesn't give any errors you're good to go and will mount the NAS on boot.
sudo mount -a
If you want to do it temporarily though, the command should be
sudo mount //NASIP/Backups /Path/To/BackupDel -o username=correctusername

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now