MX on Linux: Difference between revisions

107 bytes added ,  03:57, 26 July 2021
m
→‎sudo: change formatting
m (→‎sudo: change formatting)
Line 101: Line 101:
===sudo===
===sudo===


By default, a Linux user will log in as a default user with limited rights. For example, on the Raspberry Pi Operating System, there is a single default user, initially called "Pi", with their home folder that can be referenced as "~".
By default, a Linux user will log in as a default user with limited rights.  


In the '''apt''' context here, '''sudo''' is needed for any action involving writing (such as '''install''', ''full-upgrade'', '''update''', ''autoremove''), but not for actions that just read (such as '''search''', ''show'').
For example, the Raspberry Pi Operating System has a single default user "Pi", with their home folder that can be referenced as "~".
 
In the '''apt''' context here, those limited rights allow use of actions that just read (such as '''search''', ''show'').
 
However, for any action involving writing (such as '''install''', ''full-upgrade'', '''update''', ''autoremove''), the package manager needs additional rights, and we prefix the "apt" with '''sudo'''.


: Elsewhere on this page you might notice [[#Running any MX executable with a terminal session left open|'''cd''']] can move round the file structure (without a "sudo"), but "sudo" is used with [[# Installing/Configuring the MX service and the -service parameter|'''cp''']] as that writes a file.
: Elsewhere on this page you might notice [[#Running any MX executable with a terminal session left open|'''cd''']] can move round the file structure (without a "sudo"), but "sudo" is used with [[# Installing/Configuring the MX service and the -service parameter|'''cp''']] as that writes a file.


: Novice readers should exercise caution, because changing ownership, adding write rights, using "sudo", and even using "-R" or "-y" flags, can all make it very easy to inadvertently do the wrong action, even perhaps delete vital folders/files.   
Novice readers should exercise caution, because using "sudo", changing folder/file ownership, adding write rights, and even using "-R" or "-y" flags, can all make it very easy to inadvertently do the wrong action, even perhaps delete vital folders/files.   


: '''For technical readers only''', "sudo" is further explained later [[#su_and_sudo]]) as giving super-user (root) rights when executing the instruction that follows for actions on files that are not in the current user's ownership or for which we don't have the necessary (read, write, execute) permissions.
: '''For technical readers only''', "sudo" is further explained later [[#su_and_sudo]]). Briefly,  "sudo" gives super-user (root) rights when executing the instruction that follows for actions on files that are either not in the current user's ownership, or for which the current user lacks necessary (read, write, execute) permissions.


===apt===
===apt===
5,838

edits