0

On the GUI, we can click on the File > Devices > HDD-Name to automatically mount the disks to /media/.

I could mount them one by one manually, i.e. https://superuser.com/questions/467170/how-do-i-mount-internal-hdds-in-ubuntu-via-the-command-line

But is there a way to do the same automatically on the command line?

Also, how can these mounted drive persists after I restart the machine or across users?. E.g. if the way to do it automatically is a single command, I can put it in .bashrc to mount them automatically whenever I log on to the user.

2
  • Put mount command into /etc/bash.bashrc and mount in a shared directory between user to let all user to access that partition.
    – Danibix
    Apr 5 '16 at 8:52
  • 2
    /etc/fstab is for mounting devices permanently
    – EdiD
    Apr 5 '16 at 9:01
2

To mount a device at boot and have it visible in terminal you need to edit /etc/fstab

You can find explanation on how to edit and examples at this link

https://help.ubuntu.com/community/Fstab

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.