Sharing files

I wanted to create a shared drive in the same way that you can map a network drive in Windows, but on Debian\Linux and on a Mac

Debian\Linux

I used the instructions on this page:

https://www.codedonut.com/raspberry-pi/mount-network-share-raspberry-pi/

Before using them I opened Terminal and entered ‘sudo apt install cifs-utils’ to install the cifs file sharing service (this was already installed on the Raspberry Pi 4 but not on Debian).

I created a folder called ‘network’ in the Debian file system under my user and then a folder with the name of the computer that had the shared folder. Then I created a folder inside that one with the name of the share. I felt that this would mean that the structure would make sense in the future.

So the ‘mapped drive’ was eventually at ‘/home/[username]/network/[remote computer name]/[share name]’

One other thing to note is that the password I was using ended with two semi-colons ‘;;’ and when I ran the ‘mount’ command (as described on the webpage) there was an error – so I put single quotes around the password and this worked.

But when I added the details to the ‘fstab’ file (so that the network shares would be available after a restart) I did not need to add single quotes around the password.

Mac

I used the instructions on this page: https://www.wikihow.com/Connect-to-a-Server-on-a-Mac in the section – ‘Method 2: Browsing in Finder’

At the point where I had to enter the ‘Server Address’ I used ‘\\[computer name]\[shared name]’ in the same way that I do when using the ‘Map Network Drive’ function in Windows.

I ticked the ‘Remember this password in my keychain’ option and I didn’t need to enter the username or password again after restarting the computer.

Leave a comment

Your email address will not be published. Required fields are marked *