305-300 無料問題集「Lpi LPIC-3 Exam 305: Virtualization and Containerization」
FILL BLANK
What command is used to run a process in a new Linux namespace? (Specify ONLY the command without any path or parameters.)
What command is used to run a process in a new Linux namespace? (Specify ONLY the command without any path or parameters.)
正解:
unshare
Explanation
The unshare command is used to run a process in a new Linux namespace12. It takes one or more flags to specify which namespaces to create or unshare from the parent process1. For example, to run a shell in a new mount, network, and PID namespace, one can use:
unshare -mnp /bin/bash
References:
* 1: unshare(1) - Linux manual page - man7.org
* 2: A gentle introduction to namespaces in Linux - Packagecloud
Explanation
The unshare command is used to run a process in a new Linux namespace12. It takes one or more flags to specify which namespaces to create or unshare from the parent process1. For example, to run a shell in a new mount, network, and PID namespace, one can use:
unshare -mnp /bin/bash
References:
* 1: unshare(1) - Linux manual page - man7.org
* 2: A gentle introduction to namespaces in Linux - Packagecloud