# Map Network Drive in Ubuntu

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

Install CIFS:

```bash
sudo apt update
sudo apt install cifs-utils
```

```bash
sudo mkdir /mnt/localcloud
```

```bash
sudo nano /etc/smbcredentials
```

Put this in the file you create

```bash
username=windows_username
password=windows_password
```

Secure the Permissions

```bash
sudo chmod 600 /etc/smbcredentials
```

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

```bash
sudo nano /etc/fstab
```

Add the following line to the file:

```bash
//192.168.1.121/localcloud /mnt/localcloud cifs credentials=/etc/smbcredentials,uid=1000,gid=1000,vers=3.0 0 0
```

Make the Directory:

```bash
sudo mkdir /mnt/localcloud
```

Mount the drive:

```bash
sudo mount -a
```

 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.

```bash
sudo id -u zippyb
sudo id -g zippyb
```

check to see if the network drive is mounted:

```bash
ls -la /mnt/localcloud
```

Output:

[![2024-06-07 20_47_22-zippyb@pivpn_ ~.png](https://docs.natenetworks.com/uploads/images/gallery/2024-06/scaled-1680-/2024-06-07-20-47-22-zippyb-at-pivpn.png)](https://docs.natenetworks.com/uploads/images/gallery/2024-06/2024-06-07-20-47-22-zippyb-at-pivpn.png)

Optional:

Manually Mount the Drive:

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