In a UNIX machine, what is the difference between
Is there even a difference?
I know that
su - is the standard.
Well the su - "Username" or su -1 "username" or su --login "username" (all the same) will give you a login screen, and change paths, home directory, etc..
The su "username" command only chances user, and not home directories (this does not apply to "su no username" because you login has Root / SuperUser, and you will given the root's default environment, including path to executable file changes. You will also land into the root's home directory.) so to answer your question to make sure they are in the right place with the right user?
Suppose you are given the following template, where you want to log in as as a new user say john: [sarah@vine ~]$su john Password: [john@vine sarah]$ [john@vine sarah]$ls ls:cannot open directory .:Permission denied
From above, user john kept the environment from user sarah's original login session, the current working directory and the path to executable files also remain the same. As a result if user john tries to list the working directory, he gets an error message denying him permission. However, if su - or su -l or su --login is executed as below, john will be given his own default login environment, that includes path executable files, and he also lands into his own home directory.
[sarah@vine ~]$su - john Password: [john@vine ~]$ [john@vine ~]$ls bin lost