Linux CLI - Users and Groups
What will be the output of the following commands?
su - alice -c 'echo $USER'
su - alice -c 'echo $USER'
su -c$USER expands to alice inside that shell.$USER is passed literally to the new shell, which expands it to alice.su -c runs command as user, so $USER reflects that user [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions