Mount Windows Share On Boot in Ubuntu 20.04

These steps assume you are root or using sudo.

Install cifs-utils

apt install install cifs-utils

Save your credentials in /root

Create /root/.smbcredentials with the following contents …


Change username and password to your username and password.

Add fstab entry to mount on boot

Edit /etc/fstab and add the following line to the end.

// /mnt/clyde cifs vers=3.0,credentials=/root/.smbcredentials should be changed to your host and software should be changed to your share. /mnt/clyde is the location where the remote share is mounted. This folder must already be created.

Make sure networking is started before mounting

systemctl enable systemd-networkd-wait-online