[ man7.org ](../../../index.html) > Linux > [ man-pages ](../index.html) |  [ Linux/UNIX system programming training ](http://man7.org/training/)  
---|---  
  
* * *

#  n2(1) — Linux manual page

NAME  |  SYNOPSIS  |  DESCRIPTION  |  OPTIONS  |  EXIT STATUS  |  NOTES  |  EXAMPLES  |  AUTHORS  |  SEE ALSO  |  COLOPHON  |  |   
---|---|---  
      
    
    NSCREATE(1)                     User Commands                    NSCREATE(1)
    

##  NAME  top

    
    
           nscreate - run program in new namespaces
    

##  SYNOPSIS  top

    
    
           **nscreate**[options] [_program_ [_arguments_]]
    

##  DESCRIPTION  top

    
    
           The **nscreate** command creates new namespaces (as specified by the
           command-line options described below) and then executes the specified
           _program_ with arguments.
    
           **nsenter** provides two modes of operation.  The default mode uses the
           [clone(2)](../man2/clone.2.html) system call to create a child process that is placed in the
           new namespaces and which executes _program_.  The other mode, employed
           when the **--unshare** option is specified, uses [unshare(2)](../man2/unshare.2.html) to create the
           new namespaces and then directly executes _program_.
    
           By default, a new namespace remains in existence only as long as it
           has at least one member process.  A namespace can be made persistentâ
           that  is, pinned into existence even when it has no member processesâ
           by bind mounting the corresponding _/proc/PID/ns/ns-type_ file.
           **nscreate** provides command-line options to simplify the creation of
           such bind mounts.  A persistent namespace can later be entered using
           [nsenter(1)](../man1/nsenter.1.html), even after _program_ has terminated.  A persistent
           namespace can be unpinned by unmounting the bind mount.
    
           If _program_ is not supplied, then the program identified by the **SHELL**
           environment variable is run; if **SHELL** is not defined, then _/bin/sh_ is
           executed.
    
           The following types of namespaces can be created using **nscreate** :
    
           **cgroup namespace**
                  Cgroup namespaces virtualize the view of cgroups seen in
                  _/proc/[pid]/cgroup_ and _/proc/[pid]/mountinfo_.  For further
                  details, see [cgroup_namespaces(7)](../man7/cgroup_namespaces.7.html) and [cgroups(7)](../man7/cgroups.7.html).
    
           **IPC namespace**
                  Processes within an IPC namespace have private instances of
                  certain interprocess communication resources, namely System V
                  IPC objects (message queues, semaphores, shared memory) and
                  POSIX message queues.  For further details, see
                  [ipc_namespaces(7)](../man7/ipc_namespaces.7.html).
    
           **mount namespace**
                  Processes within a mount namespace share a set of mount
                  points.  Processes in different mount namespaces thus see
                  distinct single directory hierarchies.  Mounting and
                  unmounting filesystems in one mount namespace will not affect
                  processes in other mount namespaces, except where a mount
                  point has shared propagation.  For further details, see
                  [mount_namespaces(7)](../man7/mount_namespaces.7.html), [mount(2)](../man2/mount.2.html), [mount(8)](../man8/mount.8.html), and the kernel source
                  file _Documentation/filesystems/sharedsubtree.txt_.
    
           **network namespace**
                  Processes in a network network share private instances of
                  various networking resources, such as networking devices, IPv4
                  and IPv6 protocol stacks, routing tables, firewall rules, and
                  socket port numbers