Creating a mount point if it does not exist

When using the mount utility, if you specify a directory that does not exist, that is considered an error. Is there any option I can use so that mount points get automatically created if they don't already exist?


Solution 1:

try this:

if you want to create a Mount Point called DISK1, then type the following command in the terminal :

sudo mkdir /media/DISK1

Solution 2:

No, the bare mount utility do not offer such an option.

It is done when mounting from a file manager like Nautilus, though.