Page MenuHomeFreeBSD

D40831.id124113.diff
No OneTemporary

D40831.id124113.diff

diff --git a/usr.sbin/jexec/jexec.8 b/usr.sbin/jexec/jexec.8
--- a/usr.sbin/jexec/jexec.8
+++ b/usr.sbin/jexec/jexec.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 24, 2016
+.Dd July 1, 2023
.Dt JEXEC 8
.Os
.Sh NAME
@@ -67,6 +67,33 @@
.Ar command
should run.
.El
+.Sh EXAMPLES
+.Ss Example 1 : Open a shell in a jail
+The following command specifies a jail by its name and utilizes the current
+user's shell:
+.Pp
+.Dl # jexec name
+.Pp
+Its also possible to specify a jail by is jid:
+.Pp
+.Dl # jexec JID
+.Ss Example 2 : Run a single command without opening a shell
+The following example shows the output of the
+.Xr uname 1 command without opening any shell:
+.Pp
+.Dl # jexec name uname -a
+.Ss Example 3 : Open a shell in a jail with a clean environment
+The following command opens a
+.Xr sh 1 shell in a jail with a clean environment:
+.Pp
+.Dl # jexec -l name sh
+.Ss Example 4 : Open a shell in a jail with login(1)
+The following command utilizes
+.Xr login 1 to access the jail, submitting an audit record, and displaying the
+user's last login, system copyright, and
+.Xr motd 5 message:
+.Pp
+.Dl # jexec -l name login -f root
.Sh SEE ALSO
.Xr jail_attach 2 ,
.Xr jail 8 ,

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 8, 7:21 PM (19 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28488194
Default Alt Text
D40831.id124113.diff (1 KB)

Event Timeline