Linux Fundamentals

i can't find out answer for "Which option needs to be set to execute a command as a different user using the "su" command? (long version of the option)"
even i have tried -l, --login and many more but don't reach there.


  • I am not sure what the answer to this is, as I haven't really looked at the academy stuff.

    However, to switch to a different user, you'd normally use:
    su username

    The -l / --login is focused on how the shell is built.

    If you want to run a command as a different user, then it is slightly different. You aren't switching, you just want a command to run. Re-read the man page.



    Happy to help people but PLEASE explain your problem in as much detail as possible! If you say vague things like "It's not working", I cant help. This isn't Twitter so my DMs are always open.

  • I just did this. What I did was run the "man su" to search for command.

    Its asking for -c or --command

Sign In to comment.