help.common revision 135996
150702Swpaul################################################################################ 250702Swpaul# Thelp DDisplay command help 350702Swpaul 450702Swpaul help [topic [subtopic]] 550702Swpaul help index 650702Swpaul 750702Swpaul The help command displays help on commands and their usage. 850702Swpaul 950702Swpaul In command help, a term enclosed with <...> indicates a value as 1050702Swpaul described by the term. A term enclosed with [...] is optional, 1150702Swpaul and may not be required by all forms of the command. 1250702Swpaul 1350702Swpaul Some commands may not be available. Use the '?' command to list 1450702Swpaul most available commands. 1550702Swpaul 1650702Swpaul################################################################################ 1750702Swpaul# T? DList available commands 1850702Swpaul 1950702Swpaul ? 2050702Swpaul 2150702Swpaul Lists all available commands. 2250702Swpaul 2350702Swpaul################################################################################ 2450702Swpaul# Tautoboot DBoot after a delay 2550702Swpaul 2650702Swpaul autoboot [<delay> [<prompt>]] 2750702Swpaul 2850702Swpaul Displays <prompt> or a default prompt, and counts down <delay> seconds 2950702Swpaul before attempting to boot. If <delay> is not specified, the default 3050702Swpaul value is 10. 3150702Swpaul 3250702Swpaul################################################################################ 3350702Swpaul# Tboot DBoot immediately 3450702Swpaul 3550702Swpaul boot [<kernelname>] [-<arg> ...] 3650702Swpaul 3750702Swpaul Boot the system. If arguments are specified, they are added to the 3850702Swpaul arguments for the kernel. If <kernelname> is specified, and a kernel 3950702Swpaul has not already been loaded, it will be booted instead of the default 4050702Swpaul kernel. 4150702Swpaul 4250702Swpaul################################################################################ 4350702Swpaul# Techo DEcho arguments 4450702Swpaul 4550702Swpaul echo [-n] [<message>] 4694149Swpaul 4750702Swpaul Emits <message>, with no trailing newline if -n is specified. This is 4850702Swpaul most useful in conjunction with scripts and the '@' line prefix. 4950702Swpaul 5050702Swpaul Variables are substituted by prefixing them with $, eg. 5194149Swpaul 5250702Swpaul echo Current device is $currdev 5394149Swpaul 5494149Swpaul will print the current device. 5594149Swpaul 5650702Swpaul################################################################################ 5750702Swpaul# Tload DLoad a kernel or module 5850702Swpaul 5950702Swpaul load [-t <type>] <filename> 6050702Swpaul 6150702Swpaul Loads the module contained in <filename> into memory. If no other 6250702Swpaul modules are loaded, <filename> must be a kernel or the command will 6392739Salfred fail. 6492739Salfred 6592739Salfred If -t is specified, the module is loaded as raw data of <type>, for 6650702Swpaul later use by the kernel or other modules. <type> may be any string. 6750702Swpaul 6850702Swpaul################################################################################ 6950702Swpaul# Tls DList files 7050702Swpaul 7150702Swpaul ls [-l] [<path>] 7250702Swpaul 7350702Swpaul Displays a listing of files in the directory <path>, or the root 7450702Swpaul directory of the current device if <path> is not specified. 7550702Swpaul 7650702Swpaul The -l argument displays file sizes as well; the process of obtaining 7750702Swpaul file sizes on some media may be very slow. 7850702Swpaul 7950702Swpaul################################################################################ 8050702Swpaul# Tlsdev DList devices 8150702Swpaul 8250702Swpaul lsdev [-v] 8350702Swpaul 8450702Swpaul List all of the devices from which it may be possible to load modules. 8550702Swpaul If -v is specified, print more details. 8692739Salfred 8794149Swpaul################################################################################ 8850702Swpaul# Tlsmod DList modules 8950702Swpaul 9050702Swpaul lsmod [-v] 9150702Swpaul 9250702Swpaul List loaded modules. If [-v] is specified, print more details. 9350702Swpaul 9450702Swpaul################################################################################ 9550702Swpaul# Tmore DPage files 9650702Swpaul 9750702Swpaul more <filename> [<filename> ...] 9894149Swpaul 9994149Swpaul Show contents of text files. When displaying the contents of more, 10094149Swpaul than one file, if the user elects to quit displaying a file, the 10194149Swpaul remaining files will not be shown. 10294149Swpaul 10394149Swpaul################################################################################ 10494149Swpaul# Tpnpscan DScan for PnP devices 10550702Swpaul 10650702Swpaul pnpscan [-v] 10750702Swpaul 10850702Swpaul Scan for Plug-and-Play devices. This command is normally automatically 10950702Swpaul run as part of the boot process, in order to dynamically load modules 11050702Swpaul required for system operation. 11150702Swpaul 11250702Swpaul If the -v argument is specified, details on the devices found will 11350702Swpaul be printed. 11450702Swpaul 11550702Swpaul################################################################################ 11650702Swpaul# Tset DSet a variable 11750702Swpaul 11850702Swpaul set <variable name> 11950702Swpaul set <variable name>=<value> 12050702Swpaul 12150702Swpaul The set command is used to set variables. 12250702Swpaul 12350702Swpaul################################################################################ 12450702Swpaul# Tset Sautoboot_delay DSet the default autoboot delay 12550702Swpaul 12650702Swpaul set autoboot_delay=<value> 12750702Swpaul 12850702Swpaul Sets the default delay for the autoboot command to <value> seconds. 12950702Swpaul 13050702Swpaul################################################################################ 13150702Swpaul# Tset Sbootfile DSet the default boot file set 13250702Swpaul 13350702Swpaul set bootfile=<filename>[;<filename>...] 13450702Swpaul 13550702Swpaul Sets the default set of kernel boot filename(s). It may be overridden 13650702Swpaul by setting the bootfile variable to a semicolon-separated list of 13750702Swpaul filenames, each of which will be searched for in the module_path 13850702Swpaul directories. The default bootfile set is "kernel". 13950702Swpaul 14050702Swpaul################################################################################ 14150702Swpaul# Tset Sboot_askname DPrompt for root device 14250702Swpaul 14350702Swpaul set boot_askname 14450702Swpaul 14550758Swpaul Instructs the kernel to prompt the user for the name of the root device 14650758Swpaul when the kernel is booted. 14750758Swpaul 14850758Swpaul################################################################################ 14950758Swpaul# Tset Sboot_cdrom DMount root file system from CD-ROM 15050758Swpaul 15150702Swpaul set boot_cdrom 15250702Swpaul 15350702Swpaul Instructs the kernel to try to mount the root file system from CD-ROM. 15450702Swpaul 15550702Swpaul################################################################################ 15650702Swpaul# Tset Sboot_ddb DDrop to the kernel debugger (DDB) 15750702Swpaul 15850702Swpaul set boot_ddb 15950702Swpaul 16050702Swpaul Instructs the kernel to start in the DDB debugger, rather than 16150702Swpaul proceeding to initialize when booted. 16250702Swpaul 16350702Swpaul################################################################################ 16450702Swpaul# Tset Sboot_gdb DSelect gdb-remote mode for the kernel debugger 16591343Sdanny 16650702Swpaul set boot_gdb 16750702Swpaul 16850702Swpaul Selects gdb-remote mode for the kernel debugger by default. 16950702Swpaul 17050702Swpaul################################################################################ 17150702Swpaul# Tset Sboot_multicons DUse multiple consoles 17250702Swpaul 17350702Swpaul set boot_multicons 17450702Swpaul 17550702Swpaul Enables multiple console support in the kernel early on boot. 17650702Swpaul In a running system, console configuration can be manipulated 17750702Swpaul by the conscontrol(8) utility. 17850702Swpaul 17950702Swpaul################################################################################ 18050702Swpaul# Tset Sboot_serial DUse serial console 18150702Swpaul 18250702Swpaul set boot_serial 18350702Swpaul 18450702Swpaul Force the use of a serial console even when an internal console 18550702Swpaul is present. 18650702Swpaul 18750702Swpaul################################################################################ 18850702Swpaul# Tset Sboot_single DStart system in single-user mode 18969925Swpaul 19050702Swpaul set boot_single 19150702Swpaul 19250702Swpaul Prevents the kernel from initiating a multi-user startup; instead, 19350702Swpaul a single-user mode will be entered when the kernel has finished 19450702Swpaul device probes. 19550702Swpaul 19684145Sjlemon################################################################################ 19750702Swpaul# Tset Sboot_verbose DVerbose boot messages 19850702Swpaul 19950702Swpaul set boot_verbose 20050702Swpaul 20150702Swpaul Setting this variable causes extra debugging information to be printed 20250702Swpaul by the kernel during the boot phase. 20350702Swpaul 20450702Swpaul################################################################################ 20550702Swpaul# Tset Sconsole DSet the current console 20650702Swpaul 20750702Swpaul set console[=<value>] 20850702Swpaul 20950702Swpaul Sets the current console. If <value> is omitted, a list of valid 21050702Swpaul consoles will be displayed. 21150702Swpaul 21250702Swpaul################################################################################ 21350702Swpaul# Tset Scurrdev DSet the current device 21450702Swpaul 21550702Swpaul set currdev=<device> 21650702Swpaul 21750702Swpaul Selects the default device. Syntax for devices is odd. 21850702Swpaul 21950702Swpaul################################################################################ 22050702Swpaul# Tset Sinit_path DSet the list of init candidates 22150702Swpaul 22250702Swpaul set init_path=<path>[:<path>...] 22350702Swpaul 22450702Swpaul Sets the list of binaries which the kernel will try to run as initial 22550702Swpaul process. 22650702Swpaul 22750702Swpaul 22850702Swpaul################################################################################ 22950702Swpaul# Tset Smodule_path DSet the module search path 23050702Swpaul 23150702Swpaul set module_path=<path>[;<path>...] 23250702Swpaul 23350702Swpaul Sets the list of directories which will be searched in for modules 23450702Swpaul named in a load command or implicitly required by a dependency. The 23550702Swpaul default module_path is "/boot/modules" with the kernel directory 23650702Swpaul prepended. 23750702Swpaul 23850702Swpaul################################################################################ 23950702Swpaul# Tset Sprompt DSet the command prompt 24050702Swpaul 24150702Swpaul set prompt=<value> 24250702Swpaul 24350702Swpaul The command prompt is displayed when the loader is waiting for input. 24450702Swpaul Variable substitution is performed on the prompt. The default 24550702Swpaul prompt can be set with: 24650702Swpaul 24750702Swpaul set prompt=\${interpret} 24850702Swpaul 24950702Swpaul################################################################################ 25050702Swpaul# Tset Srootdev DSet the root filesystem 25150702Swpaul 25250702Swpaul set rootdev=<path> 25384145Sjlemon 25450702Swpaul By default the value of $currdev is used to set the root filesystem 25584145Sjlemon when the kernel is booted. This can be overridden by setting 25684145Sjlemon $rootdev explicitly. 25750702Swpaul 25850702Swpaul################################################################################ 25950702Swpaul# Tset Stunables DSet kernel tunable values 26050702Swpaul 26150702Swpaul Various kernel tunable parameters can be overridden by specifying new 26250702Swpaul values in the environment. 26350702Swpaul 26450702Swpaul set kern.ipc.nmbclusters=<value> NMBCLUSTERS 26550702Swpaul 26694149Swpaul Set the number of mbuf clusters to be allocated. The value 26750702Swpaul cannot be set below the default determined when the kernel 26850702Swpaul was compiled. 26984145Sjlemon 27050702Swpaul set kern.ipc.nsfbufs=<value> NSFBUFS 27150702Swpaul 27294149Swpaul Set the number of sendfile buffers to be allocated. This 27394149Swpaul overrides the value determined when the kernel was compiled. 27494149Swpaul 27594149Swpaul set vm.kmem_size=<value> VM_KMEM_SIZE 27694149Swpaul 27794149Swpaul Sets the size of kernel memory (bytes). This overrides 27894149Swpaul the value determined when the kernel was compiled. 27994149Swpaul 28094149Swpaul set machdep.disable_mtrrs=1 28194149Swpaul 28294149Swpaul Disable the use of i686 MTRRs (i386 only) 28394149Swpaul 28494149Swpaul set net.inet.tcp.tcbhashsize=<value> TCBHASHSIZE 28594149Swpaul 28694149Swpaul Overrides the compile-time set value of TCBHASHSIZE or 28794149Swpaul the preset default of 512. Must be a power of 2. 28894149Swpaul 28994149Swpaul hw.syscons.sc_no_suspend_vtswitch=<value> 29094149Swpaul 29194149Swpaul Disable VT switching on suspend. 29294149Swpaul 29394149Swpaul value is 0 (default) or non-zero to enable. 29494149Swpaul 29594149Swpaul set hw.physmem=<value> MAXMEM (i386 only) 29694149Swpaul 29794149Swpaul Limits the amount of physical memory space available to 29894149Swpaul the system to <value> bytes. <value> may have a k, M or G 29994149Swpaul suffix to indicate kilobytes, megabytes and gigabytes 30094149Swpaul respectively. Note that the current i386 architecture 30194149Swpaul limits this value to 4GB. 30294149Swpaul 30394149Swpaul On systems where memory cannot be accurately probed, 30494149Swpaul this option provides a hint as to the actual size of 30594149Swpaul system memory (which will be tested before use). 30694149Swpaul 30794149Swpaul set hw.pci.enable_io_modes=<value> 30894149Swpaul 30994149Swpaul Enable PCI resources which are left off by some BIOSes 31094149Swpaul or are not enabled correctly by the device driver. 31194149Swpaul 31294149Swpaul value is 1 (default), but this may cause problems with 31394149Swpaul some peripherals. Set to 0 to disable. 31494149Swpaul 31594149Swpaul set vfs.root.mountdelay=<value> 31694149Swpaul 31794149Swpaul Delay root partition mount if there is no required provider. 31894149Swpaul 31994149Swpaul value is a maximum number of seconds to wait for provider to 32094149Swpaul show up (default is 5 seconds). 32194149Swpaul 32294149Swpaul################################################################################ 32394149Swpaul# Tshow DShow the values of variables 32494149Swpaul 32594149Swpaul show [<variable>] 32694149Swpaul 32794149Swpaul Displays the value of <variable>, or all variables if not specified. 32894149Swpaul Multiple paths can be separated with a semicolon. 32994149Swpaul 33094149Swpaul################################################################################ 33194149Swpaul# Tinclude DRead commands from a script file 33294149Swpaul 33394149Swpaul include <filename> [<filename> ...] 33494149Swpaul 33594149Swpaul The entire contents of <filename> are read into memory before executing 33694149Swpaul commands, so it is safe to source a file from removable media. 33794149Swpaul 33894149Swpaul################################################################################ 33994149Swpaul# Tread DRead input from the terminal 34094149Swpaul 34194149Swpaul read [-t <value>] [-p <prompt>] [<variable name>] 34294149Swpaul 34394149Swpaul The read command reads a line of input from the terminal. If the 34494149Swpaul -t argument is specified, it will return nothing if no input has been 34594149Swpaul received after <value> seconds. (Any keypress will cancel the 34694149Swpaul timeout). 34794149Swpaul 34894149Swpaul If -p is specified, <prompt> is printed before reading input. No 34994149Swpaul newline is emitted after the prompt. 35094149Swpaul 35194149Swpaul If a variable name is supplied, the variable is set to the value read, 35294149Swpaul less any terminating newline. 35394149Swpaul 35494149Swpaul################################################################################ 35594149Swpaul# Tunload DRemove all modules from memory 35694149Swpaul 35794149Swpaul unload 35894149Swpaul 35994149Swpaul This command removes any kernel and all loaded modules from memory. 36094149Swpaul 36194149Swpaul################################################################################ 36294149Swpaul# Tunset DUnset a variable 36394149Swpaul 36494149Swpaul unset <variable name> 36594149Swpaul 36694149Swpaul If allowed, the named variable's value is discarded and the variable 36794149Swpaul is removed. 36894149Swpaul 36994149Swpaul################################################################################ 37094149Swpaul