AT (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating system platforms. This plain text file, written in ASCII, holds setup instructions that the operating system's DOS BIOS interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to manage hardware devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive or defaults to COMMAND.COM, which subsequently runs the AUTOEXEC.BAT script.
This file primarily contains name=value pairs that define settings 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 prioritize alternative configuration filenames over CONFIG.SYS:
- Systems like Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI, with configuration data stored in a binary file named CCONFIG.BIN. These are managed through a utility called CONFIG.EXE.
- For DR DOS 3.31 and later versions, including PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02 onwards, DCONFIG.SYS takes precedence over CONFIG.SYS to support multi-boot environments and disk compression control.
- OpenDOS 7.01 and DR-OpenDOS 7.02 also recognize configuration files named ODCONFIG.SYS or DRCONFIG.SYS.
- Starting with DR-DOS 6.0, users can modify default configuration file extensions using SYS /DR:ext, allowing multiple system files to coexist in the root directory and be selected via boot loaders such as LOADER.
- The SHELL command permits specifying alternative AUTOEXEC scripts using /P[:filename.ext], a feature supported by COMMAND.COM and enhanced shells like 4DOS.
- The CHAIN=filespec directive enables continuation of configuration processing in external files, with support for labels introduced in DR-DOS 7.02 and later.
With DR-DOS 7.03 and newer versions, the SYS /A option was added to facilitate copying CONFIG.SYS and AUTOEXEC.BAT alongside other system files during setup.
Other DOS-based systems offer similar capabilities: FreeDOS uses FDCONFIG.SYS, RxDOS from version 7.24 onward employs RXCONFIG.SYS, and CONFIG.PTS is found in PTS-DOS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of the boot partition but are generally left empty. Windows Me does not process CONFIG.SYS during startup; instead, environment variables are loaded from the Windows Registry path:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
For FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers to be loaded during boot time.
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>
:;*?!
- Defines labels within CONFIG.SYS that serve as targets for commands such as , , , , and .
- Functions similarly to , but can also be employed for inline comments following other directives in CONFIG.SYS. (Note that under MS-DOS/PC DOS, inline comments inside double quotes are not disregarded.)
- Used at the beginning of inline comments as an alternative to ;.
- Prompts the user with a Yes/No confirmation before proceeding with subsequent CONFIG.SYS instructions. (FreeDOS lacks customizable messages but supports conditional logic through boot menus.) DOS versions 6.0 and above offer comparable functionality by appending after commands.
- Forces immediate execution of the next CONFIG.SYS directive without any conditions.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Configures which drives record file access timestamps within FAT file systems.
- Enables conditional execution solely on AT-compatible hardware.
- Manages boot operations.
- Adjusts the level of detail shown in error messages.
- Changes the default serial driver assigned to the AUX: device.
- Prevents access to character devices outside the phantom \DEV directory.
- Loads the fundamental device driver into system memory.
- Produces a brief beep even if sound notifications are disabled.
- Defines the operating system to boot next.
- Enables or disables extended Ctrl+C detection.
- Sets the quantity of disk buffers allocated.
- Similar to BUFFERS but explicitly loads buffers into HMA or UMB memory areas.
- , , (Embedded DOS 6-XL exclusive)
- Adjusts cache block allocation and flushing settings.
- Executes programs listed in CONFIG.SYS in the foreground, pausing further processing until completion.
- Determines keyboard Caps Lock status during startup.
- , (PTS-DOS only)
- Specifies CD-ROM driver name and buffer allocation count.
- (DR DOS 5.0+ and Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label.
- , , and other PTS-DOS-specific commands set system clock type, clear screen behavior, and other boot optimizations.
Communication Ports
- , ..., ; (DR-DOS 7.02+)
- Define the number, logical sequence, I/O addresses, and timeouts for COM port devices.
Comments and International Support
- , ;, ;, ;, ;, etc., enable inline comments, support for internationalization, cursor positioning, codepage switching, thereby improving system localization and user experience.
CPU-Specific Directives (PTS-DOS only)
Conditional execution directives such as ;CPU88, ;CPU86, ;CPU286, ;CPU386, ;CPU486 with plus variants specify execution on corresponding CPU models or newer.
These directives facilitate customized system setups tailored to various hardware configurations, promoting efficient resource utilization and flexible boot procedures essential for optimizing business IT environments.
DTemplate:NbndF
- Manages relocation of drive descriptor tables in memory.
- Defines memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger support features.
- Controls boot management functions.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory blocks (equivalent to similar commands in DRDOS 5.0).
- Sets country and codepage settings for keyboard, screen, and printer devices.
- Configures sizes of cache memory allocations.
- Selects floppy disk compatibility mode settings.
- Specifies display font parameters.
- Manages loading of DOS into high or upper memory areas (comparable to related DRDOS 5.0 options).
- Loads DOS configuration tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory segments.
- Defines alternative directories for DOS file storage paths.
- Specifies search paths for data files used by the system.
- Details physical parameters for disk drives.
- Sets parameters for unidentified or unsupported drives.
- Refer to related documentation for additional details.
- Enables error logging via PDUMP.nnn files on specified drives.
- Controls display of messages on screen output devices.
- Allows message display including ANSI escape sequences for enhanced formatting.
- Adds extra checks during program startup routines.
- Defines an expected error or return code value for processes.
- Specifies A20 gate state configuration when launching programs.
- Terminates CONFIG.SYS processing prematurely under certain exceptions.
- Configures hash table size to accelerate file opening operations, differing from MS-DOS/PC DOS FASTOPEN implementations.
- Sets the number of cached File Control Blocks allowed simultaneously (shares buffer with FILES under DR-DOS).
- Equivalent to FCBS but loads these structures into upper memory areas.
- Boot management utility command.
- Defines maximum number of simultaneously open files allowed by the system.
- Similar to FILES but loads file handles into upper memory segments.
- Executes specified CONFIG.SYS subsections as part of processing (see IGNORE directive).
GTemplate:NbndI
- Waits for a keypress or timeout and assigns the error level to the ASCII value of the key or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS execution at a specified label, then returns to the prior point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related instructions.
- Refer to or as applicable.
- See or for more context.
- Consult for additional guidance.
- Loads a TSR program into memory after relocating the DOS data segment; compare with INSTCDEX.
- See , , or for related commands.
- Refer to for further explanation.
- See or as needed.
- Activates console and command line history buffer, supporting advanced pattern searching.
- Defines the HMA segment address explicitly.
- Configures energy-saving mode using HLT instruction.
- Enables detection of boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS sections; also see .
- Permits designated programs to execute at ring 2, allowing direct hardware I/O access.
- Incorporates directives from an alternate menu block (can be simulated with GOSUB/RETURN in DR-DOS).
- Sets the keyboard Insert mode state.
- Loads a TSR program into memory.
- Installs TSR into upper memory blocks (similar to HIINSTALL in DR DOS 5.0).
- Loads TSR after relocating DOS data segment; see also INSTCDEX.
- Adjusts PIC interrupt priorities, assigning highest priority to a specific IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer area.
- Sets the maximum number of accessible drive letters.
- Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
- Lists paths used for DLL searches.
- Manages compatibility with legacy software applications.
- Determines the number of allowable file locks.
- Configures boot logo display and startup messages via PTS-DOS boot manager.
- Establishes count, sequence, I/O address, and timeout settings for LPT1 port.
- Applies similar configuration parameters to LPT2 device.
- Sets up LPT3 device with corresponding parameters.
- Enables and configures LPT4 printer port support.
- Defines delay before elevating process priority during bootup.
- Configures memory allocation policies and strategies.
- Specifies default DOS memory allocation approach.
- Declares menu options available at startup.
- Sets color schemes for menus (can be emulated by ECHO in DR-DOS).
- Defines default menu block to load (emulatable via TIMEOUT and SWITCH in DR-DOS).
- Defines a specific menu block (can be simulated using ECHO and SWITCH in DR-DOS).
- Enables or disables multitrack disk read/write operations.
- Continues processing CONFIG.SYS from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character for No () responses in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state, turning it on or off.
- Enables conditional execution based on previous error code, e.g., .
- Displays text and waits for key input, functioning similarly to and in DR-DOS environments.
- Requires user confirmation upon encountering errors within CONFIG.SYS processing.
- Configures buffer sizes assigned to LPT ports.
- Allows conditional execution specifically on PC-compatible hardware platforms.
- Adjusts scheduler priority settings for processes.
- Sets priority levels for disk I/O operations programs.
- Changes default printer device driver among LPT1 through LPT4 ports as needed.
- Determines whether DOS applications are permitted to run under current conditions.
- Loads the user interface shell environment during bootup.
- Enables conditional execution when running on IBM PS/1-compatible machines.
- Enables conditional execution when running on IBM PS/2-compatible machines.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates drive letters for local block device drivers.
- Sets the default character for Resume () prompts.
- Resumes CONFIG.SYS execution at the previous GOSUB or SWITCH point, optionally returning a code.
- Specifies the size of real mode memory.
- Enables simultaneous loading of programs in the background during CONFIG.SYS processing, similar to CALL or INSTALL in DOS/OS2.
- Records the initial character of deleted files within the FAT reserved area.
- Defines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
- Controls the state of the keyboard Scroll Lock key (on or off).
- Sets environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but supports pre-allocating space for relocating COMMAND.COM to HMA or UMBs, reducing fragmentation when using third-party shells.
- Specifies keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files are closed upon pressing Ctrl+Alt+Del.
- Skips the Power-On Self-Test (POST) during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer locations with varying support and compatibility across DOS versions.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS specific commands managing boot managers, alternative operating system boot files, DOS memory allocation, and system loading areas respectively.
- , SWITCH
- Enables control menu blocks and conditional processing within CONFIG.SYS using nested labels and return capabilities under certain DOS editions.
- , SWAPPATH
- OS/2 directives that specify error log drive selection and swap file directory paths.
- , SWITCHES
- Define default command switch characters ('/' or '-') and configure special options across various DOS systems, with some restrictions under PTS-DOS.
- , THREADS, TIMESLICE
- OS/2 directives that manage floating-point unit bug fixes, concurrent thread limits, and scheduler time slice durations respectively.
- , TRACE, TRACEBUF
- Control CONFIG.SYS timeouts, enable single-step debugging modes, and set trace buffer sizes across DOS variants with differing implementations between OS/2 and DOS platforms.
- , TRAPDUMP
- PTS-DOS directive for temporary file extensions and OS/2 directive for comprehensive error logging.
UTemplate:NbndZ
- Assigns a specific segment as an Upper Memory Block (UMB) for DOS usage.
- Configures the Upper Memory Block server parameters.
- Defines address ranges allocated for UMB RAM areas.
- Toggles disk write verification on or off.
- Sets the DOS version number reported to applications.
- Configures VGA display status settings.
- Specifies the active video mode.
- Enables usage of virtual Direct Memory Access (DMA).
- Controls processor Virtual Mode Extensions (VME) functionality.
- Configures VxD drivers for Windows environments.
- Sets up Windows system support parameters.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Executes conditionally on XT-compatible computer systems.
- Activates Year 2000 compliance features.
- Defines the default affirmative response character in prompts.
- Manages tracking of file deletions.
Issues
Although it is possible to boot without a CONFIG.SYS file present, this file along with AUTOEXEC.BAT is critical for tailoring the operating system environment and loading necessary software components. When these files are missing or corrupted, troubleshooting becomes necessary.
If the SHELL directive is absent from CONFIG.SYS—or if the file itself is missing or damaged—DOS attempts to locate COMMAND.COM in the root directory. Earlier DOS versions will fail to boot without this file. In contrast, MS-DOS version 6.0, PC DOS 6.1, and Novell DOS 7 and newer will prompt users to specify a path to a command processor if COMMAND.COM cannot be found. This prompt also appears if the command interpreter terminates unexpectedly or exits voluntarily, enabling limited shell replacement during runtime without requiring a reboot.
Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS systems, DR-DOS versions 7.02 and later prevent bypassing SHELL directives during skip, trace, or step boot modes. In cases where no SHELL directive exists while skipping CONFIG.SYS processing, users must provide a valid shell path before COMMAND.COM loads.
CONFIG.SYS file size limitations differ by platform: MS-DOS and PC DOS restrict size to several kilobytes (up to 64 KB in later releases), whereas DR-DOS imposes no practical size limit by interpreting directives sequentially. This approach offers fine-tuned control over driver and TSR loading sequences, facilitating resolution of load order conflicts and supporting temporary program insertion via INSTALL.
Earlier MS-DOS/PC DOS versions restrict SHELL command line length to a maximum of 31 characters, extended to 128 characters in later releases. DR-DOS allows up to 255 characters. It should be noted that CONFIG.SYS commands do not support long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS. This renaming supports dual boot functionality between Windows 9x and DOS. During a boot into DOS, these renamed files are temporarily reverted back to their original filenames. Additionally, backup copies of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unaltered. Instead, DR-DOS employs its own startup configuration files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS to configure device drivers and environment settings prior to launching its graphical user interface.
Within the Windows NT OS/2 subsystem, CONFIG.SYS is presented to OS/2 applications but is actually managed within the system registry.
There exists a variety of undocumented CONFIG.SYS commands specific to OS/2.
The use of CONFIG.SYS continues in OS/2-based operating systems 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
- AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
- Caldera's CONFIG.SYS Command Reference (archived) – overview of DR-DOS 7 directives
- Guide to FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (archived)
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) including CONFIG.SYS directives (archived)