Linux CLI - Users and Groups
You want to run a script as user
deploy without fully switching to their environment. Which command is best to use?deploy without fully switching to their environment. Which command is best to use?su username -c 'command' runs the command as that user without opening a full shell.su -c deploy ./script.sh wrong flag order, su - deploy ./script.sh starts login shell, su deploy ./script.sh starts non-login shell. Only su deploy -c './script.sh' runs directly.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions