Reply To: Using the non-gui console to “safely” remove and replace pkgs?

Forum › Forums › New users › New Users and General Questions › Using the non-gui console to “safely” remove and replace pkgs? › Reply To: Using the non-gui console to “safely” remove and replace pkgs?

#190813
Brian Masinick
Moderator

    sudo apt-cache show …

    [Well meant] Nitpick: unnecessary use of ‘sudo’.

    Hi sybok,

    Thanks, I thought I always had to use sudo to get apt to “do” anything. I guess that doesn’t apply to apt “showing” something <g>.

    Thanks for helpful nitpick…

    Here is how to know the difference: IF you can either read, or read and execute a program, you can run it without sudo privileges. When you want to WRITE contents in an area other than your own, you MUST elevate your privilege, either to the user where the account information resides, or as the admin. When it’s a system program, clearly admin, a.k.a. root privileges, are necessary when you update software, because updating software means you are writing privileged contents to an area owned by root; that is the reason we frequently require privs, but just to read a root area usually doesn’t require privs.

    EXCEPTION to that RULE: when a sticky bit (anything that changes a mask from 000-777 to 1444-4755 (the inclusion of the octal 1000th bit). The two sticky bits I personally have heard of are 1 and 4 in that field; others could potentially be added too; not sure what their purpose would be though. STICKY bit stuff ALWAYS requires root access, so sudo or sudo su is necessary in those cases for read, write or execute privs.

    --
    Brian Masinick
    Alternate "Search B":
    This search page