Ubuntu 12.04无法正常关机

Shutdown computer using terminal in Ubuntu

f you want to shutdown your computer what do you do ? Simply go to shutdown button and click shutdown isn’t?

 

Have you ever wondered how would you shutdown your pc if your gdm (Graphical User Interface) is not working. Or you are only working in command line mood or running a computer user account with ssh(secured shell) ??

 

Shutdown command

The command used in ubuntu to shutdown is shutdown.

If you want to shutdown your computer right now enter the command below

C代码 复制代码  收藏代码
  1. $ sudo shutdown -h now  
 

or

C代码 复制代码  收藏代码
  1. $ sudo shutdown -h 0  
 

Shutdown computer at a scheduled time

if you want to shutdown command at a scheduled time enter the following command

C代码 复制代码  收藏代码
  1. $ sudo shutdown -h 12:00 "System is shutting down"   
 

This will shutdown your computer on 12pm with sending this message to all user.

You can also use power off or halt command to do this.

C代码 复制代码  收藏代码
  1. $sudo halt  
 

or

C代码 复制代码  收藏代码
  1. $sudo poweroff  
 
Reboot computer

Use any of this following command

C代码 复制代码  收藏代码
  1. $ sudo reboot  
 

or

C代码 复制代码  收藏代码
  1. $ sudo shutdown -r 0  
 

from: http://www.dscripts.net/2010/06/27/shutdown-computer-using-terminal-in-ubuntu/

 

解决 ubuntu 无法关机

 

1. Type in terminal:

C代码 复制代码  收藏代码
  1. sudo gedit /etc/default/grub  
 

2. Find the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"


3. Change this to: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"


4. Save the file and close the file.

 

5. Finally, in terminal:

C代码 复制代码  收藏代码
  1. sudo update-grub  
 

 

I found it here: Dell Studio 1569 Cannot Shutdown in Ubuntu 11.10 or 12.04

 

 

Entering BIOS usually by pressing Del button when computer starting. Go to Advanced Settings and make sure APM is Enabled.

 

If you have installed Windows Operating System, and you succeed to shutdown your computer on Windows, it means your APM is Enabled.

 

If it still don’t fix your problem, try it in terminal,

C代码 复制代码  收藏代码
  1. $ sudo gedit /etc/init.d/alsa-utils  
 

Change gedit with your favorite text editor. This will open alsa-utils or if it doesn’t exist, create new one.

Type,

C代码 复制代码  收藏代码
  1. ifconfig wlan0 down   
  2. ifconfig eth0 down   
  3. EXITSTATUS=0  
 

Save file, and try to shutdown Ubuntu.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值