mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-03-14 12:19:06 +00:00
1 line
8.9 KiB
JSON
1 line
8.9 KiB
JSON
{"pageProps":{"metadata":{"date":"\"2021-05-20 22:37:22 +08:00\"","date_modified":"\"2022-04-19 20:21:56 +08:00\"","language":"en","source":""},"title":"systemd","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"systemd-at-user-level"},"children":[{"type":"text","value":"systemd at user-level"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/linux.systemd#systemd-at-user-level"},"children":[{"type":"text","value":"systemd at user-level"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"extra-information"},"children":[{"type":"text","value":"Extra information"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/linux.systemd#extra-information"},"children":[{"type":"text","value":"Extra information"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"systemd is a big tool for a big system.\nLet's explore some of them from a perspective of a wannabe power user.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Among other things, it has the following list of features.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.timers"},"children":[{"type":"text","value":"systemd timers"}]},{"type":"text","value":" which can replace cron for task scheduling.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.services"},"children":[{"type":"text","value":"systemd services"}]},{"type":"text","value":" along with the usual antics of a service manager such as managing dependencies and commands to run when killed.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.transient-units"},"children":[{"type":"text","value":"systemd transient units"}]},{"type":"text","value":" for quickly creating and scheduling one-off services.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.unit-templates"},"children":[{"type":"text","value":"systemd unit templates"}]},{"type":"text","value":" is handy for managing units that have common structure, enabling to start them quickly and dynamically.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.environment-directives"},"children":[{"type":"text","value":"systemd environment directives"}]},{"type":"text","value":" enable setting environment variables from a systemd-ful session.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.network"},"children":[{"type":"text","value":"systemd-networkd"}]},{"type":"text","value":" is the network configuration manager in case you want to do "},{"type":"element","tagName":"a","properties":{"href":"/linux.network-configuration"},"children":[{"type":"text","value":"Network configuration in Linux"}]},{"type":"text","value":".\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.bootloader"},"children":[{"type":"text","value":"systemd-boot"}]},{"type":"text","value":" is a bootloader mainly for UEFI-based systems.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.journal"},"children":[{"type":"text","value":"systemd-journald"}]},{"type":"text","value":" is the system logging service providing a structured way to manage your logs from different units.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/linux.systemd.unit-hardening"},"children":[{"type":"text","value":"systemd unit hardening"}]},{"type":"text","value":" can help your services secure.\n"}]}]}]},{"type":"element","tagName":"h1","properties":{"id":"systemd-at-user-level"},"children":[{"type":"text","value":"systemd at user-level"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"systemd has the ability to run at user-level empowering the user to manage their own system with their own settings.\nIt immensely helps separating user-specific settings from the system-wide settings.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"systemd looks for the units from certain paths.\nYou can look for them from the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"systemd.unit.5"}]},{"type":"text","value":" manual page.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To run systemd as a user instance, simply add a "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"--user"}]},{"type":"text","value":" flag beforehand for "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"systemctl"}]},{"type":"text","value":" and other systemd binaries, if applicable.\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-shell"]},"children":[{"type":"text","value":"# See how different the output when run at user- and system-level.\nsystemctl --user show-units\nsystemctl show-units\n\nsystemctl --user show-environment\nsystemctl show-environment\n\nsystemctl --user start $SERVICE\n"}]}]},{"type":"element","tagName":"h1","properties":{"id":"extra-information"},"children":[{"type":"text","value":"Extra information"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"systemd.directives.7"}]},{"type":"text","value":" is an index of configuration directives including unit keys, environment variables, and command line options for systemd-related things.\n Also contains the related manual pages for a deeper references.\n "}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"On a similar note, "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"systemd.index.7"}]},{"type":"text","value":" is an alphabetical index of the important keywords found in systemd.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"systemd.mount"}]},{"type":"text","value":" units require the filename to be the mountpoint.\n Though, it has to be converted to what systemd accepts (e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"systemd-escape --path $PATH"}]},{"type":"text","value":").\n"}]}]}]}]},"backlinks":[{"path":"/cli.systemctl","title":"Command line: systemctl"},{"path":"/linux.all-distros-are-their-own","title":"How all Linux distros are technically operating systems of their own"},{"path":"/linux.systemd.environment-directives","title":"systemd environment directives"},{"path":"/linux.systemd.timers","title":"systemd timers"},{"path":"/linux.systemd.transient-units","title":"systemd transient units"},{"path":"/linux.why-a-unified-linux-distro-is-a-bad-idea","title":"Why wishing a unified Linux distro is a pointless task"}]},"__N_SSG":true} |