菜单关闭和’shutdown -h now’之间的区别

关机菜单项和shutdown -h now之间有什么区别? 前者有时会在Ubuntu 11.10上挂起我的笔记本电脑。

关闭菜单项请求图形系统干净地关闭。 例如,有文件要保存的程序有机会询问用户该做什么。

shutdown -h now (同义词: poweroff ;另见reboot )只是向所有正在运行的程序发送信号。 如果用户有未保存的文件,他们就没有机会查询用户。 但是,发送poweroff命令因此而在更多情况下工作。

该菜单调用一组复杂的freedesktop.org规范,这些规范在用户不需要root的情况下关闭系统。 你可以在这个答案中看到其中一些。 此方法在最终调用系统暂停(通过shutdown )之前检查打开的文档并在图形界面中阻止应用程序。

直接运行shutdown只会关闭计算机 – 无论正在运行什么。

如果第一个不起作用,可能会阻止它。 我不是它如何工作的专家所以我建议你在LaunchPad上提交一个错误,并让知道它如何工作的人指导你完成调试过程。

以安全的方式关闭系统。 您可以立即关闭机器,或使用24小时格式安排关机。

关闭系统后,shutdown命令根据指定的选项暂停或重新启动系统。 只有root用户才能执行shutdown命令

 -r Requests that the system be rebooted after it has been brought down -h Requests that the system be either halted or powered off after it has been broughtdown, with the choice as to which left up to the system -H Requests that the system be halted after it has been brought down -P Requests that the system be powered off after it has been brought down -c Cancels a running shutdown. TIME is not specified with this option, the firstargument is MESSAGE -k Only send out the warning messages and disable logins, do not actually bring thesystem down