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