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
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit