PRN (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | DOS version 2.0 |
| Products | Configuration for DOS and OS/2 boot sequence, device drivers, memory management |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds setup instructions that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—interprets during the boot sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are utilized to configure DOS for hardware devices, software applications, and memory management utilities. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL command; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
This configuration file primarily contains name=value pairs that set adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the root directory of the system’s boot drive.
Certain DOS variants employ alternative configuration filenames that take precedence over CONFIG.SYS:
Earlier editions of Concurrent DOS did not support CONFIG.SYS. However, later releases—including Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32—look for CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS). Additionally, REAL/32 also attempts to load MCONFIG.SYS. These platforms enable more advanced configuration through binary files such as CCONFIG.BIN, which are typically edited using CONFIG.EXE.
Within DR DOS versions starting from 3.31 and continuing through releases like Novell DOS 7 and DR-DOS 7.02+, a DCONFIG.SYS file can supersede CONFIG.SYS. This functionality is particularly useful for disk compression setups and multi-boot environments. Variants like OpenDOS 7.01 and DR-OpenDOS 7.02 also recognize alternative filenames such as ODCONFIG.SYS or DRCONFIG.SYS. Since DR DOS 6.0, the SYS /DR:ext command allows users to customize system file extensions, enabling multiple configuration sets within a single root directory, managed by boot loaders like LOADER.
The SHELL directive supports specifying alternative AUTOEXEC.BAT files via /P[:filename.ext], with COMMAND.COM accepting different extensions in this mode—a capability also supported by 4DOS. Starting with DR-DOS 6.0, a CHAIN=filespec command lets users continue processing additional configuration files, optionally jumping to specific labels using CHAIN=filespec,label. From DR-DOS 7.03 onwards, the SYS /A option allows copying both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
FreeDOS utilizes FDCONFIG.SYS, whereas RxDOS version 7.24 and later use RXCONFIG.SYS. Meanwhile, PTS-DOS employs the filename CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of Windows 95 and Windows 98 boot drives but are generally empty files. In contrast, Windows Me does not process CONFIG.SYS during startup, instead loading environment variables directly from the Windows Registry.
For FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers to be loaded at system initialization.
Example
A sample CONFIG.SYS file 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>
:;*?!
- Defines jump destinations within CONFIG.SYS for directives such as , , , and .
- Functions similarly to , but intended for inline comments following other CONFIG.SYS commands. (Note: In MS-DOS/PC DOS, inline comments within double quotes are not ignored.)
- Introduces inline comments used alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution via boot menus using and .) DOS version 6.0 and later provide a comparable feature by appending to commands like .
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be aborted when errors occur.
- Configures which drives record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible systems.
- Boot manager functionality.
- Adjusts the verbosity level of error messages.
- Changes the default serial device driver assigned to the AUX device (COM ports).
- Prevents access to character devices outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a beep sound even if notification sounds are disabled.
- Specifies the operating system to boot next.
- Enables or disables enhanced Ctrl+C checking.
- Sets the number of disk buffers.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Manage cache block allocation durations and flushing intervals.
- Executes programs within CONFIG.SYS, running them in the foreground and pausing further processing until they return.
- (DR-DOS 7.02+)
- Sets the Caps Lock key status on the keyboard.
- , CDDBUFFERS (PTS-DOS only)
- Defines CD-ROM driver name and buffer count.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from another file or label.
- , CLS (PTS-DOS or DR DOS)
- Specifies system clock type or clears the screen display.
- , COUNTRY (OS/2, DOS variants)
- Configures OEM code pages and internationalization support.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Configures serial port quantities, order, I/O addresses, and timeout settings.
- , COMMENTS (DOS 4.0+)
- Redefines inline comment characters or instructs to ignore the following line depending on OS behavior.
- , CPU486+ (DR-DOS 7.02+, PTS-DOS)
- Enables conditional execution based on CPU type.
[Additional directives omitted for brevity.]
DTemplate:NbndF
- Configures relocation of drive descriptor tables in memory.
- Defines the memory segment limit up to which multi-sector disk data deblocking is permitted.
- Activates internal debugger support features.
- Boot manager functionality.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage configurations for keyboard, screen, and printer devices.
- Adjusts sizes for cache memory allocation.
- Determines floppy disk compatibility mode settings.
- Specifies font settings for display output.
- Controls whether DOS loads into high memory or upper memory blocks.
- Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- .
- Defines search paths for data files used by DOS utilities.
- Sets physical parameters for disk drives configuration.
- Defines parameters applicable to unrecognized disk drives.
- See .
- Enables error log creation and designates drive location for PDUMP.nnn files.
- Displays a message on screen during processing.
- Displays a message that can include ANSI escape sequences for formatting.
- Controls whether additional checks are performed when launching programs.
- Sets the expected error or return code for subsequent operations.
- Defines the A20 line gate state when starting a program execution.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives that follow.
- Configures hash table size used to speed up file opening operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies how many File Control Blocks (FCBs) can be opened simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory areas.
- Boot manager functionality again referenced here.
- Sets maximum number of simultaneously open files allowed by DOS.
- Same as FILES directive but loads file handles explicitly into upper memory blocks.
- Includes execution of specified subsections in CONFIG.SYS processing flow (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the designated label.
- Continues nested CONFIG.SYS processing at a specified label and returns to the previous point afterward.
- Refer to , , or for additional details.
- See also .
- Consult .
- Refer to or for further information.
- See or as applicable.
- Consult .
- Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
- Refer to , , or for more information.
- See .
- Consult or for details.
- Activates console and command line history buffers along with enhanced pattern search capabilities.
- Defines the memory address of the HMA segment.
- Configures the HLT instruction for power saving.
- Determines whether the system scans for boot sector viruses.
- Loads installable file systems into memory.
- Prevents execution of certain subsections within CONFIG.SYS. See .
- Permits designated programs to operate at ring 2 level, allowing direct hardware I/O access.
- Incorporates directives from an alternate menu block (simulated via GOSUB/RETURN in DR-DOS).
- Sets keyboard Insert mode status.
- Loads a TSR program into memory.
- Loads a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Installs a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities to give precedence to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated address of the keyboard buffer.
- Sets the maximum number of accessible drive letters.
- Functions like LASTDRIVE but also loads the Current Directory Structure into upper memory.
- Establishes search paths for DLL files.
- Controls handling of legacy applications.
- Sets the quantity of file locks allowed.
- Configures support for boot logos and startup display messages.
- Defines parameters including count, order, I/O address, and timeout for LPT1 devices.
- Applies LPT1 settings equivalently to LPT2 devices.
- Mirrors LPT1 configurations for LPT3 devices.
- Enables and configures LPT4 device support.
- Sets delay before increasing process priority.
- Determines strategy for memory allocation management.
- Specifies default DOS memory allocation method.
- Defines available menu options.
- Sets menu color schemes (emulatable on DR-DOS).
- Establishes default menu block (emulatable on DR-DOS).
- Defines individual menu blocks (emulatable on DR-DOS).
- Enables operations involving multitrack disks.
- Continues processing CONFIG.SYS from a new file after loading a device driver and updating %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default No () character used in Yes/No/Resume prompts.
- Controls whether the keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
- Enables conditional execution based on the last error code, such as .
- Displays a message and waits for key input, similar to and commands under DR-DOS.
- Requires user confirmation to acknowledge errors within CONFIG.SYS processing.
- Configures buffer sizes for LPT printer ports.
- Allows conditional execution on PC-compatible systems.
- Sets scheduler priority levels for processes.
- Assigns priority levels specifically for disk I/O programs.
- Changes the default printer device driver assignment (e.g., from LPT1 to LPT3 or LPT4).
- Specifies whether DOS applications are permitted to run.
- Loads the user interface component.
- Enables conditional execution on IBM PS/1-compatible hardware platforms.
- Supports conditional execution on IBM PS/2-compatible systems.
- Silences output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits the inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter to prevent use by local block device drivers.
- Defines the default Resume () response character for Yes/No/Resume prompts.
- Allows nested CONFIG.SYS execution to return control to the previous GOSUB or SWITCH statement, optionally passing a return code.
- Sets the size of real mode memory.
- Enables simultaneous loading of programs in CONFIG.SYS in the background, similar to CALL or INSTALL commands under DOS/OS2.
- Determines whether the first character of deleted files is saved in the FAT reserved area.
- Specifies the video mode for FreeDOS or screen access methods for PTS-DOS.
- Controls the keyboard Scroll Lock state, turning it on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a SIZE parameter to pre-allocate memory, reducing HMA fragmentation, and attempts UMB loading on PTS-DOS.
- Sets keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close automatically when Ctrl+Alt+Del is pressed.
- Controls whether POST is bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Manage stack configuration parameters across different DOS platforms, highlighting variations in compatibility and memory usage techniques.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Specific to PTS-DOS, these directives handle boot setup, system memory allocation, and alternative system loading procedures.
- , SUPPRESSPOPUPS, SWAPPATH
- OS-specific options for menu display control, error logging drive assignment, and swap file directory paths.
- , SWITCHES
- Facilitate conditional processing within CONFIG.SYS and define special options mainly under DR DOS and Novell DOS systems.
- , STRING
- Designate system switch characters (such as '/' or '-') and internal parameters across multiple DOS versions.
- , THREADS, TIMESLICE
- OS/2-specific settings that manage hardware bug fixes, thread concurrency, and scheduler time slice durations.
- , TRACE, TRACEBUF
- Regulate prompt timeouts and enable or disable single-step execution tracing with buffer size adjustments across DR-DOS, PTS-DOS, FreeDOS, and OS/2 environments.
- , TRAPDUMP
- Define temporary file extensions (PTS-DOS) and detailed error logging configurations (OS/2).
UTemplate:NbndZ
- Directs DOS to allocate a particular segment as UMB memory.
- Specifies which UMB server is utilized.
- Defines address ranges designated as UMB RAM.
- Toggles disk write verification on or off.
- Sets the DOS version reported to applications.
- Configures VGA display status parameters.
- Indicates the current video mode in use.
- Determines whether virtual DMA capabilities are enabled.
- Controls deactivation of processor Virtual Mode Extensions.
- Configures VxD drivers for Windows environments.
- Sets system-level support options for Windows operation.
- Manages relocation settings for the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-compatible hardware platforms.
- Activates built-in Year 2000 compliance support features.
- Sets the default character used for Yes responses in prompts.
- Configures tracking behavior for file deletions.
Issues
The system is capable of booting even if CONFIG.SYS is absent or corrupted; however, both this file and AUTOEXEC.BAT are crucial for comprehensive operating system customization and meeting software prerequisites. If either file is damaged, troubleshooting becomes necessary.
In the absence of a SHELL command within CONFIG.SYS—or if the file is missing or corrupted—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will not boot without it, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions will prompt the user to specify the command processor’s location if it cannot be found. This prompt also appears if the shell terminates unexpectedly or exits intentionally, offering a limited shell replacement during runtime without requiring a reboot.
COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, though it usually resides in the root of drive C: in dual-boot environments. DR-DOS versions 7.02 and above prevent skipping or tracing SHELL directives to avoid conflicts. Some subsequent releases reinstated the skip functionality to recover from invalid SHELL parameters. If no valid shell is detected when bypassing CONFIG.SYS, users are asked to provide a valid shell filename before COMMAND.COM loads.
CONFIG.SYS size restrictions differ: MS-DOS and PC DOS limit the file size to a few kilobytes (recent editions allow up to 64 KB), whereas DR-DOS imposes no practical size limit due to its line-by-line parsing approach rather than tokenization. This enables fine-tuned management of driver and TSR loading sequences through DEVICE and INSTALL commands, facilitating resolution of conflicts and allowing temporary external programs to be integrated into the CONFIG.SYS process.
The maximum length for the SHELL directive line was capped at 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01, later extended to 128 characters; DR-DOS supports lines up to 255 characters. CONFIG.SYS directives do not accommodate long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows configuration, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality. During a DOS boot, these files are temporarily restored to their initial names. Backup copies of the Windows 95 versions are kept as CONFIG.W40 and AUTOEXEC.W40.
In contrast, installing Caldera DR-DOS 7.02 or 7.03 alongside Windows 95 retains the Windows CONFIG.SYS and AUTOEXEC.BAT filenames unchanged, while DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for configuring system settings, drivers, and environment variables prior to loading its graphical interface.
Within the OS/2 subsystem included in Windows NT, CONFIG.SYS exists as a configuration stored in the registry specifically for OS/2 applications.
A variety of undocumented CONFIG.SYS commands are utilized by OS/2.
CONFIG.SYS continues to be used by OS/2 successors such as eComStation and ArcaOS.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- Information on AUTOEXEC.BAT and CONFIG.SYS 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
- Details on FreeDOS CONFIG.SYS commands
- User manual for PTS-DOS 2000 Pro including CONFIG.SYS entries
- Unofficial German PTS-DOS FAQ (archived) – additional CONFIG.SYS commands