The mount --bind command is used to create a bind mount, which is an alternate view of a directory tree. A bind mount takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data. For example, after issuing the command:
mount --bind /some/where /else/where
the directories /some/where and /else/where have the same content, which is the content of /some/where. A bind mount can be useful for accessing hidden files, creating chroot environments, or changing the permissions or ownership of files.
The other options are not correct because:
B. It mounts all available filesystems to the current directory: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a single directory tree. To mount all available filesystems to the current directory, one would need to use the mount -a command with the -t option and specify the current directory as the target.
C. It mounts all user mountable filesystems to the user’s home directory: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a single directory tree. To mount all user mountable filesystems to the user’s home directory, one would need to use the mount -a command with the -t option and specify the user’s home directory as the target. However, this is not a common or recommended practice, as it may cause conflicts or errors with the existing files and directories in the user’s home directory.
D. It mounts all file systems listed in /etc/fstab which have the option userbind set: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a single directory tree. To mount all file systems listed in /etc/fstab which have the option userbind set, one would need to use the mount -a command with the -O option and specify userbind as the option. However, this is not a standard or supported option for the mount command or the /etc/fstab file, and it may not work as expected.
E. It permanently mounts a regular file to a directory: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a directory tree, not a regular file. To mount a regular file to a directory, one would need to use the mount command with the -o loop option and specify the file and the directory as the source and the target. However, this is only possible for files that contain a valid filesystem image, such as an ISO file or a disk image. A bind mount is not permanent, and it can be unmounted with the umount command.
References:
Understanding Bind Mounts | Baeldung on Linux
What is a bind mount? - Unix & Linux Stack Exchange
mount(8) - Linux manual page