Linux Run Command as another user
To run command as another user on Linux, you can use
su USER_NAME_HERE -s /bin/bash -c COMMAND_HERE
Or
sudo -u USER_NAME_HERE COMMAND_HERE
Or
runuser -l USER_NAME_HERE -c 'COMMAND_HERE'
See sudo
To run command as another user on Linux, you can use
su USER_NAME_HERE -s /bin/bash -c COMMAND_HERE
Or
sudo -u USER_NAME_HERE COMMAND_HERE
Or
runuser -l USER_NAME_HERE -c 'COMMAND_HERE'
See sudo