3 ms·
I've never actually seen or had the courage to attempt "rm -rf /". Does anyone know what would happen if it were run?
by smaili 11y ago
I've never actually seen or had the courage to attempt "rm -rf /". Does anyone know what would happen if it were run?
- TazeTSchnitzel 11y agoYou wipe your mounted disks.
- qb45 11y ago... and remote filesystems.
- floatboth 11y agoYou wouldn't be able to run any programs from the hard drive, and when you reboot, you'll end up with no operating system. Unless you're running FreeBSD (or Illumos) with ZFS and Boot Environments, in which case you'd just select a backup boot environment and continue working :-) Probably without your home directory though, as that is usually excluded from boot environments. But you can set them up however you want. But if you're running Linux (before this update) on a laptop with terrible piece of shit firmware, you'd end up with a brick. P.S. found a cool post about rm -rf / in my bookmarks: https://lambdaops.com/rm-rf-remains/ https://lambdaops.com/rm-rf-remains/ – you can recover a running rm'd Linux machine by using a running shell and /dev/tcp :D
- qb45 11y ago> P.S. found a cool post about rm -rf / in my bookmarks: https://lambdaops.com/rm-rf-remains/ https://lambdaops.com/rm-rf-remains/ – you can recover a running rm'd Linux machine by using a running shell and /dev/tcp :D Awesome. This dynamic loading of bash plugins is mad.
- dingo_bat 11y agoI wanna try it out but I'm not brave enough to do it directly in my OS. WHat would happen if I did it in Ubuntu inside a VM? What if VirtualBox has mounted some directory on my system to the guest? I'm afraid to try this too :/ I once tried 'format C:' on a Windows 10 laptop I didn't care about and I just got a boring error message.
- Symbiote 11y agoYou get an error along of you're sure. You should try rm --no-preserve-root -rf /