This guide shows how to block distracting sites in Ubuntu, and stop yourself from removing the blocks personally. This is helpful in preventing a momentary temptation from turning into an extended distraction. Only do this if you don't need daily root access. Most sudo commands will still work, you just wont be able to switch to root user. You'll be generating a new root password and making it hard to access.
0. Before starting, make sure you've set up a password for the root user on your machine. If you haven't already you can run sudo passwd root
to do so. If you want you can go ahead and use the random password in step 7.
su