Jump to content

SHUTDOWN (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article SHUTDOWN (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20253 sources
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsSystem configuration for DOS and OS/2

CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This plain ASCII text document contains setup instructions accessible to users that are interpreted by the operating system's DOS BIOS—commonly within IBMBIO.COM or IO.SYS—during the system startup process. CONFIG.SYS was first implemented in DOS version 2.0.

Usage

The directives within CONFIG.SYS configure DOS components such as hardware devices, applications, and memory management settings. Once CONFIG.SYS has been processed, DOS initiates the command interpreter defined by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

This file predominantly contains name=value entries that set adjustable parameters or load essential files like device drivers and terminate-and-stay-resident programs (TSRs). In DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.

Certain DOS variants prioritize alternative filenames over CONFIG.SYS:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 search for CCONFIG.SYS or CCONFIG.INI (the latter specific to Multiuser DOS) instead of CONFIG.SYS. These platforms maintain supplementary configuration data within a binary file called CCONFIG.BIN, which is typically edited using CONFIG.EXE.

- In DR DOS versions 3.31 and later, DCONFIG.SYS supersedes CONFIG.SYS, a feature beneficial for disk compression utilities and multi-boot environments. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS releases check for DRCONFIG.SYS.

- Starting with DR-DOS 6.0, users can alter default system file extensions via SYS /DR:ext, enabling multiple concurrent sets of system files managed by boot loaders such as LOADER. The SHELL command can also specify alternate AUTOEXEC.BAT filenames, with COMMAND.COM allowing extensions other than ".BAT" in these cases.

- Furthermore, DR-DOS supports a CHAIN=filespec directive that permits sequential processing of additional configuration files, optionally including a label parameter to jump directly to a specific section.

Other DOS derivatives incorporate comparable features:

- FDCONFIG.SYS is used by FreeDOS, - RXCONFIG.SYS applies to RxDOS 7.24 and newer versions, - CONFIG.PTS is utilized by PTS-DOS.

Within Windows 95 and 98, both CONFIG.SYS and AUTOEXEC.BAT exist but are generally left empty. Windows Me no longer processes CONFIG.SYS during startup; instead, it loads environment variables from the registry path:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

In contrast, under FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded at boot time.

Example

Below is a sample CONFIG.SYS configuration for MS-DOS 5: <syntaxhighlight lang="ini" line="1"> DOS=HIGH,UMB DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE RAM DEVICEHIGH=C:\DOS\ANSI.SYS FILES=30 SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P </syntaxhighlight>

:;*?!

Marks labels within CONFIG.SYS to serve as jump points for , , , , and commands.
Functions similarly to , also used for inline comments following other commands. (Note: In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
Indicates inline comments as an alternative to ;.
Prompts with a Yes/No confirmation before executing subsequent CONFIG.SYS instructions.[1] FreeDOS offers optional conditional execution via boot menus but does not support messages. (DOS 6.0+ provides a comparable feature by appending after directives, e.g., .)
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Configures which drives maintain file access timestamps within FAT file systems.
Enables conditional commands on AT-compatible hardware.
Manages the boot process.
Adjusts the verbosity level of error messages.
Alters the default internal serial driver used for the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a beep sound even if notification sounds are disabled.
Specifies the operating system to boot on the next startup.
Enables or disables extended Ctrl+C interrupt checking.
Defines how many disk buffers should be allocated.
Explicitly loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Regulates cache block allocation and flush timing.
Executes programs listed in CONFIG.SYS in the foreground, pausing further processing until completion.
Sets the Caps Lock key status on the keyboard.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver parameters and buffer sizes.
Continues processing CONFIG.SYS from another file or label.
, CLS, CODEPAGE (PTS-DOS or OS/2 only)
Manage system clock type, screen clearing, and OEM codepage settings.
, COLOR (PTS-DOS only)
Adjusts CMOS RAM address settings and boot menu color schemes.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Defines count, order, I/O addresses, and timeout values for COM ports.
, COMMENT(S) (various DOS versions)
Sets DMA buffer parameters and redefines inline comment characters or specifies lines to ignore.
(DOS 3.0+)
Activates and configures international language support features.
, CPSW (DR-DOS/MS-DOS versions)
Supports cursor positioning and codepage switching functionalities.
CPU*, CPU286*, CPU386*, CPU486* (PTS-DOS and DR-DOS)
Conditional execution directives based on CPU type or generation.

This summary outlines essential CONFIG.SYS commands pertinent to configuring and optimizing DOS systems, with an emphasis on directives that affect device handling, memory management, and boot procedures critical for business environments.

DTemplate:NbndF

Sets relocation parameters for drive descriptor tables.
Defines the memory segment limit up to which multi-sector disk data deblocking is permitted.
Activates internal debugger capabilities.
Controls the boot manager functions.
Loads a device driver into conventional memory.
Loads a device driver into upper memory area (equivalent to in DRDOS 5.0).
Configures country-specific and codepage information for keyboard, screen, and printer devices.
Specifies cache memory size allocations.
Sets compatibility mode for floppy disk drives.
Determines font used for display output.
Manages loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory blocks.
Specifies an alternate directory path for DOS files.
Defines search paths for data files used by DOS utilities.
Specifies physical parameters for disk drives connected to the system.
Establishes configuration parameters for unrecognized or unknown drives.
See .
Enables creation of PDUMP.nnn error log files on a specified drive.
Displays a message directly on the screen during startup or processing.
Outputs messages using ANSI escape sequences for enhanced formatting.
Adds extra validation checks when initiating programs.
Sets an assumed error or return code for subsequent operations.
Controls the state of the A20 address line when launching programs.
Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives.
Defines hash table size to optimize file open operations (varies from MS-DOS/PC DOS FASTOPEN driver behavior).
Specifies how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads these into upper memory area instead of conventional memory.
Boot manager functionality control.
Sets maximum number of files that can be opened concurrently by the system.
Similar to FILES but loads file handle structures into upper memory blocks.
Includes execution of specific subsections within CONFIG.SYS files (refer to IGNORE directive).

GTemplate:NbndI

Waits for a key press or timeout, returning the error level as the ASCII value of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS execution at a specified label, then returns to the previous point.
Refer to , , or for additional details.
See also .
Consult for related information.
Refer to or for further context.
Additional information available under or .
See .
Loads a TSR program into memory similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
Related commands include , , or .
See also .
Refer to or for more details.
Activates console and command-line history buffer with enhanced pattern search capabilities.
Defines the segment address for High Memory Area (HMA).
Configures energy-saving mode using HLT instruction.
Determines whether the system scans for boot sector viruses.
Loads installable file system drivers.
Prevents execution of specific CONFIG.SYS subsections.
Specifies programs authorized to run at ring 2 level, allowing direct hardware I/O access.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
Sets the status of keyboard Insert mode.
Installs a TSR program into memory.
Loads TSR programs into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR after relocating DOS data segment (see INSTCDEX for comparison).
Adjusts PIC interrupt priorities, assigning highest priority to the specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the address of the relocated keyboard buffer in memory.
Establishes the maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
Specifies paths where DLLs are searched for.
Configures behavior for legacy applications.
Sets the number of file locks permitted.
Manages boot logo display when using PTS-DOS boot manager.
Configures count, order, I/O address, and timeout parameters for LPT1 device.[2]
Defines similar parameters for LPT2 device.[2]
Specifies configuration details for LPT3 device.[2]
Enables and sets up LPT4 device with comparable options.
Determines time before a waiting process is promoted in priority scheduling.
Sets memory allocation methods and strategies.
Specifies default memory allocation policy used by DOS.
Defines available menu options within CONFIG.SYS.
Sets color schemes for menus, which can be simulated under DR-DOS environments.
Specifies default menu block, emulatable on DR-DOS systems.
Defines individual menu blocks with DR-DOS emulation support.
Enables multitrack disk operation functionality.
Continues processing CONFIG.SYS from an external file, optionally loading a device driver and setting the %NEWFILE% environment variable.[3]

NTemplate:NbndQ

Sets default character used as No () option in Yes/No/Resume prompts.
Enables or disables keyboard [[Num Lock|Template:Keypress]] state at startup.
Allows conditional execution based on previous error code, e.g., .
Displays text and waits for a key press, similar to and commands in DR-DOS systems.
Requires user confirmation upon encountering errors in CONFIG.SYS processing.
Configures buffer sizes for LPT1 through LPT3 devices.
Enables conditional execution on PC-compatible hardware platforms.
Sets process scheduling priority levels.
Adjusts priority settings specifically for disk I/O operations.
Changes default printer device driver assignment (for example, from LPT1 to LPT3 or LPT4).
Controls permission for running DOS programs on the system.
Loads a user interface shell environment.
Enables conditional execution on IBM PS/1-compatible machines.
Allows conditional execution on IBM PS/2-compatible systems.
Suppresses output display directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates drive letters reserved by local block device drivers.
Defines the default Resume () character used in Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally passing a return code.
Sets the size of real mode memory available.
Allows simultaneous loading of programs in CONFIG.SYS in the background, functioning similarly to CALL or INSTALL commands under DOS.
Saves the initial character of deleted files within the FAT reserved sector.
Determines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Controls the keyboard Scroll Lock state, enabling it on or off.
Assigns environment variables.
Loads the command interpreter shell.
Similar to SHELL but permits specifying pre-allocated memory size for COMMAND.COM in HMA or UMBs to reduce fragmentation, especially useful with third-party shells.
Defines keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Specifies whether files are closed upon pressing Ctrl+Alt+Del.
Indicates whether POST should be bypassed during system reboot.
, STACKSIZE, STACKSHIGH
Set stack sizes for interrupts or thread operations across various DOS systems and embedded platforms, supporting upper memory utilization where applicable.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS commands managing boot processes, alternative OS loading, memory configuration, and loading DOS components into upper memory blocks (UMBs).
, SUBMENU, SUPPRESSPOPUPS, SWAPPATH
Commands utilized by certain DOS variants or OS/2 for internal functions including submenu management, error popup suppression, and defining swap file locations.
, SWITCHES, SWITCHAR
Enable conditional processing within CONFIG.SYS using customizable switch characters ('/' or '-') and specialized options across DOS versions like DR-DOS and Novell DOS.
, THREADS, TIMESLICE
OS/2-specific parameters addressing FPU bug fixes, thread concurrency management, and scheduler time slice durations.
, TMPEXT
Defines timeout intervals for CONFIG.SYS prompts (DR-DOS, PTS-DOS) and temporary file extensions (PTS-DOS).
, TRACEBUF
Controls single-step execution tracing for CONFIG.SYS/AUTOEXEC.BAT with adjustable log buffer sizes across DR-DOS, PTS-DOS, FreeDOS, and OS/2 environments.
An OS/2 capability for comprehensive error logging.

UTemplate:NbndZ

Directs DOS to manage a designated segment as Upper Memory Block (UMB) space.
Specifies which UMB server is utilized.
Defines address ranges allocated as UMB RAM areas.
Toggles disk write verification on or off.
Sets the DOS version number reported to applications.
Configures VGA display status settings.
Determines the current video mode similar to FreeDOS’s SCREEN command.
Enables or disables the use of virtual DMA functionality.
Controls whether the processor’s Virtual Mode Extensions (VME) are deactivated.
Configures VxD driver parameters for Windows environments.
Sets system support options related to Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution specific to XT-compatible machines.
Configures integrated Year 2000 compliance support.
Defines the default affirmative character in Yes/No prompts.
Manages tracking of file deletions.

Issues

Although the system can initiate without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive customization and meeting software prerequisites during startup. Any corruption or damage to these files necessitates diagnostic efforts.

In cases where CONFIG.SYS is missing the SHELL command or is absent/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions of DOS prior to 6.0 will fail to boot if COMMAND.COM is not found. From MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 onward, users receive a prompt requesting the path to the command interpreter as a recovery method. This prompt also appears if the main command processor terminates intentionally or crashes, allowing a limited shell replacement at runtime without requiring a reboot.

The COMMAND.COM included with MS-DOS 7.0 and later is incompatible with DR-DOS, which impacts dual-boot configurations where COMMAND.COM resides in the root of drive C:. Starting with DR-DOS 7.02, it is no longer possible to bypass SHELL directives by using certain function key modes; this enforces validation of the shell before COMMAND.COM loads. There are recovery mechanisms available if invalid shell parameters are encountered.

Limits on CONFIG.SYS file size differ depending on the operating system: MS-DOS and PC DOS restrict it to several kilobytes (with recent versions supporting up to 64 KB), whereas DR-DOS imposes no explicit size restriction beyond those set by the file system itself. MS-DOS processes CONFIG.SYS by first compiling it into tokenized form in memory and then executing commands in a predetermined sequence—device drivers are loaded before TSRs. In contrast, DR-DOS parses CONFIG.SYS line-by-line, enabling more flexible control over load order through DEVICE and INSTALL commands. This flexibility assists in resolving conflicts as well as dynamically integrating debuggers or temporary utilities.

For MS-DOS and PC DOS versions between 2.0 and 4.01, the maximum length of a SHELL command line was limited to 31 characters; subsequent versions expanded this limit up to 128 characters. DR-DOS supports even longer lines, allowing up to 255 characters. It should be noted that none of these CONFIG.SYS directives accommodate long file names.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual boot functionality between Windows 9x and DOS. When booting into DOS mode, these files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of Windows 95 versions are saved under the names CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows maintains its CONFIG.SYS and AUTOEXEC.BAT filenames unchanged, whereas DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its configuration files during startup.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS for loading device drivers and setting environment parameters prior to launching its graphical user interface.

Within the OS/2 subsystem integrated into Windows NT, CONFIG.SYS appears as a conventional file to OS/2 applications but is actually stored within the Windows registry.

There exist numerous undocumented CONFIG.SYS commands specific to OS/2.

CONFIG.SYS continues to be employed by OS/2 successors such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands (archived)
  • Caldera's CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
  • FreeDOS CONFIG.SYS directive documentation (archived)
  • PTS-DOS 2000 Pro User Manual covering CONFIG.SYS commands (archived)
  • German-language unofficial PTS-DOS FAQ (archived) – additional CONFIG.SYS directives
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG
  2. ↑ 2.0 2.1 2.2 Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_OD-A3
  3. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Datalight_2005_ROM-DOS