HOME      Other material for programmers   Pi? Arduino? Other?
(Parent page for this and other small getting started with Raspberry Pi tutorials)

I have notes for translators, if you would add a translation.


The "sudo" command
for Raspberry Pi and many other Linux systems

filename: pt0FirstSudo.htm

After a day or two of using a Raspberry Pi, or any other Linux system, you will be using "sudo" without thinking. For those in their first day or two, here's what it is about...

(Forgive a harking back to my dark past... if you too come from Windows, it is a bit like running things as an admin user.)

Linux has a wonderful... really, it is wonderful, though it may take you a while to get to love it... system of permissions.

Whenever you are doing anything, you are doing it as a specific user, who may or may not belong to one, or many, groups.

And if you try to do something to a file or directory, that objects's "attributes", or "permissions" will determine if you will be allowed to do it. This is one of the cornerstones of the security which is built into Linux.

Permissions are to...

... something. (Many things that seem like "built in" commands actually entail executing the code in a file.

A given file will or will not, depending on it's attributes, allow it's owner to read, write or execute it.

The file not only has an owner, but it is also an asset of a group. Members of that group may be able to read, write or execute it. (The settings for group members who are not also owners of the file are separate from the settings for the file's owner.)

People with sufficient authority can change the permissions for owners and members of a file's group. And they can explicitly state the permissions for people who are neither owners nor members of a file's group.

I will try to explain it all one day... but in the meantime, for the keen, there are many explanations out there already. I found the user etc permissions explanation by www.linode.com more novice friendly than some. The guide by Rackspace may also be of interest.

Sudo!

But! I digress! This page is meant to be a quick (!) explanation of sudo

Some users do not have the permissions necessary to do some things. (The default user, "pi", is actually quite powerful... a worrying fact, to some.)

If you try to use a command, or access a file that you don't have permission to use or access, the OS will prevent you from doing that.

But! If you are using it in the CLI, and you prefix your request with "sudo", and you are a member of the group "sudo", then you will "do" the command as a "Super User"!

Now... that might make it sound as if Linux's stable door is hopelessly jammed open. However, remember: Not all users are members of the group "sudo". AND it is possible to set things up so that when someone tries to use "sudo" to temporarily become a "super user", he or she will have to enter the password assigned to protect sudo-grade commands from being executed by anyone who can type "sudo".

So, whew, while the "sudo" command does make it possible for people to do powerful things, it doesn't destroy Linux's good security... unless people with permission to use sudo "unlock" too many things which shouldn't be widely available.

Hope that helped?

I hope that was helpful. Getting started is always so tedious. This page was just "a sidebar" off of my main "Getting started with Raspberry Pi" page. Feel free to contact me (see below) with comments, suggestions, questions... save the next reader being confused by something? Please cite this page's URI, if you do: qSUPPLY.




Footer

Please remember that this material is copyright. (TK Boyd, 2018) There are further notes in this page's parent page.




   Search this site or the web      powered by FreeFind

Site search Web search
Site Map    What's New    Search

The search engine is not intelligent. It merely seeks the words you specify. It will not do anything sensible with "What does the 'could not compile' error mean?" It will just return references to pages with "what", "does", "could", "not".... etc.

This page is a "sidebar" to my main discussion of Getting Started with the extraordinary Raspberry Pi.




To email this page's editor, Tom Boyd.... Editor's email address. Suggestions welcome!



Valid HTML 4.01 Transitional Page WILL BE tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org. Mostly passes. There were two "unknown attributes" in Google+ button code. Sigh.

Why does this page cause a script to run? Because of the Google panels, the code for the search button, etc. Why do I mention scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....