`su -`와 `su --login`의 차이점은 무엇입니까?

`su -`와 `su --login`의 차이점은 무엇입니까?

에서su님의 매뉴얼 페이지:

For  backward  compatibility, su defaults to not change the current directory
and to only set the environment variables HOME and SHELL (plus USER and LOGNAME
if the target user is not root).  It is recommended to always use the 
--login option (instead of  its  shortcut -) to avoid side effects caused
by mixing environments.

...

-, -l, --login
    Start the shell as a login shell with an environment similar to a real login:

        o      clears all the environment variables except TERM

        o      initializes the environment variables HOME, SHELL, USER, LOGNAME, and PATH

        o      changes to the target user's home directory

        o      sets argv[0] of the shell to '-' in order to make the shell a login shell

-and 사이에 차이가 있는지 --login(또는 그냥 -l) 말하기는 어렵습니다. 즉, 매뉴얼 페이지에는 "바로 가기 대신 -"이라고 나와 있지만 이러한 모든 옵션은 함께 그룹화되어 있으며 차이점이 전혀 존재하더라도 이에 대한 설명을 볼 수 없습니다.

UPD질문을 확인했는데,내 문제를 해결해줘. 문제는 기본적으로 su과 의 차이점에 관한 것입니다 su -. 그리고 su -와 의 차이점에 대해 묻고 있습니다 su --login. 아니요, 전혀 해결되지 않습니다.

답변1

데비안의 수동 입력이 더 계몽적인 것 같습니다:

   -, -l, --login
       Provide an environment similar to what the user would expect had the user logged
       in directly.

       When - is used, it must be specified before any username. For portability it is
       recommended to use it as last option, before any username. The other forms (-l
       and --login) do not have this restriction.

답변2

차이점은 없습니다. 마치 달리는 것과 같습니다.

echo bob | grep -v bob
echo bob | grep --invert-match bob

그냥 줄임말...

관련 정보