305-300試験無料問題集「Lpi LPIC-3 Exam 305: Virtualization and Containerization 認定」
FILL BLANK
What LXC command starts a new process within a running LXC container? (Specify ONLY the command without any path or parameters.)
What LXC command starts a new process within a running LXC container? (Specify ONLY the command without any path or parameters.)
正解:
lxc-attach
Explanation
The lxc-attach command allows the user to start a new process within a running LXC container12. It takes the name of the container as an argument and optionally a command to execute inside the container. If no command is specified, it creates a new shell inside the container1. For example, to list all the files in the home directory of a container named myContainer, one can use:
lxc-attach -n myContainer - ls -lh /home
References:
* 1: Executing a command inside a running LXC - Unix & Linux Stack Exchange
Explanation
The lxc-attach command allows the user to start a new process within a running LXC container12. It takes the name of the container as an argument and optionally a command to execute inside the container. If no command is specified, it creates a new shell inside the container1. For example, to list all the files in the home directory of a container named myContainer, one can use:
lxc-attach -n myContainer - ls -lh /home
References:
* 1: Executing a command inside a running LXC - Unix & Linux Stack Exchange