To install sudo on a debian or ubuntu system with a bash shell (this is likely you if you're reading this), change to the root user thus:
$ su -
Now that you have a "#" shell, all commands you run will be privileged. You don't want this. Trust me. Instead, you want to run most commands as your usual user and only use privileged commands when you have no other choice. To do this, I recommend installing sudo.
# apt-get install sudo
When this program finishes installing, and you are again presented with a "#" shell, do the last thing you will ever do from that shell. In the following example, "<your username>" represents the username of your non-privileged user.
# echo '<your username> ALL=(ALL) ALL' >> /etc/sudoers
Go to the bottom of the file and enter the following:
<your username> ALL=(ALL) ALL
Save and quit.
If you substituted <your username> correctly, you will now be able to take advantage of sudo.
Log out of your root shell. Anything that you would normally run a root shell to execute, now execute by appending it to "sudo ".