runuser's Examples

runuser runs a command as another user, similar to su.

sudo runuser -u username command

The runuser command is used to run commands as a different user, like sudo but specifically designed for running commands as another user without a password prompt.

runuser -l username -c 'command_to_run'

Runs a command as another user (without password prompt).

runuser -l john -c 'whoami'

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us