MX on Linux: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
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 "~".
 
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'').
The initial "sudo" part of many commands gives us super-user (root) rights when executing the instruction that follows.
 
: 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.
If we are working away from the folder(s) owned by the default user, we can consider whether we want to change the ownership of these parts of the file system (how to do this for a MX installation is explained later) so that we can access the files with our default user without using "sudo" for file/folder commands.
 
: 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.
In some limited cases, it might make sense to just change "read" rights,so that the default user can read a file/folder, but other actions are not possible without using "sudo" prefix. This limits our ability to accidentally delete files that other processes need.
 
: '''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.
 
===apt===
5,838

edits

Navigation menu