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.

I just did this. What I did was run the “man su” to search for command.

Its asking for -c or --command

Type your comment> @Laughingg said:

I just did this. What I did was run the “man su” to search for command.

Its asking for -c or --command
May be its --command

@HAKSEC403 said:

Type your comment> @Laughingg said:

I just did this. What I did was run the “man su” to search for command.

Its asking for -c or --command
May be its --command

Either should work.