You are not logged in.
Old geezer asking a noob question here:
Now that I'm using systemd, I really like how quickly I can shut down my system from a terminal emulation window.
Working in a desktop environment like Gnome, though, is it safe to shut down the system this way, or do I need to go through the loooong wait that always follows hitting Power Off in Gnome?
I usually have a terminal window open somewhere on my screen, but even when I don't it's faster under systemd to open a console and type "halt" than it is to let Gnome shut down my system via Power Off.
Thanks.
Offline
I don't know why it takes so long for you, but in my situation the gnome power off is just as fast as issuing halt from a terminal... Do you use gdm or another login manager?
Also, do you have systemd-sysvcompat installed?
Offline
Thanks for your reply, mariusmeyer.
Do you use gdm or another login manager?
gdm
Also, do you have systemd-sysvcompat installed?
Yes, I have systemd-sysvcompat installed. Otherwise, as far as I can tell, my system is now pure systemd (no more rc.conf; initscripts package removed; systemd boot sequence runs without error; systemctl looks good).
Offline
Yeah, no idea then I'm afraid mine "instantly" quits gnome and goes straight to a vt showing the systemd shutdown messages for a brief second, and I'm on an old HDD... But I barely run anything at all, just gdm into gnome, no services.
Offline
Yeah, no idea then I'm afraid mine "instantly" quits gnome and goes straight to a vt showing the systemd shutdown messages for a brief second, and I'm on an old HDD... But I barely run anything at all, just gdm into gnome, no services.
Do you know if it's unsafe to shut down the system via a terminal rather than going through the desktop environment's shutdown sequence?
I guess this hasn't occurred to me much before since I didn't have this super-speedy systemd shutdown until just now.
Last edited by dhave (2012-10-04 20:56:52)
Offline
I think both methods issue the usual sigterm - wait - sigkill chain, so I think it's perfectly fine to shut down from a terminal window or similar. I've done it loads of times and never had any problems...
Offline
type "systemctl poweroff" in the terminal not halt because i don't think the computer will turn off using halt under systemd. for more info, check the systemd's wiki under FAQ.
Offline
@caslie, that is correct, "systemctl halt" will actuall halt the computer, then power is up to you pushing the physical button. I am pretty sure that they both call the same command and therefore the same sequence of events as mariusmeyer indicates. Why not enable persistent logging in journalctl and try both ways?
Offline
type "systemctl poweroff" in the terminal not halt because i don't think the computer will turn off using halt under systemd. for more info, check the systemd's wiki under FAQ.
"halt" still works, because it's symlinked when systemd-sysvcompat is installed, according to the wiki page on systemd (and by my own experience).
Offline
Yes, "halt" is the same, but systemctl has a halt command as well that actually halts the machine.
Offline
@caslie, that is correct, "systemctl halt" will actuall halt the computer, then power is up to you pushing the physical button. I am pretty sure that they both call the same command and therefore the same sequence of events as mariusmeyer indicates. Why not enable persistent logging in journalctl and try both ways?
Okay i see, but prior to systemd i need not push the button to actually turn it off. So I suggested that he use poweroff instead of halt to avoid inconvinience.
Offline
I don't see why it should not be safe. I wrote a polkit rule allowing users in the power group to invoke "poweroff" without a password. That's how I shut down the computer all the time: I call my runner and type poweroff.
Offline
Just wanted to add that the halt command will under normal circumstances(runlevel 1-5) call shutdown and poweroff the system, so is the same as running 'shutdown -h now' or poweroff, but with systemd-sysvcompat, then the halt symlink actually halts now and not powers off...
Poweroff is also a symlink that actually powers off...
Offline