Mounting a Network Drive (SMB) on Ubuntu

You can mount a shared folder on Windows to a Linux machine with smbclient:

sudo apt install smbclient

Assuming the documents folder is shared with Windows user james on the Windows machine at, it can be mounted on the filesFromWindows directory of user ubuntu’s home directory:

sudo mount -t cifs -o username=james // /home/ubuntu/filesFromWindows/

If you get an error saying “mount: /home/ubuntu/filesFromWindows/: cannot mount // read-only.”, you’ll also need the cifs-utils package:

sudo apt install cifs-utils