@wolf@mastodon.social The sudo command executes any command you give it as if you were another user, root by default. The -u option specifies another user besides root to temporarily run as. The -i option gives you a new shell instead of running a command.
So, "sudo -u mastodon -i" would make you become the mastodon user and log you into a shell (one way to get a shell as a /dev/false shelled user). You can "exit" back to your previous shell when done.