• kewjo@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      1 day ago

      in Windows your separate each drive by a letter like C:, D:, etc, however on Linux your drives are mounted as part of your folder structure. the top level is called root which would be / you can then mount each disc directly as a folder under root, so for example /home could be a separate hard drive but it’s still mounted under root, note the starting slash. This means the command deletes any and all files+directories under root, this can include mounted USB, mounted network drives and anything mounted to your root. your basically nuking all the files you can access when you’re logged in as admin.

      • Buddahriffic@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        Also windows locks files that are in use, so attempting to delete system32 would (probably, I’ve never tried it) give some errors because it’s using a bunch of those files already and would leave those files intact even if you’re very determined to get rid of them. This is why you need to reboot to apply many updates because even the updater can’t get around that restriction.

        It’s handled differently on Linux. I’m not 100% on the specifics of the implementation but it either loads files in use entirely into RAM or simply removes the reference to the file when deleted (or makes a new file and points the reference there if you’re replacing the file). That means anything that is currently using the file can continue to do so after a delete/overwrite, so the OS doesn’t prevent it from happening. This is why you can run any updates without restarting on Linux (though you do need to restart to get the system to use some updates, if they update critical components that can’t be restarted independently of the rest of the system, like the kernel).

        If you want to nuke your whole os install drive on windows, you need to boot into a different OS instance (which is what the repair partition is, just a barebones windows install that can access files on the main install without the locking). But Linux can do it from within the same instance.