You should see a new directory Correspondence shown in blue. Enter mkdir Correspondence, then enter ls to view the contents of your new directory. Start by creating a directory called correspondence. So let’s create some directories you can use to store files. If you type ls for a listing of your Documents directory, it will most likely indicate that there is nothing there. Your prompt will change to /Documents $ to indicate you are now in the Documents directory. To move into your Documents directory, enter cd Documents (change directory). Now, let’s see how you might want to organize your Documents directory. Once logged in you’re ready to begin exploring. ls -R – provides a recursive directory listing.ls -lh – lists with the long format, and includes the readable file size.ls -la – lists with the long format including hidden files.ls -l – lists with the long format, showing permissions.ls -a – lists all files including hidden files starting with “.”.That's when you know, you have the right permissions (confirm with ls -l /mnt/volume if you want). So, effectively, you should be able to do (to find your_username and your_groupname, use id) Sudo chown your_username:your_groupname /mnt/volume Or change ownership to your user and then set correct permissions, e.g.
If you want to be able to access it as standard user, you either need to allow it in full for all users, e.g.
As root (you're using sudo here), you will always have access to /mnt and underlying folders. It creates a folder in /, not in /mnt/volume.ĮDIT: But, the whole "Step 4. To unmount the drive, simply run the command:Īs long as you’re not currently accessing the drive, it should unmount successfully. You can now reboot your Raspbery Pi, and your Hard Drive will automatically mount! We need to add the following line to have our hard drive mount at boot! This will open up the file in nano text editor: If you want your Hard Drive to mount from boot, we need to set this up! Great! So we can read and write to our hardrive! To test this, let’s try to create a folder. This will change your permissions and allow you to access the drive. The folder “/mnt” is the standard location for mounting permanent media, but you can always create your own folder if required using the “mkdir” command.Īs our drive is formatted in NTFS, we might need to change the /mnt drive permissions in order to enable proper access. Now we know where our drive is, we need to mount it: Reveals that our drive is located at /dev/sda1 We now need to check the boot name of our Seagate’s partition.
This reveals that we currently have our “Seagate Expansion Drive” attached. If you want to check for the current storage devices attached to your Pi, simply run the command:
This is a short guide on how to connect an External Hard Drive to the Raspberry Pi! Most external Hard Drives are quite juicy and will require a USB Hub to run in a stable manner, so please do check this before trying to install your drive!įirst step is to plug it in, and then switch on your Pi! It should boot up as normal, so go ahead and log in to Raspian as usual. If you are configuring ownCloud's data directory on your NAS drive, it should be having a 770 permission for sudo usermod -a -G pi www-data Alternative 2 (Optional, required if using as data storage for owncloud) Take a backup of current fstab and then edit sudo cp /etc/fstab /etc/fstab.backupĪdd the mount information in the fstab file (replace UUID with your own): Now, we will configure RasPi to do this after every reboot: Mount the USB Drive and then check if it is accessible at /mnt/volume Get the uid, gid for pi user and group with id command (usually 1000) Note down the value of the UUID -> 0AC4D607C4D5F543 You will see something like the following: Log on pi using ssh terminal and execute: If you are using a NTFS formatted drive, install the following Plug in your USB HDD / Drive to Raspberry Pi
These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons. How to setup mount / auto-mount USB Hard Drive on Raspberry Piįollow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.