← 返回命令列表

Linux command

containerd 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Start containerd

sudo containerd

Start with a specific configuration

sudo containerd --config [/etc/containerd/config.toml]

Start with debug logging

sudo containerd --log-level debug

Generate default configuration

containerd config default > [/etc/containerd/config.toml]

Check containerd version

containerd --version

Start with a specific root directory

sudo containerd --root [/var/lib/containerd]

说明

containerd is an industry-standard container runtime that manages the complete container lifecycle on a host system. It handles image transfer and storage, container execution and supervision, low-level storage, and network attachments. As a daemon, containerd provides a gRPC API for higher-level tools like Docker, Kubernetes, and nerdctl to interact with. It supports OCI (Open Container Initiative) images and runtime specifications, ensuring compatibility across the container ecosystem. containerd is designed to be embedded into larger systems rather than used directly by end users. Kubernetes uses containerd as its container runtime through the CRI (Container Runtime Interface), and Docker uses it as its core runtime engine.

参数

--config _FILE_
Path to configuration file (default: /etc/containerd/config.toml).
--root _DIR_
Root directory for containerd data.
--state _DIR_
State directory for containerd.
--address _SOCKET_
Address for containerd's gRPC socket.
--log-level _LEVEL_
Logging level: trace, debug, info, warn, error, fatal, panic.
config default
Output the default configuration to stdout.
config dump
Output the current configuration.
--version
Display version information.
--help
Display help information.

FAQ

What is the containerd command used for?

containerd is an industry-standard container runtime that manages the complete container lifecycle on a host system. It handles image transfer and storage, container execution and supervision, low-level storage, and network attachments. As a daemon, containerd provides a gRPC API for higher-level tools like Docker, Kubernetes, and nerdctl to interact with. It supports OCI (Open Container Initiative) images and runtime specifications, ensuring compatibility across the container ecosystem. containerd is designed to be embedded into larger systems rather than used directly by end users. Kubernetes uses containerd as its container runtime through the CRI (Container Runtime Interface), and Docker uses it as its core runtime engine.

How do I run a basic containerd example?

Run `sudo containerd` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --config _FILE_ do in containerd?

Path to configuration file (default: /etc/containerd/config.toml).