After recently reading the article "8 Deadly Commands You Should Never Run on Linux", I've planned on somehow blocking/preventing/changing certain commands. I'm not worried that someone else will run destructive commands on my PC. I'm worried that I may be the culprit behind the accident.
I am worried about the commands listed below.
wget http://example.com/something -O – | sh –
- I've run this line when I was copying & pasting commands from a
guide. Had I noticed
sh -, I'd have only run that after checking out the archive contents.
rm -rf /
- I accidentally hit the 'Enter' key a lot...
I want to prevent making these mistakes in the future. Is there a command/configuration file that can ensure I don't commit these mistakes? I do not want to be able to run the commands above even with sudo/root permissions. It it okay if the solution can be reversed.
Resources that will help me learn more about Ubuntu (excluding common Ubuntu Wiki/Help/etc. links) would be greatly appreciated!
Data loss isn't my main concern. I want to make the terminal a little safer for myself ('newb-proofed' if you will). This would be helpful to me as I've got lot's to learn. I've started school again, & I can't be spending too much of my time resolving problems/error (as interesting as it is).
Edit:
Is it possible to require specific commands to ask for confirmation? If I wanted to set specific commands to require a special password, can it be done?