Skip to main content

Map Network Drive in Ubuntu

# Guide to mounting a network drive on Ubuntu From Windows Server:

# Install CIFS

CIFS:

sudo apt update
sudo apt install cifs-utils


sudo mkdir /mnt/localcloud

sudo nano /etc/smbcredentials

# Put this in the file you create

username=windows_username
password=windows_password
  
#

Secure the Permissions

sudo chmod 600 /etc/smbcredentials
  
#Change

Change the /etc/fstab file and add the network location to the bottom of it:

  
sudo nano /etc/fstab
//192.168.1.121/localcloud /mnt/localcloud cifs credentials=/etc/smbcredentials,uid=1000,gid=1000,vers=3.0 0 0

 
#Your uid=1000 and gid=1000 with the user ID and group ID of the user you want to own the # files after mounting (use id -u zippyb to find your UID, and id -g zippyb to find #your GID.

sudo id -u zippyb
sudo id -g zippyb

# Manually Mount the Drive

sudo mount -t cifs -o credentials=/etc/smbcredentials,uid=1000,gid=1000,vers=3.0 //192.168.1.121/localcloud /mnt/localcloud