用户登录时如何关闭计算机?

Jos*_*Fox 2 shutdown logout

I am trying to shut down my Ubuntu laptop, but some other users have left their accounts logged-in. (All users are local.) Normal shutdown is blocked because of this.

I can do a hard shutdown with the power switch, but is there a way to force shutdown from within Ubuntu?

小智 5

Open a terminal (ctrl + alt + T) or use a TTY (ctrl + alt + F1.) Then you have to login using administrative account or root.

sudo shutdown -P now
Run Code Online (Sandbox Code Playgroud)