unshare
Execute a command in new user-defined namespaces. More information: https://www.kernel.org/doc/html/latest/userspace-api/unshare.html.
-
Execute a command without sharing access to connected networks:
unshare --net {{command}} {{command_arguments}}
-
Execute a command as a child process without sharing mounts, processes, or networks:
unshare --mount --pid --net --fork {{command}} {{command_arguments}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.