← 返回命令列表

Linux command

genie 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize

genie -i

Example

genie -s

Example

genie -c [command]

说明

genie creates a "bottle" - a PID namespace with systemd running as PID 1 - inside Windows Subsystem for Linux (WSL). This enables running systemd-dependent services that would otherwise not work in WSL's default environment. WSL normally uses a Microsoft init system, which prevents systemd services from running. genie works around this by creating a namespace where systemd can run normally, then providing access to that environment. Initialize the bottle once per WSL session with -i, then use -s to enter or -c to run commands within the systemd environment.

参数

-i, --initialize
Initialize the bottle namespace for systemd
-s, --shell
Start a login shell inside the bottle
-c, --command _COMMAND_
Run a command inside the bottle and exit
-u, --user _USER_
Run as specified user (default: current user)
-v, --verbose
Enable verbose output

FAQ

What is the genie command used for?

genie creates a "bottle" - a PID namespace with systemd running as PID 1 - inside Windows Subsystem for Linux (WSL). This enables running systemd-dependent services that would otherwise not work in WSL's default environment. WSL normally uses a Microsoft init system, which prevents systemd services from running. genie works around this by creating a namespace where systemd can run normally, then providing access to that environment. Initialize the bottle once per WSL session with -i, then use -s to enter or -c to run commands within the systemd environment.

How do I run a basic genie example?

Run `genie -i` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -i, --initialize do in genie?

Initialize the bottle namespace for systemd