Ubuntu 12.04无法正常关机

来源:互联网 发布:网络剪刀手中文破解版 编辑:程序博客网 时间:2024/06/10 03:01

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.

原创粉丝点击