Forrest logo
back to the runuser tool

runuser:tldr:118f4

runuser: Run command as a different user and group.
$ runuser ${user} -g ${group} -c '${command}'
try on your machine

This command is used to run a specific command as a certain user and group. Here is the breakdown:

  • runuser: This is a command that allows you to run a command as a different user.
  • ${user}: This is a placeholder for the desired user you want to run the command as. You need to replace ${user} with the actual username.
  • -g ${group}: This specifies the group that the user will be a part of when running the command. The ${group} is a placeholder for the desired group name that needs to be replaced with the actual group name.
  • -c '${command}': This option specifies the command that you want to run. ${command} is a placeholder for the actual command that should be executed. The command should be enclosed within single quotes to ensure it is treated as a single argument.

In summary, this command allows you to run a specified command as a specific user and group.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the runuser tool