LPIC-3: Virtualization and Containerization - Exam 305, version 3.0 Questions and Answers
Question 17
FILL BLANK
What command is used to run a process in a new Linux namespace? (Specify ONLY the command without any path or parameters.)
Options:
Answer:
Answer:
unshare
Explanation:
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
Question 18
Which command within virsh lists the virtual machines that are running on the current host?
Options:
A.
I view
B.
list-vm
C.
list
D.
show
E.
list-all
Answer:
C
Explanation:
Explanation:
The command virsh list is used to list all running domains (VMs) on the current host. The command virsh list --all can be used to list both active and inactive domains. The other options are not valid virsh commands. The command virsh list is a basic command that lists all running domains (VMs). You can also list all configured VMs by adding the --all option. This is useful if you want to see all VMs configured in the target hypervisor that you can use on subsequent commands1. References:
1: 8 Linux virsh subcommands for managing VMs on the command line | Enable Sysadmin.