Jump to content

PROTSHELL (CONFIG directive)

From Alfawiki
Adapted from the English Wikipedia article PROTSHELL (CONFIG directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsConfiguration commands for DOS and OS/2 boot sequence

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, includes configuration commands that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. The CONFIG.SYS file made its debut with DOS version 2.0.

Usage

CONFIG.SYS contains instructions that set up DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS is processed, DOS launches the command interpreter indicated on the SHELL line; if this line is missing, it defaults to COMMAND.COM. Subsequently, the shell executes the AUTOEXEC.BAT script.

The file primarily consists of name=value pairs that specify adjustable settings or load essential components like device drivers and terminate-and-stay-resident (TSR) programs into memory.

In DOS systems, CONFIG.SYS is located in the root directory of the boot drive.

Certain DOS variants check for alternative configuration filenames that override CONFIG.SYS:

- Advanced releases of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI, storing configuration data in a binary file called CCONFIG.BIN, which is managed through CONFIG.EXE. - From DR DOS 3.31 onwards (including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01), the system prioritizes DCONFIG.SYS over CONFIG.SYS to facilitate multi-boot configurations and scenarios involving drive letter changes due to disk compression. - OpenDOS versions 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS; additionally, some DR-DOS editions look for a DRCONFIG.SYS file. - Starting with DR DOS 6.0, users can modify the default configuration file extension using SYS /DR:ext, allowing multiple boot setups managed by boot loaders such as LOADER. - The SHELL directive supports an optional parameter /P[:filename.ext] to specify alternate AUTOEXEC files, a feature supported by enhanced shells like 4DOS. - DR-DOS 6.0 and later versions introduce CHAIN=filespec to continue reading another configuration file located outside the root directory; from DR-DOS 7.02 onward, it is possible to jump to labeled sections within these chained files. - DR-DOS 7.03 added the capability via SYS /A to copy both CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.

Other DOS-based systems have adopted comparable conventions:

- FreeDOS employs FDCONFIG.SYS. - RxDOS version 7.24 and newer use RXCONFIG.SYS. - PTS-DOS utilizes CONFIG.PTS.

In DOS-based versions of Windows like Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT remain present on boot drives but are generally left empty. Conversely, Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

Within the FlexOS operating system, CONFIG.SYS takes the form of a binary file that specifies resource managers and device drivers loaded during system initialization.

Example

Sample CONFIG.SYS content 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>

:;*?!

Establishes labels within CONFIG.SYS to serve as jump points for , , , , and commands.
Functions similarly to , but additionally applies to in-line comments that follow other directives. (In MS-DOS/PC DOS, inline comments behave differently when enclosed in double quotes.)
Used at the beginning of in-line comments as an alternative to the ; directive.
Presents a Yes/No prompt with an optional message to confirm execution of subsequent CONFIG.SYS commands. (FreeDOS supports conditional prompts via boot menus.) DOS 6.0 and later versions implement a comparable feature by appending after directives.
Executes the following directive without any conditions.

ATemplate:NbndC

Determines whether applications can terminate on encountering errors.
Sets which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the verbosity level of error messages.
Changes the default serial driver assigned to the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads fundamental device drivers into memory.
Produces a beep sound even if notification options are disabled via switches.
Specifies which operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Defines the number of disk buffers allocated.
Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
, , (Exclusive to Embedded DOS 6-XL)
Controls cache block allocation and flushing intervals.
Executes programs within CONFIG.SYS, pausing processing until they return control.
Sets the keyboard's Caps Lock state.
, (PTS-DOS only)
Assigns CD-ROM driver name and buffer settings.
Resumes CONFIG.SYS processing from a specified file or label.
, , and other PTS-DOS-specific commands configure system clock, clear screen, and manage hardware settings.
(OS/2 exclusive)
Defines OEM codepages for international language support.
, ..., (DR-DOS 7.02 and later)
Configures serial COM port quantity, sequence, I/O addresses, and timeout values.
, (DOS 4.0+ and RxDOS) redefine inline comment characters or omit lines under specific system conditions.
, (DOS 3.0+, DR DOS 3.31+, OS/2) activate internationalization features.

Additional CPU-targeted conditional directives such as CPU86 and CPU386 enable execution based on processor type and capabilities, optimizing configuration for particular hardware environments.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger support features.
Boot management utility.
Loads device drivers into conventional memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage configurations for keyboard, screen, and printer devices.
Configures sizes of cache memory areas.
Selects floppy disk compatibility mode.
Specifies display font type for output devices.
Controls loading of DOS into high or upper memory regions.
Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory areas.
Specifies an alternative directory path for DOS system files.
Defines search paths for data files used by DOS utilities.
Sets parameters describing physical disk drives connected to the system.
Establishes parameters for drives that are otherwise unrecognized by the system.
See .
Enables error log creation on a specified drive using PDUMP.nnn files.
Displays a text message on the screen during boot or configuration processing.
Displays messages incorporating ANSI escape codes for enhanced formatting.
Adds extra checks when starting programs to ensure proper execution conditions.
Defines an assumed error or return code value used by the system or programs.
Controls the state of the A20 gate upon program startup for memory access purposes.
Terminates CONFIG.SYS processing prematurely except for certain SWITCHES and SHELL commands that continue execution.
Sets hash table size parameters to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Specifies how many File Control Blocks (FCBs) can be cached simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads FCBs into upper memory areas for improved performance.
Boot management utility command variant.
Determines maximum number of files that can be opened at once by the system or applications.
Like FILES but ensures file handles are loaded into upper memory explicitly for efficiency gains.
Includes execution of designated CONFIG.SYS subsections via the IGNORE directive mechanism.

GTemplate:NbndI

Awaits a key press or timeout, then assigns the error level to the ASCII value of the key pressed, or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS processing at a specified label, returning afterward to the original point.
Refer to , , or for additional details.
See also .
Consult for related information.
See or for further reference.
Refer to or as applicable.
See .
Loads a TSR program into memory following relocation of the DOS data segment; functions similarly to .
Refer to , , or for more context.
See .
Consult or for related commands.
Activates and configures console and command line history buffers with advanced pattern searching capabilities.
Defines the segment address for HMA (High Memory Area).
Configures the CPU’s HLT (halt) energy-saving mode.
Specifies whether to perform a virus check on the system boot sector.
Loads installable file system drivers.
Prevents execution of selected CONFIG.SYS subsections.
Permits specified programs to operate at ring 2, allowing direct hardware I/O access.
Includes directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
Sets the status of the keyboard Insert mode.
Loads a TSR program into memory.
Installs a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating the DOS data segment.
Rotates PIC interrupt priorities to assign highest priority to a specified IRQ line.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address for the relocated keyboard buffer.
Sets the maximum number of accessible drives.
Functions like LASTDRIVE but loads the Current Directory Structure (CDS) into upper memory.
Specifies paths for DLL searches.
Manages compatibility with legacy applications.
Determines the number of allowable file locks.
Controls boot logo display when using PTS-DOS boot manager.
Defines count, order, I/O address, and timeout parameters for LPT1 device configuration.
Applies similar settings for LPT2 device.
Same configuration approach applies to LPT3 device.
Enables and configures LPT4 device similarly to others.
Sets delay before elevating process priority level.
Configures memory allocation methods and strategy.
Specifies default DOS memory allocation behavior.
Defines menu options available in system menus.
Sets color schemes for menus, emulatable in DR-DOS systems.
Determines default menu block, with emulation support in DR-DOS.
Defines multiple menu blocks, also emulatable in DR-DOS environments.
Enables support for multitrack disk operations.
Continues CONFIG.SYS processing in a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () character response in Yes/No/Resume prompts.
Enables or disables keyboard [[Num Lock|Template:Keypress]] status on startup.
Allows conditional execution based on previous error code results.
Displays text message and waits for key input, similar to DR-DOS ’ and ’ commands.
Requires user confirmation of errors detected during CONFIG.SYS processing.
Configures buffer sizes for LPT port operations.
Enables conditional execution on PC-compatible hardware platforms.
Sets scheduler priority levels for processes or tasks.
Assigns priority levels specifically for disk I/O operations.
Changes default printer driver assignment among LPT1 through LPT4 devices.
Controls whether DOS applications are permitted to run on the system.
Loads a user interface shell environment during startup.
Enables conditional execution on IBM PS/1 compatible systems only.
Enables conditional execution on IBM PS/2 compatible systems only.
Suppresses output displayed on STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Inserts annotations within CONFIG.SYS files.
Allocates drive letters for local block device drivers.
Establishes the default Resume () character displayed in prompts.
Returns control to the previous point in nested CONFIG.SYS processing, optionally with a return code.
Sets the amount of real mode memory available.
Enables concurrent loading of programs in CONFIG.SYS, similar to DOS's INSTALL or CALL commands.
Determines whether the first character of deleted files is stored in the FAT reserved area.
Defines the video mode (FreeDOS) or screen access method (PTS-DOS).
Configures keyboard Scroll Lock status, turning it on or off.
Assigns environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a size parameter to pre-allocate COMMAND.COM in HMA or UMBs, minimizing fragmentation with third-party shells.
Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Manages file closure behavior upon Ctrl+Alt+Del keypress.
Bypasses POST during system reboot.
Defines the number of hardware interrupt stacks.
Specifies default stack size for newly created threads.
Similar to STACKS but loads buffers into upper memory regions.
Configures boot manager settings.
Controls the behavior of the XMS A20 address line gate.
Defines submenu blocks emulated via CLS, ECHO, and SWITCH commands under DR-DOS.
Redirects error logging to a drive instead of displaying popups.
Sets the path for swap file storage.
Enables conditional continuation of nested CONFIG.SYS processing at labels based on keypresses, with RETURN returning control to the previous location.
Defines the system-wide default switch character ('/' or '-').
Specifies special operational options.
Activates a fix addressing FPU rounding errors.
Selects an alternative DOS system file for booting purposes.
Configures memory locations for DOS components.
Loads system components from an alternate disk area.
Determines the size of dynamic memory pools allocated by the system.
Loads DOS code and data into Upper Memory Blocks (UMBs).
Sets the number of threads allowed to run concurrently.
Defines timeouts for CONFIG.SYS single-step execution and default responses for Yes/No prompts and SWITCH selections.
Adjusts scheduler time slice minimum and maximum values.
Specifies temporary file extension used by the system.
Enables or disables single-stepping execution of CONFIG.SYS and AUTOEXEC.BAT globally or locally—behavior varies depending on OS version.
Sets the size of the TRACE log buffer.
Records detailed error information to assist with diagnostics.

UTemplate:NbndZ

Configures DOS to designate a specific segment as Upper Memory Block (UMB) space.
Defines which UMB server is utilized by the system.
Specifies address ranges allocated as UMB RAM areas.
Enables or disables verification of disk writes during operations.
Identifies the DOS version reported to software applications.
Manages VGA display status settings.
Sets current video mode similarly to FreeDOS's SCREEN command functionality.
Determines whether virtual DMA capabilities are enabled for use.
Controls deactivation of processor Virtual Mode Extensions (VME).
Configures VxD driver settings for Windows environments.
Adjusts overall system support parameters for Windows operation.
Manages relocation parameters for the Extended BIOS Data Area (XBDA).
Enables conditional command execution exclusively on XT-compatible machines.
Configures built-in support for Year 2000 compliance issues.
Specifies default character used for affirmative responses in prompts.
Controls deletion tracking features.

Issues

The system is capable of booting even if CONFIG.SYS is absent or damaged; however, this file along with AUTOEXEC.BAT is crucial for complete customization and meeting software prerequisites during startup. If either file is corrupted, troubleshooting becomes necessary.

When CONFIG.SYS does not contain a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will not boot without this file, whereas MS-DOS 6.0/PC DOS 6.1, Novell DOS 7 and later will prompt the user to specify a command processor path. This recovery prompt also appears if the main shell process terminates or is intentionally exited, providing an opportunity to replace the shell temporarily without restarting the system.

Because of compatibility issues between MS-DOS 7+ COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and above limit the ability to bypass SHELL directives during skip, trace, or step modes. To enhance stability when invalid shell parameters are encountered, recovery mechanisms include prompting for a valid shell filename before loading COMMAND.COM from the root directory.

CONFIG.SYS file size restrictions differ across versions—MS-DOS and PC DOS enforce limits in the low kilobyte range (recently up to 64 KB), whereas DR-DOS imposes no limit aside from underlying filesystem constraints. This distinction arises because MS-DOS processes CONFIG.SYS by compiling it into a tokenized structure that executes sequentially (with device drivers loaded before TSRs), while DR-DOS interprets each directive line-by-line, allowing precise control over loading sequence and conditional execution depending on hardware detection, user input, or error conditions.

DR-DOS also offers greater versatility by supporting the INSTALL directive, which enables launching non-resident programs within the CONFIG.SYS processing phase, thereby facilitating integration of temporary external utilities and advanced diagnostic procedures.

Early MS-DOS editions restricted SHELL command lines to 31 characters; this limit was extended to 128 characters in later versions. DR-DOS supports command lines up to 255 characters in length. It should be noted that CONFIG.SYS directives do not accept long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS/Windows environment, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual booting between DOS and Windows 9x. Booting into DOS temporarily restores these original filenames. The Windows 95 versions are backed up as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02/7.03 coexists with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT files remain intact. DR-DOS utilizes separate startup files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS for driver configuration and environment setup prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, CONFIG.SYS configurations are maintained within the system registry rather than as physical files.

A variety of undocumented CONFIG.SYS directives are utilized internally by OS/2.

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

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS available 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 CONFIG.SYS commands
  • Details on FreeDOS CONFIG.SYS commands (archived)
  • PTS-DOS 2000 Pro User Guide featuring CONFIG.SYS command explanations (archived)
  • Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS commands (archived)