Ok, let’s elaborate on this a bit. At least for me this is prone to cause confusion (I had to do a bit of research - read: look into MAN pages - to refresh what I had learned about the usage of root).
Side note:
sudo
used to be not officially available on SFOS, only as custom build from user repositories on OpenRepos. At some point Jolla has introduced an official build to the Jolla repos, it seems. A detail I had missed
-
The command
su
is short for supplement user. It let’s you switch to another user’s session. That includes non-root users.
When executed without any arguments, that user defaults to root. Your system will have to have a root password configured for this command to work by itself -
The command
sudo
is short for superuser do. It allows you to execute a specific command with elevated privileges while using your non-root username’s password for authorization.- running
sudo su
lets you switch to root while using your regular user’s password for authentication instead of a dedicated password for root itself. That would be pure vanilla root with no environment adjustments from user scripts taken into account - When provided with the flag
-i
(long form:--login
) any user specific scripts (i.e..bashrc
,.profile
) will be sourced bysudo
upon execution
- running
This in effect makes the reported behaviour not a bug but a feature (classic! )
One can either adjust script file names and command switches for the correct sourcing of all desired files or switch back to BASH as default shell.