This file is indexed.

/usr/share/doc/newbiedoc/newbiedoc.berlios.de/wiki/Shutting_down_a_Debian_system.html is in newbiedoc 0.8.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
				<meta name="keywords" content="Shutting down a Debian system,Shutting down a Debian system,Manager,GNU Free Documentation License,Index" />
		<title>Shutting down a Debian system - NewbieDOC</title>
		
                
	</head>
<body  class="mediawiki ns-4 ltr page-NewbieDOC_Shutting_down_a_Debian_system">
	<div id="globalWrapper">
		<div id="column-content">
	<div id="content">
		<a name="top" id="top"></a>
				<h1 class="firstHeading">Shutting down a Debian system</h1>
		<div id="bodyContent">
			<h3 id="siteSub">From NewbieDOC</h3>
			<div id="contentSub"></div>
			<!-- Bad Behavior 2.0.11 run time: 16.577 ms --><dl><dt><a href="http://newbiedoc.berlios.de/wiki/User:Manager" title="User:Manager">Chris Lale</a>
</dt><dd>chrislale AT users DOT berlios DOT de
</dd></dl>
<p><b>Go to <a href="Index.html" title="NewbieDOC:Index">NewbieDOC index</a></b>
</p><p><b>Revision History</b>
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><hr/>
</td></tr>
<tr>
<td rowspan="2" valign="top">Version 1.0
</td><td valign="top">10th February 2007
</td><td valign="top">Revised by <a href="http://newbiedoc.berlios.de/wiki/User:Manager" title="User:Manager">Chris Lale</a>
</td></tr>
<tr>
<td colspan="2" valign="top">Initial release
</td></tr>
<tr>
<td colspan="3"> <hr/>
</td></tr>
<tr>
<td rowspan="2" valign="top">Version 1.1
</td><td valign="top">26th November 2007
</td><td valign="top">Revised by <a href="http://newbiedoc.berlios.de/wiki/User:Manager" title="User:Manager">Chris Lale</a>
</td></tr>
<tr>
<td colspan="2" valign="top">Reformatted for newbiedoc package; added Abstract and Licence appendix.
</td></tr>
<tr>
<td colspan="3"> <hr/>
<p><br />
</p>
<table style="border-color:silver;border-style:solid;border-width:1px 1px 1px 1px;width:100%;text-align:left;margin-bottom:1em;background:#f9f9f9;padding:.3em">
<tr>
<td> <a href="http://newbiedoc.berlios.de/wiki/Image:Newbiedoc-32.png" class="image.html" title="Image:Newbiedoc-32.png"><img alt="Image:Newbiedoc-32.png" src="../images/7/76/Newbiedoc-32.png" width="32" height="32" border="0" /></a>
</td><td> <b></b>
</td><td> <b>Stable document</b>
</td></tr>
<tr>
<td>
</td><td>
</td><td style="width:100%">You can comment on this document by clicking on the <a href="http://newbiedoc.berlios.de/wiki?title=NewbieDOC_talk:Shutting_down_a_Debian_system&amp;action=edit" class="external text.html" title="http://newbiedoc.berlios.de/wiki?title=NewbieDOC_talk:Shutting_down_a_Debian_system&amp;action=edit" rel="nofollow"><b>discussion</b></a> tab.
<p>You can edit the live version of this document: <a href="http://newbiedoc.berlios.de/wiki/Shutting_down_a_Debian_system" class="external text.html" title="http://newbiedoc.berlios.de/wiki/Shutting_down_a_Debian_system" rel="nofollow">Shutting down a Debian system</a>
</p>
</td></tr></table>
<p><br />
<b>Abstract</b>
</p><p>Newbies often tend to press the RESET button to stop/restart a Debian system. This is the equivalent of pulling the plug - you are risking file corruption. Here is some help about how to shut down your Debian system safely.
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="Shutting_down_a_Debian_system.html#Introduction"><span class="tocnumber">1</span> <span class="toctext">Introduction</span></a></li>
<li class="toclevel-1"><a href="Shutting_down_a_Debian_system.html#Shutting_down_from_a_console_screen"><span class="tocnumber">2</span> <span class="toctext">Shutting down from a console screen</span></a>
<ul>
<li class="toclevel-2"><a href="Shutting_down_a_Debian_system.html#Shutting_down_a_local_machine"><span class="tocnumber">2.1</span> <span class="toctext">Shutting down a local machine</span></a></li>
<li class="toclevel-2"><a href="Shutting_down_a_Debian_system.html#Shutting_down_an_unresponsive_local_machine"><span class="tocnumber">2.2</span> <span class="toctext">Shutting down an unresponsive local machine</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Shutting_down_a_Debian_system.html#Shutting_down_from_a_shell_prompt"><span class="tocnumber">3</span> <span class="toctext">Shutting down from a shell prompt</span></a>
<ul>
<li class="toclevel-2"><a href="Shutting_down_a_Debian_system.html#Shutting_down_a_local_machine_2"><span class="tocnumber">3.1</span> <span class="toctext">Shutting down a local machine</span></a></li>
<li class="toclevel-2"><a href="Shutting_down_a_Debian_system.html#Shutting_down_a_remote_machine"><span class="tocnumber">3.2</span> <span class="toctext">Shutting down a remote machine</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Shutting_down_a_Debian_system.html#Shutting_down_from_a_GUI_environment"><span class="tocnumber">4</span> <span class="toctext">Shutting down from a GUI environment</span></a>
<ul>
<li class="toclevel-2"><a href="Shutting_down_a_Debian_system.html#Shutting_down_from_the_login_screen"><span class="tocnumber">4.1</span> <span class="toctext">Shutting down from the login screen</span></a></li>
<li class="toclevel-2"><a href="Shutting_down_a_Debian_system.html#Shutting_down_from_the_Gnome_desktop"><span class="tocnumber">4.2</span> <span class="toctext">Shutting down from the Gnome desktop</span></a></li>
<li class="toclevel-2"><a href="Shutting_down_a_Debian_system.html#Shutting_down_from_the_KDE_desktop"><span class="tocnumber">4.3</span> <span class="toctext">Shutting down from the KDE desktop</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Shutting_down_a_Debian_system.html#Modify_the_action_of_the_POWER_button"><span class="tocnumber">5</span> <span class="toctext">Modify the action of the POWER button</span></a></li>
<li class="toclevel-1"><a href="Shutting_down_a_Debian_system.html#Appendix_A:_Licence"><span class="tocnumber">6</span> <span class="toctext">Appendix A: Licence</span></a></li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<p><br />
</p>
<a name="Introduction"></a><h2> <span class="mw-headline">1  Introduction </span></h2>
<p>Pressing the RESET button is the equivalent of pulling the plug - you are risking file corruption. Here are some safer ways to shut down your system. Adapted from posts in a thread on the Debian-user list (<a href="http://lists.debian.org/debian-user/2007/02/msg01393.html" class="external free.html" title="http://lists.debian.org/debian-user/2007/02/msg01393.html" rel="nofollow">http://lists.debian.org/debian-user/2007/02/msg01393.html</a>). As with so much in GNU/Linux, there is more than one solution.
</p><p><br />
</p>
<a name="Shutting_down_from_a_console_screen"></a><h2> <span class="mw-headline">2  Shutting down from a console screen </span></h2>
<p>You can use these methods even without being logged in.
</p>
<a name="Shutting_down_a_local_machine"></a><h3> <span class="mw-headline">2.1  Shutting down a local machine </span></h3>
<p>If you are used to another operating system, you may know about the Ctrl-Alt-Del key combination. You must first switch to a virtual console (text only screen) before you can use this method for shutting down Debian.
</p><p>Switch to one of the six virtual consoles (Ctrl-Alt-F1, Ctrl-Alt-F2, ..., Ctrl-Alt-F6) by holding down the Ctrl and Alt keys and tapping one of the function keys "F1" - "F6". At the console screen, issue the reboot key combination Ctrl-Alt-Del (ie hold down the "Ctrl" and "Alt" keys, and tap the "Del" or "Delete" key).
</p>
<pre>Ctrl-Alt-F1
Ctrl-Alt-Del 
</pre>
<p>Wait until the system shuts down and the restart begins,then power down the system. You can power down safely anytime before Grub begins to boot the system.
</p>
<div style='border-color:silver;border-style:solid;border-width:1px 1px 1px 1px;width:100%;text-align:left;margin-bottom:1em;background:#f9f9f9;'><div style='clear:both;height:.5em'>&nbsp;</div><div style='float:left;border:0;text-align:left;padding-left:.5em'><a href='http://newbiedoc.berlios.de/wiki/Image:120px-Crystal_Clear_Ktip_32.png' class='image' title=''><img alt='Tip' src='../images/d/dc/120px-Crystal_Clear_Ktip_32.png' border='0'/></a></div><div style='float:left;border:0;text-align:left;padding-left:.5em'> <b>Tip:&nbsp;</b> </div><div style='padding-left:11em;padding-right:1em;border:0;text-align:left;'> One of your first post-install tasks in Debian might be to comment out the "timeout 5" line in "\boot\grub\menu.lst". This will make sure that Grub does not boot until after you press the "Enter" key.
<p>Alternatively, if you wish Grub to boot automatically but wish to be able to prevent the system
from booting, change the delay from 5 seconds (which is much too
</p>
short) to 10 or 15 seconds.</div><div style='clear:both;height:.5em'>&nbsp;</div>
     </div>
<a name="Shutting_down_an_unresponsive_local_machine"></a><h3> <span class="mw-headline">2.2  Shutting down an unresponsive local machine </span></h3>
<p>If a machine is really not responsive (which happens once in a while) you can try these three key combinations in sequence&nbsp;: Alt+SysRq+S, Alt+SysRq+U and Alt+SysRq+O. They synchronise the discs ("S"), unmount the discs ("U") and turn the system off ("O"). It is important that you issue all three commands in the correct order so that you avoid data corruption.
</p>
<pre>Alt+SysRq+S
SysRq: Emergency Sync
Emergency Sync complete

Alt+SysRq+U
SysRq: Emergency Remount R/O
Emergency Remount R/O complete

Alt+SysRq+O 
SysRq: Power off
Shutdown
</pre>
<p>This will minimize the chance of data loss but isn't a long term solution.
</p><p>If you wish to reboot the system rather than shutting down, use Alt+SysRq+B instead of Alt+SysRq+O.
</p>
<pre>Alt+SysRq+B
Resetting
</pre>
<p>You can find out more about key combinations at <a href="http://linux.about.com/od/linux101/l/blnewbie5_1.htm" class="external free.html" title="http://linux.about.com/od/linux101/l/blnewbie5_1.htm" rel="nofollow">http://linux.about.com/od/linux101/l/blnewbie5_1.htm</a> .
</p>
<a name="Shutting_down_from_a_shell_prompt"></a><h2> <span class="mw-headline">3  Shutting down from a shell prompt </span></h2>
<p>If you are logged in to a console you can shut the system down from the shell prompt. You can also use this method from a desktop environment by first obtaining a shell prompt by running a "Terminal" application. 
</p>
<a name="Shutting_down_a_local_machine_2"></a><h3> <span class="mw-headline">3.1  Shutting down a local machine </span></h3>
<p>At the prompt, switch user ("su") to user root (see also <a href="http://newbiedoc.berlios.de/wiki/Talk:Shutting_down_a_Debian_system.html" title="Talk:Shutting down a Debian system">the talk/discussion page</a>).
</p>
<pre>$ su
(enter root's password)
#
</pre>
<p>The standard way to shut down is to enter 
</p>
<pre># shutdown -h now
</pre>
<p>An alternative is to enter
</p>
<pre># halt
The System is going down for halt now!
</pre>
<p>If you include the "-p" switch, the system will also poweroff.
</p>
<pre># halt -p
</pre>
<p>If you wish to reboot rather than shutting down, use the "-r" switch instead.
</p>
<pre># shutdown -r now
</pre>
<p>An alternative is to enter
</p>
<pre># reboot
</pre>
<a name="Shutting_down_a_remote_machine"></a><h3> <span class="mw-headline">3.2  Shutting down a remote machine </span></h3>
<p>If your machine is in a network and Debian has booted, you can access the machine by SSH from another machine in the network. Log in as user root via SSH, and shut it down using one of the "shutdown" commands (see <a href="Shutting_down_a_Debian_system#Shutting_down_from_a_shell_prompt.html" title="">.html#Shutting down from a shell prompt</a>). This works even if the remote keyboard or screen have locked up.
</p><p><br />
</p>
<a name="Shutting_down_from_a_GUI_environment"></a><h2> <span class="mw-headline">4  Shutting down from a GUI environment </span></h2>
<a name="Shutting_down_from_the_login_screen"></a><h3> <span class="mw-headline">4.1  Shutting down from the login screen </span></h3>
<p>After X starts, but before you have logged in, you should be presented with a graphical login screen. This is provided by the display manager. The default display manager is the Gnome Display Manager ("gdm"). There is an "Actions" menu with a "Shut down the computer" item. You can use this without logging in and without needing a password.
</p>
<a name="Shutting_down_from_the_Gnome_desktop"></a><h3> <span class="mw-headline">4.2  Shutting down from the Gnome desktop </span></h3>
<p>Once logged into Gnome, you should find "Shut Down" in the "Desktop" menu in the top panel. 
</p>
<div style='border-color:silver;border-style:solid;border-width:1px 1px 1px 1px;width:100%;text-align:left;margin-bottom:1em;background:#f9f9f9;'><div style='clear:both;height:.5em'>&nbsp;</div><div style='float:left;border:0;text-align:left;padding-left:.5em'><a href='http://newbiedoc.berlios.de/wiki/Image:Attach.png' class='image' title=''><img alt='Note' src='../images/c/c1/Attach.png' border='0'/></a></div><div style='float:left;border:0;text-align:left;padding-left:.5em'> <b>Note:&nbsp;</b> </div><div style='padding-left:11em;padding-right:1em;border:0;text-align:left;'> You can add a "shutdown" button to the panel by right-clicking on the panel.</div><div style='clear:both;height:.5em'>&nbsp;</div>
     </div>
<a name="Shutting_down_from_the_KDE_desktop"></a><h3> <span class="mw-headline">4.3  Shutting down from the KDE desktop </span></h3>
<p>Once logged into KDE, you can right click with the mouse pointer over the "desktop" (background), which produces a menu with a number of options, the one you want being "Log out <i>user</i>" (where <i>user</i> is replaced by your login name). This will bring up another window with four selections. "End Current Session" just logs you out, the next two will power down or reboot. 
</p><p><br />
</p>
<a name="Modify_the_action_of_the_POWER_button"></a><h2> <span class="mw-headline">5  Modify the action of the POWER button </span></h2>
<p>Provided your machine is ACPI compliant, install the package "acpid". It contains a script /etc/acpi/powerbtn.sh and a symbolic link to that (/etc/acpi/events/powerbutton). With that you can just hit the power button of your machine and your system will gracefully do a shutdown to halt and then power off.
</p><p><br />
</p>
<a name="Appendix_A:_Licence"></a><h2> <span class="mw-headline">6  Appendix A: Licence </span></h2>
<p>Copyright (c) 2007 Chris Lale. chrislale AT users DOT berlios DOT de
</p>
<table style="background-color: transparent" cellspacing="0" cellpadding="0">

<tr>
<td>
<table style="margin: 0.5em auto; width: 80%; background-color: #f8f8f8; border: 2px solid #e0e0e0; padding: 5px">

<tr>
<td> <a href="http://newbiedoc.berlios.de/wiki/Image:Reiss-head-sm.jpg" class="image.html" title="GNU FDL"><img alt="GNU FDL" src="../images/thumb/7/7c/Reiss-head-sm.jpg/64px-Reiss-head-sm.jpg" width="64" height="62" border="0" /></a>
</td><td> <i>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "<a href="http://newbiedoc.berlios.de/wiki/GNU_Free_Documentation_License.html" title="NewbieDOC:GNU Free Documentation License">GNU Free Documentation License</a>."</i>
</td></tr></table>
</td></tr></table>
<p><b>Go to <a href="Index.html" title="NewbieDOC:Index">NewbieDOC index</a></b>
</p>
</td>
</tr>
</table>

<!-- Tidy found serious XHTML errors -->
<!-- 
Pre-expand include size: 1885 bytes
Post-expand include size: 1769 bytes
Template argument size: 307 bytes
Maximum: 2097152 bytes
-->

<div class="printfooter">
<hr/>
Retrieved from "<a href="http://newbiedoc.berlios.de/wiki/Shutting_down_a_Debian_system">http://newbiedoc.berlios.de/wiki/NewbieDOC:Shutting_down_a_Debian_system</a>"</div>
Content is available under <a href="http://www.gnu.org/copyleft/fdl.html" class="external " title="http://www.gnu.org/copyleft/fdl.html" rel="nofollow">GNU Free Documentation License 1.2</a>, unless otherwise stated.</div></div></div></div></body></html>