I know dd is supposed to be a power user tool but still, it doesn't make sense to me that you can basically screw your whole computer by hitting the wrong key.
Consider the kinds of power tools used in civil construction and what you can screw up by doing one little thing wrong. Could those things be made more preventable? Probably, but the counter balance is to what extent making accidents more preventable makes the tool less useful and/or more awkward.
Driving automobiles is a similar analogy with potentially much more dire consequences, and yet human beings manage to do this all the time (much too much, in fact). Of course it would be safer if they did it slower, but collectively we have decide what risks are worth taking. Similarly, the computer would be safer if
dd did not exist, but since its usefulness is considered to outweigh its risks, it does.
Why ins't there a security measure that prevent dd from writing on the disk it gets the command from ?
In fact there is, since by default device files (such as
/dev/sda1) need superuser privileges to write to. So unless you are working as
root or via
sudo, you actually cannot screw your entire computer with one button using
Which brings us to why there are all the caveats about running commands with superuser privileges. These warnings are very prevalent and I think it would be hard to end up operating a *nix system without having seen them, sort of like getting into a construction zone without noticing the HARD HAT AREA signs.
If you don't have a reason to be in a construction zone, leave. If you do, take appropriate safety precautions. The world can be a dangerous place and some places more dangerous than others. Don't act without thinking. A degree of safety which ensures nothing bad can happen -- so you don't have to bother thinking -- implies you can't do much either. Sometimes that's desirable, sometimes it is not.