xref: /freebsd/usr.sbin/jail/jail.8 (revision 4cf49a43559ed9fdad601bdcccd2c55963008675)
1.\"
2.\"----------------------------------------------------------------------------
3.\""THE BEER-WARE LICENSE" (Revision 42):
4.\"<phk@FreeBSD.ORG> wrote this file.  As long as you retain this notice you
5.\"can do whatever you want with this stuff. If we meet some day, and you think
6.\"this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7.\"----------------------------------------------------------------------------
8.\"
9.\"$FreeBSD$
10.\"
11.\"
12.Dd April 28, 1999
13.Dt JAIL 8
14.Os FreeBSD 4.0
15.Sh NAME
16.Nm jail
17.Nd imprison process and its descendants
18.Sh SYNOPSIS
19.Nm jail
20.Ar path
21.Ar hostname
22.Ar ip-number
23.Ar command
24.Ar ...
25.Sh DESCRIPTION
26The
27.Nm
28command imprisons a process and all future decendants.
29.Pp
30Please see the
31.Xr jail 2
32man page for further details.
33.Sh EXAMPLES
34This shows how to setup a jail directory tree:
35.Bd -literal
36D=/here/is/the/jail
37cd /usr/src
38make hierarchy DESTDIR=$D
39make obj
40make all
41make install DESTDIR=$D
42cd etc
43make distribution DESTDIR=$D
44cd $D/dev
45sh MAKEDEV jail
46cd $D
47ln -sf dev/null kernel
48echo "proc $D/proc procfs rw 0 0" >> /etc/fstab
49.Ed
50.Sh SEE ALSO
51.Xr chroot 2 ,
52.Xr jail 2
53.Sh HISTORY
54The
55.Fn jail
56function call appeared in
57.Fx 4.0 .
58.Pp
59The jail feature was written by Poul-Henning Kamp for
60R&D Associates
61.Dq Li http://www.rndassociates.com/
62who contributed it to FreeBSD.
63