#Is it bad practice to run umount -a instead of specifying the directory to unmount? I’ve always run umount -a to unmount my drive but i notice it unmounts a lot of other things. Is this bad?
#Is it bad practice to run umount -a instead of specifying the directory to unmount? I’ve always run umount -a to unmount my drive but i notice it unmounts a lot of other things. Is this bad?
It shouldn’t unmount those system dirs unless you have a really weird setup or specify with —types.
From the man page:
https://www.man7.org/linux/man-pages/man8/umount.8.html
If you are using a system with snap like Ubuntu, it will unmount those since they are technically mounts. It will fail if an app is using the snap but subsequent opens of closed snaps will fail.
Edit: Formatting
Fair enough, TIL. I’ve used
mount -a
a fair bit, but unmounting the world is not something that crossed my mind to even attempt. It would still unmount a good dozen ZFS datasets for me.Good example with the Snaps! Corrected my post.