←back to thread

279 points the_why_of_y | 1 comments | | HN request time: 1.121s | source
Show context
smaili ◴[] No.11154331[source]
I've never actually seen or had the courage to attempt "rm -rf /". Does anyone know what would happen if it were run?
replies(3): >>11154530 #>>11154781 #>>11154818 #
floatboth ◴[] No.11154781[source]
You 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/ – you can recover a running rm'd Linux machine by using a running shell and /dev/tcp :D

replies(2): >>11155184 #>>11158428 #
1. qb45 ◴[] No.11155184[source]
> P.S. found a cool post about rm -rf / in my bookmarks: 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.