-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproot.txt
143 lines (113 loc) · 5.12 KB
/
proot.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
proot 5.1.0: chroot, mount --bind, and binfmt_misc without privilege/setup.
Usage:
proot [option] ... [command]
Regular options:
-r *path*, --rootfs=*path*
Use *path* as the new guest root file-system, default is /.
The specified path typically contains a Linux distribution where
all new programs will be confined. The default rootfs is /
when none is specified, this makes sense when the bind mechanism
is used to relocate host files and directories, see the -b
option and the Examples section for details.
It is recommended to use the -R or -S options instead.
-b *path*, --bind=*path*, -m *path*, --mount=*path*
Make the content of *path* accessible in the guest rootfs.
This option makes any file or directory of the host rootfs
accessible in the confined environment just as if it were part of
the guest rootfs. By default the host path is bound to the same
path in the guest rootfs but users can specify any other location
with the syntax: -b *host_path*:*guest_location*. If the
guest location is a symbolic link, it is dereferenced to ensure
the new content is accessible through all the symbolic links that
point to the overlaid content. In most cases this default
behavior shouldn't be a problem, although it is possible to
explicitly not dereference the guest location by appending it the
! character: -b *host_path*:*guest_location!*.
-q *command*, --qemu=*command*
Execute guest programs through QEMU as specified by *command*.
Each time a guest program is going to be executed, PRoot inserts
the QEMU user-mode command in front of the initial request.
That way, guest programs actually run on a virtual guest CPU
emulated by QEMU user-mode. The native execution of host programs
is still effective and the whole host rootfs is bound to
/host-rootfs in the guest environment.
-w *path*, --pwd=*path*, --cwd=*path*
Set the initial working directory to *path*.
Some programs expect to be launched from a given directory but do
not perform any chdir by themselves. This option avoids the
need for running a shell and then entering the directory manually.
-v *value*, --verbose=*value*
Set the level of debug information to *value*.
The higher the integer value is, the more detailed debug
information is printed to the standard error stream. A negative
value makes PRoot quiet except on fatal errors.
-V, --version, --about
Print version, copyright, license and contact, then exit.
-h, --help, --usage
Print the version and the command-line usage, then exit.
Extension options:
-k *string*, --kernel-release=*string*
Make current kernel appear as kernel release *string*.
If a program is run on a kernel older than the one expected by its
GNU C library, the following error is reported: "FATAL: kernel too
old". To be able to run such programs, PRoot can emulate some of
the features that are available in the kernel release specified by
*string* but that are missing in the current kernel.
-0, --root-id
Make current user appear as "root" and fake its privileges.
Some programs will refuse to work if they are not run with "root"
privileges, even if there is no technical reason for that. This
is typically the case with package managers. This option allows
users to bypass this kind of limitation by faking the user/group
identity, and by faking the success of some operations like
changing the ownership of files, changing the root directory to
/, ... Note that this option is quite limited compared to
fakeroot.
-i *string*, --change-id=*string*
Make current user and group appear as *string* "uid:gid".
This option makes the current user and group appear as uid and
gid. Likewise, files actually owned by the current user and
group appear as if they were owned by uid and gid instead.
Note that the -0 option is the same as -i 0:0.
Alias options:
-R *path*
Alias: -r *path* + a couple of recommended -b.
Programs isolated in *path*, a guest rootfs, might still need to
access information about the host system, as it is illustrated in
the Examples section of the manual. These host information
are typically: user/group definition, network setup, run-time
information, users' files, ... On all Linux distributions, they
all lie in a couple of host files and directories that are
automatically bound by this option:
* /etc/host.conf
* /etc/hosts
* /etc/hosts.equiv
* /etc/mtab
* /etc/netgroup
* /etc/networks
* /etc/passwd
* /etc/group
* /etc/nsswitch.conf
* /etc/resolv.conf
* /etc/localtime
* /dev/
* /sys/
* /proc/
* /tmp/
* $HOME
-S *path*
Alias: -0 -r *path* + a couple of recommended -b.
This option is useful to safely create and install packages into
the guest rootfs. It is similar to the -R option expect it
enables the -0 option and binds only the following minimal set
of paths to avoid unexpected changes on host files:
* /etc/host.conf
* /etc/hosts
* /etc/nsswitch.conf
* /dev/
* /sys/
* /proc/
* /tmp/
* $HOME
Visit http://proot.me for help, bug reports, suggestions, patchs, ...
Copyright (C) 2014 STMicroelectronics, licensed under GPL v2 or later.