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