Rustmilian,
@Rustmilian@lemmy.world avatar
potentiallynotfelix,

To clarify - I only have one thing mounted at the time I run umount -a. Thanks for the helpful individuals who answered my question.

NegativeLookBehind,
@NegativeLookBehind@lemmy.world avatar

Using the -a option will unmount everything in /etc/mtab. You should usually be specific about what you’re unmounting. Check the umount man page for details about its options.

NegativeLookBehind,
@NegativeLookBehind@lemmy.world avatar

I notice it unmounts a lot of other things

Are you serious or

cbarrick,

Is it bad practice to use rm -rf / to delete my files, or should I specify the path explicitly?

I’ve always used rm -rf / to delete my files, but I noticed that it also deletes a lot of other things. Is this bad?

palordrolap,

In addition to other advice here: If you want to save on keystrokes, set yourself up a shell alias that's short but unlikely to be a valid command anywhere else.

I have one that's kind of the inverse of yours, called mntStorage (no prizes for guessing its purpose). It wasn't intentional, but mixing case like that is pretty rare in important commands too.

Max_P, (edited )
@Max_P@lemmy.max-p.me avatar

On my computer that’d unmount my home directory, my external storage, my scratch space and my backup storage, and my NAS.

It would also unmount /sys and /proc and /tmp and /run. Things can get weird fast without those, for example that’s where the Xorg/Wayland socket is located.

If all you have is home and root on the same partition I guess it’s not too bad because it’s guaranteed to be in use so it won’t let you, but still, I wouldn’t do that to save like 5 keystrokes in a terminal.

billbasher, (edited )

It shouldn’t unmount those system dirs unless you have a really weird setup or specify with —types.

From the man page:

-a, --all All of the filesystems described in /proc/self/mountinfo (or

in deprecated /etc/mtab) are unmounted, except the proc,

devfs, devpts, sysfs, rpc_pipefs and nfsd filesystems. This

list of the filesystems may be replaced by --types umount

option.

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

Max_P,
@Max_P@lemmy.max-p.me avatar

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.

SorteKanin,
@SorteKanin@feddit.dk avatar

In general it’s a bad idea to do something implicitly, unless you really know what you’re doing. That goes for umount -a as well as git add -a or rm -rf * and that sort of thing.

mox, (edited )

Yes, it’s generally a bad idea, unless you’re about to shut down your system and you enjoy extra work.

KISSmyOSFeddit,

Don’t get in the habit.
If at some point in the future, you’re working on a system someone else has set up, and which may be a production server, umount -a can fuck up a lot of things.

catloaf,

It depends on what those other things are.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.world
  • DreamBathrooms
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • JUstTest
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • megavids
  • lostlight
  • All magazines