diff options
author | Wilhelm Schuster <ws@wilhelm.re> | 2016-06-01 16:23:32 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2016-06-01 15:23:32 +0100 |
commit | 5f8d14546b6a5a5df8a4768833497a674083dd8e (patch) | |
tree | cba469b3e03c7d3b33cf3392fff119fdbfaa68ee /nixos/doc/manual/administration | |
parent | f5471374250ccc2d0f94dd130fd113beb593725e (diff) | |
download | nixlib-5f8d14546b6a5a5df8a4768833497a674083dd8e.tar nixlib-5f8d14546b6a5a5df8a4768833497a674083dd8e.tar.gz nixlib-5f8d14546b6a5a5df8a4768833497a674083dd8e.tar.bz2 nixlib-5f8d14546b6a5a5df8a4768833497a674083dd8e.tar.lz nixlib-5f8d14546b6a5a5df8a4768833497a674083dd8e.tar.xz nixlib-5f8d14546b6a5a5df8a4768833497a674083dd8e.tar.zst nixlib-5f8d14546b6a5a5df8a4768833497a674083dd8e.zip |
Manual: Explicitly mark commands that require to be run as root (#15589)
* manual: Mark commands that require root Mark every command that requires to be run as root by prefixing them with '#' instead of '$'. * manual: Add note about commands that require root
Diffstat (limited to 'nixos/doc/manual/administration')
10 files changed, 36 insertions, 36 deletions
diff --git a/nixos/doc/manual/administration/cleaning-store.xml b/nixos/doc/manual/administration/cleaning-store.xml index 41dc65795b68..4cf62947f528 100644 --- a/nixos/doc/manual/administration/cleaning-store.xml +++ b/nixos/doc/manual/administration/cleaning-store.xml @@ -21,7 +21,7 @@ Alternatively, you can use a systemd unit that does the same in the background: <screen> -$ systemctl start nix-gc.service +# systemctl start nix-gc.service </screen> You can tell NixOS in <filename>configuration.nix</filename> to run @@ -59,4 +59,4 @@ $ nix-store --optimise Since this command needs to read the entire Nix store, it can take quite a while to finish.</para> -</chapter> \ No newline at end of file +</chapter> diff --git a/nixos/doc/manual/administration/container-networking.xml b/nixos/doc/manual/administration/container-networking.xml index adea3e69840d..1b1576d3babe 100644 --- a/nixos/doc/manual/administration/container-networking.xml +++ b/nixos/doc/manual/administration/container-networking.xml @@ -13,7 +13,7 @@ create</literal>, it gets it own private IPv4 address in the range address as follows: <screen> -$ nixos-container show-ip foo +# nixos-container show-ip foo 10.233.4.2 $ ping -c1 10.233.4.2 @@ -47,4 +47,4 @@ where <literal>eth0</literal> should be replaced with the desired external interface. Note that <literal>ve-+</literal> is a wildcard that matches all container interfaces.</para> -</section> \ No newline at end of file +</section> diff --git a/nixos/doc/manual/administration/imperative-containers.xml b/nixos/doc/manual/administration/imperative-containers.xml index 6131d4e04ea8..3a52658436ac 100644 --- a/nixos/doc/manual/administration/imperative-containers.xml +++ b/nixos/doc/manual/administration/imperative-containers.xml @@ -11,7 +11,7 @@ identifier <literal>foo</literal> as follows: <screen> -$ nixos-container create foo +# nixos-container create foo </screen> This creates the container’s root directory in @@ -25,7 +25,7 @@ line. For instance, to create a container that has <literal>root</literal>: <screen> -$ nixos-container create foo --config 'services.openssh.enable = true; \ +# nixos-container create foo --config 'services.openssh.enable = true; \ users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];' </screen> @@ -35,7 +35,7 @@ $ nixos-container create foo --config 'services.openssh.enable = true; \ run: <screen> -$ nixos-container start foo +# nixos-container start foo </screen> This command will return as soon as the container has booted and has @@ -46,7 +46,7 @@ Thus, if something went wrong, you can get status info using <command>systemctl</command>: <screen> -$ systemctl status container@foo +# systemctl status container@foo </screen> </para> @@ -55,7 +55,7 @@ $ systemctl status container@foo root using the <command>root-login</command> operation: <screen> -$ nixos-container root-login foo +# nixos-container root-login foo [root@foo:~]# </screen> @@ -65,7 +65,7 @@ authentication). You can also get a regular login prompt using the the host: <screen> -$ nixos-container login foo +# nixos-container login foo foo login: alice Password: *** </screen> @@ -74,7 +74,7 @@ With <command>nixos-container run</command>, you can execute arbitrary commands in the container: <screen> -$ nixos-container run foo -- uname -a +# nixos-container run foo -- uname -a Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux </screen> @@ -86,17 +86,17 @@ container. First, on the host, you can edit and run <screen> -$ nixos-container update foo +# nixos-container update foo </screen> This will build and activate the new configuration. You can also specify a new configuration on the command line: <screen> -$ nixos-container update foo --config 'services.httpd.enable = true; \ +# nixos-container update foo --config 'services.httpd.enable = true; \ services.httpd.adminAddr = "foo@example.org";' -$ curl http://$(nixos-container show-ip foo)/ +# curl http://$(nixos-container show-ip foo)/ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">… </screen> @@ -116,9 +116,9 @@ start</literal>, respectively, or by using destroy a container, including its file system, do <screen> -$ nixos-container destroy foo +# nixos-container destroy foo </screen> </para> -</section> \ No newline at end of file +</section> diff --git a/nixos/doc/manual/administration/maintenance-mode.xml b/nixos/doc/manual/administration/maintenance-mode.xml index 15c1f902da79..17a1609e5579 100644 --- a/nixos/doc/manual/administration/maintenance-mode.xml +++ b/nixos/doc/manual/administration/maintenance-mode.xml @@ -9,10 +9,10 @@ <para>You can enter rescue mode by running: <screen> -$ systemctl rescue</screen> +# systemctl rescue</screen> This will eventually give you a single-user root shell. Systemd will stop (almost) all system services. To get out of maintenance mode, just exit from the rescue shell.</para> -</section> \ No newline at end of file +</section> diff --git a/nixos/doc/manual/administration/network-problems.xml b/nixos/doc/manual/administration/network-problems.xml index 3af9cc59742f..91f9eb4e22c6 100644 --- a/nixos/doc/manual/administration/network-problems.xml +++ b/nixos/doc/manual/administration/network-problems.xml @@ -18,14 +18,14 @@ You can disable the use of the binary cache by adding <option>--option use-binary-caches false</option>, e.g. <screen> -$ nixos-rebuild switch --option use-binary-caches false +# nixos-rebuild switch --option use-binary-caches false </screen> If you have an alternative binary cache at your disposal, you can use it instead: <screen> -$ nixos-rebuild switch --option binary-caches http://my-cache.example.org/ +# nixos-rebuild switch --option binary-caches http://my-cache.example.org/ </screen> </para> diff --git a/nixos/doc/manual/administration/rebooting.xml b/nixos/doc/manual/administration/rebooting.xml index d1db7b141cf2..23f3a3219c6a 100644 --- a/nixos/doc/manual/administration/rebooting.xml +++ b/nixos/doc/manual/administration/rebooting.xml @@ -10,7 +10,7 @@ doing: <screen> -$ shutdown +# shutdown </screen> This is equivalent to running <command>systemctl @@ -19,7 +19,7 @@ poweroff</command>.</para> <para>To reboot the system, run <screen> -$ reboot +# reboot </screen> which is equivalent to <command>systemctl reboot</command>. @@ -28,7 +28,7 @@ Alternatively, you can quickly reboot the system using the new kernel into memory: <screen> -$ systemctl kexec +# systemctl kexec </screen> </para> @@ -41,4 +41,4 @@ $ systemctl kexec i.e. on a virtual console or in X11; otherwise, the user is asked for authentication.</para> -</chapter> \ No newline at end of file +</chapter> diff --git a/nixos/doc/manual/administration/rollback.xml b/nixos/doc/manual/administration/rollback.xml index 23a3ece7c070..ae621f33de2c 100644 --- a/nixos/doc/manual/administration/rollback.xml +++ b/nixos/doc/manual/administration/rollback.xml @@ -19,7 +19,7 @@ fails to boot. After the system has booted, you can make the selected configuration the default for subsequent boots: <screen> -$ /run/current-system/bin/switch-to-configuration boot</screen> +# /run/current-system/bin/switch-to-configuration boot</screen> </para> @@ -27,12 +27,12 @@ $ /run/current-system/bin/switch-to-configuration boot</screen> system: <screen> -$ nixos-rebuild switch --rollback</screen> +# nixos-rebuild switch --rollback</screen> This is equivalent to running: <screen> -$ /nix/var/nix/profiles/system-<replaceable>N</replaceable>-link/bin/switch-to-configuration switch</screen> +# /nix/var/nix/profiles/system-<replaceable>N</replaceable>-link/bin/switch-to-configuration switch</screen> where <replaceable>N</replaceable> is the number of the NixOS system configuration. To get a list of the available configurations, do: @@ -45,4 +45,4 @@ lrwxrwxrwx 1 root root 78 Aug 12 13:54 /nix/var/nix/profiles/system-268-link -> </para> -</section> \ No newline at end of file +</section> diff --git a/nixos/doc/manual/administration/service-mgmt.xml b/nixos/doc/manual/administration/service-mgmt.xml index c0940a42f307..1627c7a2fdeb 100644 --- a/nixos/doc/manual/administration/service-mgmt.xml +++ b/nixos/doc/manual/administration/service-mgmt.xml @@ -66,9 +66,9 @@ messages from the service. <para>Units can be stopped, started or restarted: <screen> -$ systemctl stop postgresql.service -$ systemctl start postgresql.service -$ systemctl restart postgresql.service +# systemctl stop postgresql.service +# systemctl start postgresql.service +# systemctl restart postgresql.service </screen> These operations are synchronous: they wait until the service has diff --git a/nixos/doc/manual/administration/store-corruption.xml b/nixos/doc/manual/administration/store-corruption.xml index 0160cb45358b..9f567042b727 100644 --- a/nixos/doc/manual/administration/store-corruption.xml +++ b/nixos/doc/manual/administration/store-corruption.xml @@ -18,7 +18,7 @@ you may be able to fix it automatically.</para> system configuration, you can fix it by doing <screen> -$ nixos-rebuild switch --repair +# nixos-rebuild switch --repair </screen> This will cause Nix to check every path in the closure, and if its @@ -28,10 +28,10 @@ the path is rebuilt or redownloaded.</para> <para>You can also scan the entire Nix store for corrupt paths: <screen> -$ nix-store --verify --check-contents --repair +# nix-store --verify --check-contents --repair </screen> Any corrupt paths will be redownloaded if they’re available in a binary cache; otherwise, they cannot be repaired.</para> -</section> \ No newline at end of file +</section> diff --git a/nixos/doc/manual/administration/user-sessions.xml b/nixos/doc/manual/administration/user-sessions.xml index 05e2c1a9b29f..0a7eb8cd123c 100644 --- a/nixos/doc/manual/administration/user-sessions.xml +++ b/nixos/doc/manual/administration/user-sessions.xml @@ -45,9 +45,9 @@ track of this, you can terminate a session in a way that ensures that all the session’s processes are gone: <screen> -$ loginctl terminate-session c3 +# loginctl terminate-session c3 </screen> </para> -</chapter> \ No newline at end of file +</chapter> |