I would like to store all the 'working' data on an USB drive. So I can unplug it and use it on another machine, having all the 'working' data ready.

I don't think it is a good idea to change the home directory permanently to the USB drive, since it may not be plugged in. What I'm looking for is a command I can enter in the shell, which will work for the current shell session.


as root:

mount --bind /media/usbdrive /home/you
  • You also need to set the ownership to the target user. – terdon Nov 3 '16 at 19:37
  • @terdon, could you explain how to do that? or link to some documentation? – flavio.donze Nov 30 '16 at 19:23
  • @flavio.donze in the simplest form, sudo chown -R flavio:flavio /media/usbdrive. That's assuming that /home/you (or /home/flavio or whatever) ios also owned by your user. – terdon Dec 1 '16 at 9:32
  • with the addition of terdon's input, it seems to work so far. – flavio.donze Dec 1 '16 at 11:52

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.