`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

-와 사이에 차이가 있는지 --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

그냥 줄임말...

관련 정보