‘sudo’ controls access rights, so it’s effectively like Windows admin rights. People typically wouldn’t be allowed to use sudo unless they own the system or are some kind of system administrator (like in a workplace).
The ‘rm’ is the remove function, or deleting files or folders.
‘-rf’ are two options you can specify with the ‘rm’ to . The ‘-r’ part means recursive, and effectively conforms to the ‘rm’ you do in fact want to delete a directory (folder). Normally rm would not, and rmdir I think only works on empty directories. The ‘-f’ option forces removal of all items without any prompts for confirmation for individual items found for removal.
Then the ‘/*’ is the file and or directory path you want to remove. In this case it’s the top of the system. The entire statement is essentially a joke about a full delete of your computer.
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.
What does it actually do?
These are unix/linux terminal actions.
‘sudo’ controls access rights, so it’s effectively like Windows admin rights. People typically wouldn’t be allowed to use sudo unless they own the system or are some kind of system administrator (like in a workplace).
The ‘rm’ is the remove function, or deleting files or folders.
‘-rf’ are two options you can specify with the ‘rm’ to . The ‘-r’ part means recursive, and effectively conforms to the ‘rm’ you do in fact want to delete a directory (folder). Normally rm would not, and rmdir I think only works on empty directories. The ‘-f’ option forces removal of all items without any prompts for confirmation for individual items found for removal.
Then the ‘/*’ is the file and or directory path you want to remove. In this case it’s the top of the system. The entire statement is essentially a joke about a full delete of your computer.
So kinda like the delete System32 joke but more nuclear?
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.If it were on an old installation of linux, it would delete everything on the file system, from every disk attached.
Modern Linux systems require an additional flag to explicitly stay that you want to nuke your system.
Are you sure?
rm -rf --no-preserve-root /
Looks like it started appearing in various flavors of Unix and Linux around 2005.
but here they use /* as the target, so they are not telling rm to delete the root directory.
@buddascrayon @gramie
https://forums.gentoo.org/viewtopic-p-7943540.html
Eats itself inside out