How to use bind mounts in Linux.

Bind mounting is quite simple. Instead of mounting a block device into a particular path you are mounting one path into another path.

mount -o bind /home/andzia /ftp/andzia

You will now see this reflected when running the mount command:

mount | grep var
/home/andzia on /ftp/andzia type none (rw,bind)

If you want this to persist across reboots, you’ll just need to update your /etc/fstab with the bind mount as well.

/home/andzia /ftp/andzia none bind 0 0

Leave a Reply

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

*