diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-06-17 13:25:50 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-06-17 13:25:50 +0200 |
commit | a3f2131eb69c57570a41d036f395df9252c39b8b (patch) | |
tree | 881b6c92c7d70ee63e37e0416a3bc9d1ec6fd87b /nixos/doc/manual/administration | |
parent | 3c14bda7f5a065d3d290399db2ef15457af3906b (diff) | |
download | nixlib-a3f2131eb69c57570a41d036f395df9252c39b8b.tar nixlib-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.gz nixlib-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.bz2 nixlib-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.lz nixlib-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.xz nixlib-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.zst nixlib-a3f2131eb69c57570a41d036f395df9252c39b8b.zip |
doc: Use prompt more often
Diffstat (limited to 'nixos/doc/manual/administration')
8 files changed, 18 insertions, 18 deletions
diff --git a/nixos/doc/manual/administration/cleaning-store.xml b/nixos/doc/manual/administration/cleaning-store.xml index f078b8c3ba37..526803e429ba 100644 --- a/nixos/doc/manual/administration/cleaning-store.xml +++ b/nixos/doc/manual/administration/cleaning-store.xml @@ -11,12 +11,12 @@ Nix’s <emphasis>garbage collector</emphasis> to remove old, unreferenced packages. This is easy: <screen> -$ nix-collect-garbage +<prompt>$ </prompt>nix-collect-garbage </screen> Alternatively, you can use a systemd unit that does the same in the background: <screen> -# systemctl start nix-gc.service +<prompt># </prompt>systemctl start nix-gc.service </screen> You can tell NixOS in <filename>configuration.nix</filename> to run this unit automatically at certain points in time, for instance, every night at 03:15: @@ -31,11 +31,11 @@ $ nix-collect-garbage configurations. The following command deletes old roots, removing the ability to roll back to them: <screen> -$ nix-collect-garbage -d +<prompt>$ </prompt>nix-collect-garbage -d </screen> You can also do this for specific profiles, e.g. <screen> -$ nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations old +<prompt>$ </prompt>nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations old </screen> Note that NixOS system configurations are stored in the profile <filename>/nix/var/nix/profiles/system</filename>. @@ -45,7 +45,7 @@ $ nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations o Nix store) is to run Nix’s store optimiser, which seeks out identical files in the store and replaces them with hard links to a single copy. <screen> -$ nix-store --optimise +<prompt>$ </prompt>nix-store --optimise </screen> Since this command needs to read the entire Nix store, it can take quite a while to finish. diff --git a/nixos/doc/manual/administration/container-networking.xml b/nixos/doc/manual/administration/container-networking.xml index 2ee8bfdd50f1..42486f01fe8c 100644 --- a/nixos/doc/manual/administration/container-networking.xml +++ b/nixos/doc/manual/administration/container-networking.xml @@ -11,10 +11,10 @@ <literal>10.233.0.0/16</literal>. You can get the container’s IPv4 address as follows: <screen> -# nixos-container show-ip foo +<prompt># </prompt>nixos-container show-ip foo 10.233.4.2 -$ ping -c1 10.233.4.2 +<prompt>$ </prompt>ping -c1 10.233.4.2 64 bytes from 10.233.4.2: icmp_seq=1 ttl=64 time=0.106 ms </screen> </para> diff --git a/nixos/doc/manual/administration/control-groups.xml b/nixos/doc/manual/administration/control-groups.xml index bb8b7f83d9e0..16d03cc0d1ab 100644 --- a/nixos/doc/manual/administration/control-groups.xml +++ b/nixos/doc/manual/administration/control-groups.xml @@ -16,7 +16,7 @@ <literal>systemd</literal> hierarchy, which is what systemd uses to keep track of the processes belonging to each service or user session: <screen> -$ systemd-cgls +<prompt>$ </prompt>systemd-cgls ├─user │ └─eelco │ └─c1 diff --git a/nixos/doc/manual/administration/logging.xml b/nixos/doc/manual/administration/logging.xml index a41936b373d6..da4877fcdf08 100644 --- a/nixos/doc/manual/administration/logging.xml +++ b/nixos/doc/manual/administration/logging.xml @@ -11,14 +11,14 @@ The command <literal>journalctl</literal> allows you to see the contents of the journal. For example, <screen> -$ journalctl -b +<prompt>$ </prompt>journalctl -b </screen> shows all journal entries since the last reboot. (The output of <command>journalctl</command> is piped into <command>less</command> by default.) You can use various options and match operators to restrict output to messages of interest. For instance, to get all messages from PostgreSQL: <screen> -$ journalctl -u postgresql.service +<prompt>$ </prompt>journalctl -u postgresql.service -- Logs begin at Mon, 2013-01-07 13:28:01 CET, end at Tue, 2013-01-08 01:09:57 CET. -- ... Jan 07 15:44:14 hagbard postgres[2681]: [2-1] LOG: database system is shut down @@ -29,7 +29,7 @@ Jan 07 15:45:13 hagbard postgres[2500]: [1-1] LOG: database system is ready to Or to get all messages since the last reboot that have at least a “critical” severity level: <screen> -$ journalctl -b -p crit +<prompt>$ </prompt>journalctl -b -p crit Dec 17 21:08:06 mandark sudo[3673]: pam_unix(sudo:auth): auth could not identify password for [alice] Dec 29 01:30:22 mandark kernel[6131]: [1053513.909444] CPU6: Core temperature above threshold, cpu clock throttled (total events = 1) </screen> diff --git a/nixos/doc/manual/administration/rollback.xml b/nixos/doc/manual/administration/rollback.xml index 07c6acaa469c..fb87810ba461 100644 --- a/nixos/doc/manual/administration/rollback.xml +++ b/nixos/doc/manual/administration/rollback.xml @@ -33,7 +33,7 @@ where <replaceable>N</replaceable> is the number of the NixOS system configuration. To get a list of the available configurations, do: <screen> -$ ls -l /nix/var/nix/profiles/system-*-link +<prompt>$ </prompt>ls -l /nix/var/nix/profiles/system-*-link <replaceable>...</replaceable> lrwxrwxrwx 1 root root 78 Aug 12 13:54 /nix/var/nix/profiles/system-268-link -> /nix/store/202b...-nixos-13.07pre4932_5a676e4-4be1055 </screen> diff --git a/nixos/doc/manual/administration/service-mgmt.xml b/nixos/doc/manual/administration/service-mgmt.xml index 0c2085c81559..1b9c745eb59f 100644 --- a/nixos/doc/manual/administration/service-mgmt.xml +++ b/nixos/doc/manual/administration/service-mgmt.xml @@ -21,7 +21,7 @@ <command>systemd</command>. Without any arguments, it shows the status of active units: <screen> -$ systemctl +<prompt>$ </prompt>systemctl -.mount loaded active mounted / swapfile.swap loaded active active /swapfile sshd.service loaded active running SSH Daemon @@ -33,7 +33,7 @@ graphical.target loaded active active Graphical Interface You can ask for detailed status information about a unit, for instance, the PostgreSQL database service: <screen> -$ systemctl status postgresql.service +<prompt>$ </prompt>systemctl status postgresql.service postgresql.service - PostgreSQL Server Loaded: loaded (/nix/store/pn3q73mvh75gsrl8w7fdlfk3fq5qm5mw-unit/postgresql.service) Active: active (running) since Mon, 2013-01-07 15:55:57 CET; 9h ago diff --git a/nixos/doc/manual/administration/store-corruption.xml b/nixos/doc/manual/administration/store-corruption.xml index a4ca3b651e20..b9d11152d5e1 100644 --- a/nixos/doc/manual/administration/store-corruption.xml +++ b/nixos/doc/manual/administration/store-corruption.xml @@ -18,7 +18,7 @@ If the corruption is in a path in the closure of the NixOS system configuration, you can fix it by doing <screen> -# nixos-rebuild switch --repair +<prompt># </prompt>nixos-rebuild switch --repair </screen> This will cause Nix to check every path in the closure, and if its cryptographic hash differs from the hash recorded in Nix’s database, the @@ -28,7 +28,7 @@ <para> You can also scan the entire Nix store for corrupt paths: <screen> -# nix-store --verify --check-contents --repair +<prompt># </prompt>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. diff --git a/nixos/doc/manual/administration/user-sessions.xml b/nixos/doc/manual/administration/user-sessions.xml index 1d95cfb22b69..80daf6bdbff0 100644 --- a/nixos/doc/manual/administration/user-sessions.xml +++ b/nixos/doc/manual/administration/user-sessions.xml @@ -10,7 +10,7 @@ allows querying and manipulating user sessions. For instance, to list all user sessions: <screen> -$ loginctl +<prompt>$ </prompt>loginctl SESSION UID USER SEAT c1 500 eelco seat0 c3 0 root seat0 @@ -21,7 +21,7 @@ $ loginctl devices attached to the system; usually, there is only one seat.) To get information about a session: <screen> -$ loginctl session-status c3 +<prompt>$ </prompt>loginctl session-status c3 c3 - root (0) Since: Tue, 2013-01-08 01:17:56 CET; 4min 42s ago Leader: 2536 (login) |