help.common revision 1.1.2.2 1 1.1.2.2 yamt ################################################################################
2 1.1.2.2 yamt # Thelp DDisplay command help
3 1.1.2.2 yamt
4 1.1.2.2 yamt help [topic [subtopic]]
5 1.1.2.2 yamt help index
6 1.1.2.2 yamt
7 1.1.2.2 yamt The help command displays help on commands and their usage.
8 1.1.2.2 yamt
9 1.1.2.2 yamt In command help, a term enclosed with <...> indicates a value as
10 1.1.2.2 yamt described by the term. A term enclosed with [...] is optional,
11 1.1.2.2 yamt and may not be required by all forms of the command.
12 1.1.2.2 yamt
13 1.1.2.2 yamt Some commands may not be available. Use the '?' command to list
14 1.1.2.2 yamt most available commands.
15 1.1.2.2 yamt
16 1.1.2.2 yamt ################################################################################
17 1.1.2.2 yamt # T? DList available commands
18 1.1.2.2 yamt
19 1.1.2.2 yamt ?
20 1.1.2.2 yamt
21 1.1.2.2 yamt Lists all available commands.
22 1.1.2.2 yamt
23 1.1.2.2 yamt ################################################################################
24 1.1.2.2 yamt # Tautoboot DBoot after a delay
25 1.1.2.2 yamt
26 1.1.2.2 yamt autoboot [<delay> [<prompt>]]
27 1.1.2.2 yamt
28 1.1.2.2 yamt Displays <prompt> or a default prompt, and counts down <delay> seconds
29 1.1.2.2 yamt before attempting to boot. If <delay> is not specified, the default
30 1.1.2.2 yamt value is 10.
31 1.1.2.2 yamt
32 1.1.2.2 yamt ################################################################################
33 1.1.2.2 yamt # Tboot DBoot immediately
34 1.1.2.2 yamt
35 1.1.2.2 yamt boot [<kernelname>] [-<arg> ...]
36 1.1.2.2 yamt
37 1.1.2.2 yamt Boot the system. If arguments are specified, they are added to the
38 1.1.2.2 yamt arguments for the kernel. If <kernelname> is specified, and a kernel
39 1.1.2.2 yamt has not already been loaded, it will be booted instead of the default
40 1.1.2.2 yamt kernel.
41 1.1.2.2 yamt
42 1.1.2.2 yamt ################################################################################
43 1.1.2.2 yamt # Tbcachestat DGet disk block cache stats
44 1.1.2.2 yamt
45 1.1.2.2 yamt bcachestat
46 1.1.2.2 yamt
47 1.1.2.2 yamt Displays statistics about disk cache usage. For depuration only.
48 1.1.2.2 yamt
49 1.1.2.2 yamt ################################################################################
50 1.1.2.2 yamt # Techo DEcho arguments
51 1.1.2.2 yamt
52 1.1.2.2 yamt echo [-n] [<message>]
53 1.1.2.2 yamt
54 1.1.2.2 yamt Emits <message>, with no trailing newline if -n is specified. This is
55 1.1.2.2 yamt most useful in conjunction with scripts and the '@' line prefix.
56 1.1.2.2 yamt
57 1.1.2.2 yamt Variables are substituted by prefixing them with $, eg.
58 1.1.2.2 yamt
59 1.1.2.2 yamt echo Current device is $currdev
60 1.1.2.2 yamt
61 1.1.2.2 yamt will print the current device.
62 1.1.2.2 yamt
63 1.1.2.2 yamt ################################################################################
64 1.1.2.2 yamt # Tload DLoad a kernel or module
65 1.1.2.2 yamt
66 1.1.2.2 yamt load [-t <type>] <filename>
67 1.1.2.2 yamt
68 1.1.2.2 yamt Loads the module contained in <filename> into memory. If no other
69 1.1.2.2 yamt modules are loaded, <filename> must be a kernel or the command will
70 1.1.2.2 yamt fail.
71 1.1.2.2 yamt
72 1.1.2.2 yamt If -t is specified, the module is loaded as raw data of <type>, for
73 1.1.2.2 yamt later use by the kernel or other modules. <type> may be any string.
74 1.1.2.2 yamt
75 1.1.2.2 yamt ################################################################################
76 1.1.2.2 yamt # Tls DList files
77 1.1.2.2 yamt
78 1.1.2.2 yamt ls [-l] [<path>]
79 1.1.2.2 yamt
80 1.1.2.2 yamt Displays a listing of files in the directory <path>, or the root
81 1.1.2.2 yamt directory of the current device if <path> is not specified.
82 1.1.2.2 yamt
83 1.1.2.2 yamt The -l argument displays file sizes as well; the process of obtaining
84 1.1.2.2 yamt file sizes on some media may be very slow.
85 1.1.2.2 yamt
86 1.1.2.2 yamt ################################################################################
87 1.1.2.2 yamt # Tlsdev DList devices
88 1.1.2.2 yamt
89 1.1.2.2 yamt lsdev [-v]
90 1.1.2.2 yamt
91 1.1.2.2 yamt List all of the devices from which it may be possible to load modules.
92 1.1.2.2 yamt If -v is specified, print more details.
93 1.1.2.2 yamt
94 1.1.2.2 yamt ################################################################################
95 1.1.2.2 yamt # Tlsmod DList modules
96 1.1.2.2 yamt
97 1.1.2.2 yamt lsmod [-v]
98 1.1.2.2 yamt
99 1.1.2.2 yamt List loaded modules. If [-v] is specified, print more details.
100 1.1.2.2 yamt
101 1.1.2.2 yamt ################################################################################
102 1.1.2.2 yamt # Tmore DPage files
103 1.1.2.2 yamt
104 1.1.2.2 yamt more <filename> [<filename> ...]
105 1.1.2.2 yamt
106 1.1.2.2 yamt Show contents of text files. When displaying the contents of more,
107 1.1.2.2 yamt than one file, if the user elects to quit displaying a file, the
108 1.1.2.2 yamt remaining files will not be shown.
109 1.1.2.2 yamt
110 1.1.2.2 yamt ################################################################################
111 1.1.2.2 yamt # Tpnpscan DScan for PnP devices
112 1.1.2.2 yamt
113 1.1.2.2 yamt pnpscan [-v]
114 1.1.2.2 yamt
115 1.1.2.2 yamt Scan for Plug-and-Play devices. This command is normally automatically
116 1.1.2.2 yamt run as part of the boot process, in order to dynamically load modules
117 1.1.2.2 yamt required for system operation.
118 1.1.2.2 yamt
119 1.1.2.2 yamt If the -v argument is specified, details on the devices found will
120 1.1.2.2 yamt be printed.
121 1.1.2.2 yamt
122 1.1.2.2 yamt ################################################################################
123 1.1.2.2 yamt # Tset DSet a variable
124 1.1.2.2 yamt
125 1.1.2.2 yamt set <variable name>
126 1.1.2.2 yamt set <variable name>=<value>
127 1.1.2.2 yamt
128 1.1.2.2 yamt The set command is used to set variables.
129 1.1.2.2 yamt
130 1.1.2.2 yamt ################################################################################
131 1.1.2.2 yamt # Tset Sautoboot_delay DSet the default autoboot delay
132 1.1.2.2 yamt
133 1.1.2.2 yamt set autoboot_delay=<value>
134 1.1.2.2 yamt
135 1.1.2.2 yamt Sets the default delay for the autoboot command to <value> seconds.
136 1.1.2.2 yamt
137 1.1.2.2 yamt ################################################################################
138 1.1.2.2 yamt # Tset Sbootfile DSet the default boot file set
139 1.1.2.2 yamt
140 1.1.2.2 yamt set bootfile=<filename>[;<filename>...]
141 1.1.2.2 yamt
142 1.1.2.2 yamt Sets the default set of kernel boot filename(s). It may be overridden
143 1.1.2.2 yamt by setting the bootfile variable to a semicolon-separated list of
144 1.1.2.2 yamt filenames, each of which will be searched for in the module_path
145 1.1.2.2 yamt directories. The default bootfile set is "kernel".
146 1.1.2.2 yamt
147 1.1.2.2 yamt ################################################################################
148 1.1.2.2 yamt # Tset Sboot_askname DPrompt for root device
149 1.1.2.2 yamt
150 1.1.2.2 yamt set boot_askname
151 1.1.2.2 yamt
152 1.1.2.2 yamt Instructs the kernel to prompt the user for the name of the root device
153 1.1.2.2 yamt when the kernel is booted.
154 1.1.2.2 yamt
155 1.1.2.2 yamt ################################################################################
156 1.1.2.2 yamt # Tset Sboot_cdrom DMount root file system from CD-ROM
157 1.1.2.2 yamt
158 1.1.2.2 yamt set boot_cdrom
159 1.1.2.2 yamt
160 1.1.2.2 yamt Instructs the kernel to try to mount the root file system from CD-ROM.
161 1.1.2.2 yamt
162 1.1.2.2 yamt ################################################################################
163 1.1.2.2 yamt # Tset Sboot_ddb DDrop to the kernel debugger (DDB)
164 1.1.2.2 yamt
165 1.1.2.2 yamt set boot_ddb
166 1.1.2.2 yamt
167 1.1.2.2 yamt Instructs the kernel to start in the DDB debugger, rather than
168 1.1.2.2 yamt proceeding to initialize when booted.
169 1.1.2.2 yamt
170 1.1.2.2 yamt ################################################################################
171 1.1.2.2 yamt # Tset Sboot_gdb DSelect gdb-remote mode for the kernel debugger
172 1.1.2.2 yamt
173 1.1.2.2 yamt set boot_gdb
174 1.1.2.2 yamt
175 1.1.2.2 yamt Selects gdb-remote mode for the kernel debugger by default.
176 1.1.2.2 yamt
177 1.1.2.2 yamt ################################################################################
178 1.1.2.2 yamt # Tset Sboot_multicons DUse multiple consoles
179 1.1.2.2 yamt
180 1.1.2.2 yamt set boot_multicons
181 1.1.2.2 yamt
182 1.1.2.2 yamt Enables multiple console support in the kernel early on boot.
183 1.1.2.2 yamt In a running system, console configuration can be manipulated
184 1.1.2.2 yamt by the conscontrol(8) utility.
185 1.1.2.2 yamt
186 1.1.2.2 yamt ################################################################################
187 1.1.2.2 yamt # Tset Sboot_serial DUse serial console
188 1.1.2.2 yamt
189 1.1.2.2 yamt set boot_serial
190 1.1.2.2 yamt
191 1.1.2.2 yamt Force the use of a serial console even when an internal console
192 1.1.2.2 yamt is present.
193 1.1.2.2 yamt
194 1.1.2.2 yamt ################################################################################
195 1.1.2.2 yamt # Tset Sboot_single DStart system in single-user mode
196 1.1.2.2 yamt
197 1.1.2.2 yamt set boot_single
198 1.1.2.2 yamt
199 1.1.2.2 yamt Prevents the kernel from initiating a multi-user startup; instead,
200 1.1.2.2 yamt a single-user mode will be entered when the kernel has finished
201 1.1.2.2 yamt device probes.
202 1.1.2.2 yamt
203 1.1.2.2 yamt ################################################################################
204 1.1.2.2 yamt # Tset Sboot_verbose DVerbose boot messages
205 1.1.2.2 yamt
206 1.1.2.2 yamt set boot_verbose
207 1.1.2.2 yamt
208 1.1.2.2 yamt Setting this variable causes extra debugging information to be printed
209 1.1.2.2 yamt by the kernel during the boot phase.
210 1.1.2.2 yamt
211 1.1.2.2 yamt ################################################################################
212 1.1.2.2 yamt # Tset Sconsole DSet the current console
213 1.1.2.2 yamt
214 1.1.2.2 yamt set console[=<value>]
215 1.1.2.2 yamt
216 1.1.2.2 yamt Sets the current console. If <value> is omitted, a list of valid
217 1.1.2.2 yamt consoles will be displayed.
218 1.1.2.2 yamt
219 1.1.2.2 yamt ################################################################################
220 1.1.2.2 yamt # Tset Scurrdev DSet the current device
221 1.1.2.2 yamt
222 1.1.2.2 yamt set currdev=<device>
223 1.1.2.2 yamt
224 1.1.2.2 yamt Selects the default device. Syntax for devices is odd.
225 1.1.2.2 yamt
226 1.1.2.2 yamt ################################################################################
227 1.1.2.2 yamt # Tset Sinit_path DSet the list of init candidates
228 1.1.2.2 yamt
229 1.1.2.2 yamt set init_path=<path>[:<path>...]
230 1.1.2.2 yamt
231 1.1.2.2 yamt Sets the list of binaries which the kernel will try to run as initial
232 1.1.2.2 yamt process.
233 1.1.2.2 yamt
234 1.1.2.2 yamt
235 1.1.2.2 yamt ################################################################################
236 1.1.2.2 yamt # Tset Smodule_path DSet the module search path
237 1.1.2.2 yamt
238 1.1.2.2 yamt set module_path=<path>[;<path>...]
239 1.1.2.2 yamt
240 1.1.2.2 yamt Sets the list of directories which will be searched in for modules
241 1.1.2.2 yamt named in a load command or implicitly required by a dependency. The
242 1.1.2.2 yamt default module_path is "/boot/modules" with the kernel directory
243 1.1.2.2 yamt prepended.
244 1.1.2.2 yamt
245 1.1.2.2 yamt ################################################################################
246 1.1.2.2 yamt # Tset Sprompt DSet the command prompt
247 1.1.2.2 yamt
248 1.1.2.2 yamt set prompt=<value>
249 1.1.2.2 yamt
250 1.1.2.2 yamt The command prompt is displayed when the loader is waiting for input.
251 1.1.2.2 yamt Variable substitution is performed on the prompt. The default
252 1.1.2.2 yamt prompt can be set with:
253 1.1.2.2 yamt
254 1.1.2.2 yamt set prompt=\${interpret}
255 1.1.2.2 yamt
256 1.1.2.2 yamt ################################################################################
257 1.1.2.2 yamt # Tset Srootdev DSet the root filesystem
258 1.1.2.2 yamt
259 1.1.2.2 yamt set rootdev=<path>
260 1.1.2.2 yamt
261 1.1.2.2 yamt By default the value of $currdev is used to set the root filesystem
262 1.1.2.2 yamt when the kernel is booted. This can be overridden by setting
263 1.1.2.2 yamt $rootdev explicitly.
264 1.1.2.2 yamt
265 1.1.2.2 yamt ################################################################################
266 1.1.2.2 yamt # Tset Stunables DSet kernel tunable values
267 1.1.2.2 yamt
268 1.1.2.2 yamt Various kernel tunable parameters can be overridden by specifying new
269 1.1.2.2 yamt values in the environment.
270 1.1.2.2 yamt
271 1.1.2.2 yamt set kern.ipc.nmbclusters=<value> NMBCLUSTERS
272 1.1.2.2 yamt
273 1.1.2.2 yamt Set the number of mbuf clusters to be allocated. The value
274 1.1.2.2 yamt cannot be set below the default determined when the kernel
275 1.1.2.2 yamt was compiled.
276 1.1.2.2 yamt
277 1.1.2.2 yamt set kern.ipc.nsfbufs=<value> NSFBUFS
278 1.1.2.2 yamt
279 1.1.2.2 yamt Set the number of sendfile buffers to be allocated. This
280 1.1.2.2 yamt overrides the value determined when the kernel was compiled.
281 1.1.2.2 yamt
282 1.1.2.2 yamt set vm.kmem_size=<value> VM_KMEM_SIZE
283 1.1.2.2 yamt
284 1.1.2.2 yamt Sets the size of kernel memory (bytes). This overrides
285 1.1.2.2 yamt the value determined when the kernel was compiled.
286 1.1.2.2 yamt
287 1.1.2.2 yamt set machdep.disable_mtrrs=1
288 1.1.2.2 yamt
289 1.1.2.2 yamt Disable the use of i686 MTRRs (i386 only)
290 1.1.2.2 yamt
291 1.1.2.2 yamt set net.inet.tcp.tcbhashsize=<value> TCBHASHSIZE
292 1.1.2.2 yamt
293 1.1.2.2 yamt Overrides the compile-time set value of TCBHASHSIZE or
294 1.1.2.2 yamt the preset default of 512. Must be a power of 2.
295 1.1.2.2 yamt
296 1.1.2.2 yamt hw.syscons.sc_no_suspend_vtswitch=<value>
297 1.1.2.2 yamt
298 1.1.2.2 yamt Disable VT switching on suspend.
299 1.1.2.2 yamt
300 1.1.2.2 yamt value is 0 (default) or non-zero to enable.
301 1.1.2.2 yamt
302 1.1.2.2 yamt set hw.physmem=<value> MAXMEM (i386 only)
303 1.1.2.2 yamt
304 1.1.2.2 yamt Limits the amount of physical memory space available to
305 1.1.2.2 yamt the system to <value> bytes. <value> may have a k, M or G
306 1.1.2.2 yamt suffix to indicate kilobytes, megabytes and gigabytes
307 1.1.2.2 yamt respectively. Note that the current i386 architecture
308 1.1.2.2 yamt limits this value to 4GB.
309 1.1.2.2 yamt
310 1.1.2.2 yamt On systems where memory cannot be accurately probed,
311 1.1.2.2 yamt this option provides a hint as to the actual size of
312 1.1.2.2 yamt system memory (which will be tested before use).
313 1.1.2.2 yamt
314 1.1.2.2 yamt set hw.{acpi,pci}.host_start_mem=<value>
315 1.1.2.2 yamt
316 1.1.2.2 yamt Sets the lowest address that the pci code will assign
317 1.1.2.2 yamt when it doesn't have other information about the address
318 1.1.2.2 yamt to assign (like from a pci bridge). This is only useful
319 1.1.2.2 yamt in older systems without a pci bridge. Also, it only
320 1.1.2.2 yamt impacts devices that the BIOS doesn't assign to, typically
321 1.1.2.2 yamt CardBus bridges. The default <value> is 0x80000000, but
322 1.1.2.2 yamt some systems need values like 0xf0000000, 0xfc000000 or
323 1.1.2.2 yamt 0xfe000000 may be suitable for older systems (the older
324 1.1.2.2 yamt the system, the higher the number typically should be).
325 1.1.2.2 yamt
326 1.1.2.2 yamt set hw.pci.enable_io_modes=<value>
327 1.1.2.2 yamt
328 1.1.2.2 yamt Enable PCI resources which are left off by some BIOSes
329 1.1.2.2 yamt or are not enabled correctly by the device driver.
330 1.1.2.2 yamt
331 1.1.2.2 yamt value is 1 (default), but this may cause problems with
332 1.1.2.2 yamt some peripherals. Set to 0 to disable.
333 1.1.2.2 yamt
334 1.1.2.2 yamt ################################################################################
335 1.1.2.2 yamt # Tshow DShow the values of variables
336 1.1.2.2 yamt
337 1.1.2.2 yamt show [<variable>]
338 1.1.2.2 yamt
339 1.1.2.2 yamt Displays the value of <variable>, or all variables if not specified.
340 1.1.2.2 yamt Multiple paths can be separated with a semicolon.
341 1.1.2.2 yamt
342 1.1.2.2 yamt ################################################################################
343 1.1.2.2 yamt # Tinclude DRead commands from a script file
344 1.1.2.2 yamt
345 1.1.2.2 yamt include <filename> [<filename> ...]
346 1.1.2.2 yamt
347 1.1.2.2 yamt The entire contents of <filename> are read into memory before executing
348 1.1.2.2 yamt commands, so it is safe to source a file from removable media.
349 1.1.2.2 yamt
350 1.1.2.2 yamt ################################################################################
351 1.1.2.2 yamt # Tread DRead input from the terminal
352 1.1.2.2 yamt
353 1.1.2.2 yamt read [-t <value>] [-p <prompt>] [<variable name>]
354 1.1.2.2 yamt
355 1.1.2.2 yamt The read command reads a line of input from the terminal. If the
356 1.1.2.2 yamt -t argument is specified, it will return nothing if no input has been
357 1.1.2.2 yamt received after <value> seconds. (Any keypress will cancel the
358 1.1.2.2 yamt timeout).
359 1.1.2.2 yamt
360 1.1.2.2 yamt If -p is specified, <prompt> is printed before reading input. No
361 1.1.2.2 yamt newline is emitted after the prompt.
362 1.1.2.2 yamt
363 1.1.2.2 yamt If a variable name is supplied, the variable is set to the value read,
364 1.1.2.2 yamt less any terminating newline.
365 1.1.2.2 yamt
366 1.1.2.2 yamt ################################################################################
367 1.1.2.2 yamt # Tunload DRemove all modules from memory
368 1.1.2.2 yamt
369 1.1.2.2 yamt unload
370 1.1.2.2 yamt
371 1.1.2.2 yamt This command removes any kernel and all loaded modules from memory.
372 1.1.2.2 yamt
373 1.1.2.2 yamt ################################################################################
374 1.1.2.2 yamt # Tunset DUnset a variable
375 1.1.2.2 yamt
376 1.1.2.2 yamt unset <variable name>
377 1.1.2.2 yamt
378 1.1.2.2 yamt If allowed, the named variable's value is discarded and the variable
379 1.1.2.2 yamt is removed.
380 1.1.2.2 yamt
381 1.1.2.2 yamt ################################################################################
382