Share a folder in Windows 10 to Ubuntu

18th October 2020 posted in Ubuntu





sudo apt-get install -y cifs-utils
sudo mount.cifs //192.168.1.180/shared_www /var/www/html/local_mount_folder -o -user=donnie

donnie being the Ubuntu username, the IP address above is the Windows PC IP

For permanent mount on boot, add Windows credentials to this filename /home/username/.smb

sudo nano /home/username.smb
user=Donnie
password=Brasco

Now edit fstab
sudo nano /etc/fstab
//Windows_IP/Windows_Folder /var/www/html/local_mount_folder cifs uid=0,credentials=/home/username/.smb,iocharset=utf8,noperm 0 0
//192.168.1.180/shared_www /var/www/html/shared_www cifs uid=0,credentials=/home/username/.smb,iocharset=utf8,noperm 0 0