Understanding Systemd Units and Unit Files

Introduction
Increasingly, Linux distributions are adopting or planning to adopt the systemd init system. This powerful suite of software can manage many aspects of your server, from services to mounted devices and system states.

最近のLinuxディストリビューションでは、systemd initシステムが採用されたり、採用予定のものが増えています。この強力なソフトウェア群は、サービスからマウントされたデバイスやシステムの状態まで、サーバーのさまざまな側面を管理することができます。

In systemd, a unit refers to any resource that the system knows how to operate on and manage. This is the primary object that the systemd tools know how to deal with. These resources are defined using configuration files called unit files.

systemdでは、システムが操作方法や管理方法を知っているあらゆるリソースを「ユニット」と呼びます。これは、systemd ツールが扱うことのできる主要なオブジェクトです。これらのリソースは、ユニットファイルと呼ばれる設定ファイルを使って定義されます。

In this guide, we will introduce you to the different units that systemd can handle. We will also be covering some of the many directives that can be used in unit files in order to shape the way these resources are handled on your system.

このガイドでは、systemd が扱えるさまざまなユニットについて紹介します。このガイドでは、systemd が扱うことのできるさまざまなユニットを紹介します。また、システム上でこれらのリソースを処理する方法を形成するために、ユニットファイルで使用できる多くのディレクティブについても説明していきます。



What do Systemd Units Give You?
Units are the objects that systemd knows how to manage. These are basically a standardized representation of system resources that can be managed by the suite of daemons and manipulated by the provided utilities.

ユニットとは、systemd が管理するためのオブジェクトです。これらは基本的にシステムリソースの標準化された表現であり、一連のデーモンによって管理され、提供されるユーティリティによって操作されます。

Units in some ways can be said to similar to services or jobs in other init systems. However, a unit has a much broader definition, as these can be used to abstract services, network resources, devices, filesystem mounts, and isolated resource pools.

ユニットはある意味、他のinitシステムのサービスやジョブに似ていると言えます。しかし、ユニットにはもっと広い定義があり、サービス、ネットワークリソース、デバイス、ファイルシステムのマウント、孤立したリソースプールの抽象化に使用されます。

Ideas that in other init systems may be handled with one unified service definition can be broken out into component units according to their focus. This organizes by function and allows you to easily enable, disable, or extend functionality without modifying the core behavior of a unit.

他のinitシステムでは、1つの統一されたサービス定義で処理されていたアイデアが、焦点に応じてコンポーネントユニットに分割されます。これにより、機能別に整理され、ユニットのコアな動作を変更することなく、機能の有効化、無効化、拡張が容易になります。

この記事が気に入ったらサポートをしてみませんか?