How to Mount SMB Share on Ubuntu 16.04.6 LTS for Plex

If you connect your media to Plex from your NAS, this command might be useful. It mounts the share with full read/write permissions. This is nice for when you want to delete media from inisde the Plex interface (from your couch for instance).

sudo mount -t cifs //192.168.1.123/Multimedia/Movies /mnt/Movies -o user=xxxxx,pass=xxxxx,cache=loose,noperm,dir_mode=0777,file_mode=0777

You'll want to replace the example IP and share path (//192.168.1.123/Multimedia/Movies) with the actual IP and share path of your NAS. Pop in your username and password (replace the xxxxx's).


If you want to get fancy, you can create a script instead of having to Google this each time or search through your previous commands. It would look something like this:

#!/bin/sh
#Script to mount SMB shares on Ubuntu 16.04.6
#Jared Siegel. https://jrdsgl.com

sudo mount -t  cifs //192.168.1.123/Multimedia/Movies /mnt/Movies -o user=xxxxx,pass=xxxxx,cache=loose,noperm,dir_mode=0777,file_mode=0777

sudo mount -t  cifs //192.168.1.123/Multimedia/TV /mnt/TV -o user=xxxxx,pass=xxxxx,cache=loose,noperm,dir_mode=0777,file_mode=0777
Example script

Save the file as mount.sh and run sudo chmod 775 mount.sh to change the permissions so you can run it. Then run .\mount.sh. The drive should be mounted and be browsable.  👍