Quick Linux Tip #14:
Try: sudo mount --bind /var/www/site /home/linuxteck/website
Info: Bind mounts make the same content visible at multiple paths. No copying, no symlinks. Both paths refer to the same underlying files.
Examples:
- $ sudo mount --bind /source /destination
- $ sudo mount --bind -o ro /etc /backup/etc_ro # Read-only bind
- $ sudo umount /home/linuxteck/website
Note: Persist by adding to /etc/fstab: /var/www/site /home/linuxteck/website none bind 0 0. Used heavily in containers and chroots.
Leave a Reply