su 切換身份確認

請教大家
當我使用root登入linux 後切換到一般user身份別, 及我直接使用一般身份來登入, 或是由一般身份來切換回root, 這樣作用有什麼不一樣, 因為我發現路徑的擁有者名字會跟著變
謝謝
su 切換身份確認
2020-07-30 16:05 發佈
文章關鍵字 SU 身份
1.路徑還是在/var底下的dir沒變
2.開頭的root@conf.....不是擁有者名字變換,是登入身分變換(要確認你的資料夾跟檔案的owner 可以用ls -l
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.

沒加上 - (或 --login) 會有差別.
感謝幫忙
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?