Shutdown Restart and Logout
Shutdown & Restart
1 | shutdown -h now # 立即进行关机 |
recommend type sync every time before shutdown
if it need permission, add sudo beforesu
Login and Logout
1 | su - root # 切换成管理员 |
1 | logout # 注销用户 |
example
current user is Tom, go to root.
Then logout at root, it will go back to Tom.
Then logout again, it will shutdown.
Notice
It will different when you operate this in Linux and in xshell.
In Linux, there is no logout for Tom.