如何從 root 登入返回我的使用者登入?

如何從 root 登入返回我的使用者登入?

我正在使用 SuSE Linux Enterprise,並且我知道有一個命令

su root

用於更改為 root 登入。但反過來呢?如果我想返回我的用戶帳戶,該怎麼做?

答案1

如果您想返回您的帳戶,您有3種方式:

exit
CTRL +D
logout

如果想換成其他用戶,可以su再使用。

su differentuser

答案2

只需鍵入exit即可退出 shell。

答案3

su username

如果你想載入環境變量,

su - username

答案4

輸入 exit、logout 和 ctrl D。此外,當再次執行終端機視窗時,它仍然以 root 身分登入。這是透過 THM (TryHackMe)

相關內容