This time I have a problem for running command in some user After using su many times. I saw my boss using "-" before username!!!!! Stupid Me!!! Ok, Enough for the history. Now this is the command:
$ su -, -l, --login "username"
If you want to execute commands
$ su -, -l, --login "username" -c, --command "commands" // I recommend you to use double quotes (") for sometimes we want to use arguments
for Examples
$ su - Nata-Oh , $ su -l Nata-Oh OR $ su --login Nata-Oh
$ su - Nata-Oh -c "ls -la" OR $ su - Nata-Oh --command ls
Actually we can do with sudo for Example:
sudo -l Nata-Oh ls