Mounting shares

From CT Wiki
Jump to navigation Jump to search

Rocky Linux

Before following the below instructions, ensure you have been added to the sudoers file or otherwise have root access.

Instructions Images
First, you want to update Rocky Linux using the Terminal before any share can be mounted. Open the Terminal and then run the next two commands in sequence.

Update Rocky Linux:
sudo yum update
sudo yum upgrade

CIFS Share Rocky Linux 1.png
Next, you want to create a new directory in the /mnt/ directory to serve as your mounting point for the Windows share.

Create the nikhef_share directory:
sudo mkdir /mnt/nikhef_share

CIFS Share Rocky Linux 2.png
Finally, you can use the mount command to mount the Windows share to the newly created nikhef_share directory.

Mount //ad.nikhef.nl/project on /mnt/nikhef_share:
sudo mount -t cifs -o username=<username> //ad.nikhef.nl/project /mnt/nikhef_share

If you want to mount a different folder, such as //ad.nikhef.nl/data or //ad.nikhef.nl/user/home/username, you can use the same command, except replace 'project' with your /path/to/folder of choice.

Keep in mind that mounted shares are not persistent. You have to repeat this step after every restart.

CIFS Share Rocky Linux 3.png
You can now use the file manager to access /mnt/nikhef_share. CIFS Share Rocky Linux 4.png


Ubuntu

Before following the below instructions, ensure you have been added to the sudoers file or otherwise have root access.

Instructions Images
First, you want to update Ubuntu and install cifs-utils using the Terminal before any share can be mounted. Open the Terminal and then run the next three commands in sequence.

Update Ubuntu:
sudo apt update
sudo apt upgrade

Install cifs-utils:
sudo apt install cifs-utils

Terminal Screenshot 1.png
Next, you want to create a new directory in the /mnt/ directory to serve as your mounting point for the Windows share.

Create the nikhef_share directory:
sudo mkdir /mnt/nikhef_share

Ubuntu Screenshot 2.png
Finally, you can use the mount command to mount the Windows share to the newly created nikhef_share directory.

Mount //ad.nikhef.nl/project on /mnt/nikhef_share:
sudo mount -t cifs -o username=<username> //ad.nikhef.nl/project /mnt/nikhef_share

If you want to mount a different folder, such as //ad.nikhef.nl/data or //ad.nikhef.nl/user/home/username, you can use the same command, except replace 'project' with your /path/to/folder of choice.

Keep in mind that mounted shares are not persistent. You have to repeat this step after every restart.

Ubuntu Screenshot 3.png
You can now use the file manager to access /mnt/nikhef_share. Ubuntu Screenshot 4.png