-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnsdo.1
22 lines (22 loc) · 1.22 KB
/
nsdo.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.TH nsdo 1 2020-01-23
.SH NAME
nsdo \- run a command in a network namespace
.SH SYNOPSIS
.B nsdo
.I namespace command
[\fIargs\fR ...]
.PP
.B nsdo
{ --version | -V }
.SH DESCRIPTION
Execute \fIcommand\fR as the current user/group in \fInamespace\fR, a Linux network namespace set up with the accompanying \fBnetns\fR script or \fBiproute2\fR (see \fBip-netns(8)\fR).
.PP
By default, \fBnetns\fR and \fBiproute2\fR place network namespaces in /var/run/netns/, so \fBnsdo\fR searces for namespaces there (including \fInamespace\fR). \fBnetns\fR also places mount namespaces in /var/run/mountns/ corresponding to those in /var/run/netns/, so in addition to the network namespace, \fBnsdo\fR will enter into a corresponding mount namespace if it exists. This way, files in /var/ns-etc/NSNAME/ will show up at /etc/ for applications run using nsdo NSNAME; this notably includes resolv.conf.
.PP
To prevent \fIcommand\fR from easily escaping the namespace 'jail,' \fBnsdo\fR will exit if the current namespace exists in that directory.
Consequently, you can not nest instances of \fBnsdo\fR.
.SH OPTIONS
.IP "--version, -V"
Instead of running a command, print \fBnsdo\fR's version and exit.
.SH SEE ALSO
.B ip(8), ip-netns(8), namespaces(7), nsenter(1)