By now, it's possible you've stumbled across a file that seems like it's off-limits to you. That's a little weird, right? It's your computer - why can't you see everything?

It turns out that you can. You just need to assert some authority, which is where sudo comes in.

You'll often need to use sudo for changing system-wide configuration files, looking at things that have security implications, or installing new software.

We'll address each of those topics in more detail, but for now just remember that the formula is:

sudo [your command here]

If you're using sudo for the first time, or for the first time in a few minutes, you'll be prompted for your password.

sudo can get you into trouble

If you're thinking that the access restrictions on some files and actions must exist for a reason, you're right. Raspbian is configured by default to be a pretty wide-open system, with doing stuff taking higher priority than being really secure about stuff. Needing to use sudo should always be taken as a sign that you could break something.

On any system, always try to make sure you understand what a command is doing before you run it, or at least be pretty sure you trust the person or website telling you to run it.

obxcd

One great side effect of this tutorial is that now you will 'get' Unix nerd joke comics like this one from xkcd.com (a Mecca of unix nerd joke comments):

This guide was first published on Jan 13, 2015. It was last updated on Jan 13, 2015.

This page (Attaining Superpowers: sudo) was last updated on Jan 04, 2015.

Text editor powered by tinymce.