nixos: nixos/doc/manual/administration/rebooting.xml to CommonMark

This commit is contained in:
Bobby Rong 2021-07-03 14:31:57 +08:00
parent d37933c01f
commit adbe4e34d6
4 changed files with 70 additions and 36 deletions

View file

@ -0,0 +1,31 @@
# Rebooting and Shutting Down {#sec-rebooting}
The system can be shut down (and automatically powered off) by doing:
```ShellSession
# shutdown
```
This is equivalent to running `systemctl poweroff`.
To reboot the system, run
```ShellSession
# reboot
```
which is equivalent to `systemctl reboot`. Alternatively, you can
quickly reboot the system using `kexec`, which bypasses the BIOS by
directly loading the new kernel into memory:
```ShellSession
# systemctl kexec
```
The machine can be suspended to RAM (if supported) using `systemctl
suspend`, and suspended to disk using `systemctl
hibernate`.
These commands can be run by any user who is logged in locally, i.e. on
a virtual console or in X11; otherwise, the user is asked for
authentication.

View file

@ -1,35 +0,0 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-rebooting">
<title>Rebooting and Shutting Down</title>
<para>
The system can be shut down (and automatically powered off) by doing:
<screen>
<prompt># </prompt>shutdown
</screen>
This is equivalent to running <command>systemctl poweroff</command>.
</para>
<para>
To reboot the system, run
<screen>
<prompt># </prompt>reboot
</screen>
which is equivalent to <command>systemctl reboot</command>. Alternatively,
you can quickly reboot the system using <literal>kexec</literal>, which
bypasses the BIOS by directly loading the new kernel into memory:
<screen>
<prompt># </prompt>systemctl kexec
</screen>
</para>
<para>
The machine can be suspended to RAM (if supported) using <command>systemctl
suspend</command>, and suspended to disk using <command>systemctl
hibernate</command>.
</para>
<para>
These commands can be run by any user who is logged in locally, i.e. on a
virtual console or in X11; otherwise, the user is asked for authentication.
</para>
</chapter>

View file

@ -11,7 +11,7 @@
</para>
</partintro>
<xi:include href="../from_md/administration/service-mgmt.chapter.xml" />
<xi:include href="rebooting.xml" />
<xi:include href="../from_md/administration/rebooting.chapter.xml" />
<xi:include href="user-sessions.xml" />
<xi:include href="control-groups.xml" />
<xi:include href="logging.xml" />

View file

@ -0,0 +1,38 @@
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-rebooting">
<title>Rebooting and Shutting Down</title>
<para>
The system can be shut down (and automatically powered off) by
doing:
</para>
<programlisting>
# shutdown
</programlisting>
<para>
This is equivalent to running <literal>systemctl poweroff</literal>.
</para>
<para>
To reboot the system, run
</para>
<programlisting>
# reboot
</programlisting>
<para>
which is equivalent to <literal>systemctl reboot</literal>.
Alternatively, you can quickly reboot the system using
<literal>kexec</literal>, which bypasses the BIOS by directly
loading the new kernel into memory:
</para>
<programlisting>
# systemctl kexec
</programlisting>
<para>
The machine can be suspended to RAM (if supported) using
<literal>systemctl suspend</literal>, and suspended to disk using
<literal>systemctl hibernate</literal>.
</para>
<para>
These commands can be run by any user who is logged in locally, i.e.
on a virtual console or in X11; otherwise, the user is asked for
authentication.
</para>
</chapter>