LPT1 (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | Operating system configuration |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text ASCII file holds setup instructions that the operating system's DOS BIOS reads during the startup process. CONFIG.SYS made its debut with DOS version 2.0.
Usage
The directives within CONFIG.SYS are responsible for configuring DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command shell indicated by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
Typically, the file contains name=value pairs that adjust system parameters or load specific files, primarily device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, CONFIG.SYS is located in the root directory of the boot drive.
Certain DOS variants check for alternate filenames that override CONFIG.SYS:
- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI instead, with supplementary settings stored in a binary file named CCONFIG.BIN, managed through CONFIG.EXE.
- In DR DOS 3.31 and subsequent releases such as Novell DOS 7 and DR-DOS 7.02+, the file DCONFIG.SYS takes precedence over CONFIG.SYS to facilitate disk compression and multi-boot arrangements.
- OpenDOS 7.01 and DR-OpenDOS 7.02 recognize alternative filenames like ODCONFIG.SYS or DRCONFIG.SYS.
- From DR DOS 6.0 onward, users can alter default system file extensions using SYS /DR:ext, allowing several system files to coexist within a single directory, managed by boot loaders such as LOADER.
- The SHELL command supports specifying alternate AUTOEXEC.BAT files with the parameter /P[:filename.ext], and COMMAND.COM accepts custom file extensions—capabilities also offered by 4DOS.
- DR-DOS introduces a CHAIN=filespec[,label] directive to continue processing another configuration file, which is not restricted to the root directory location.
- Starting with DR-DOS 7.03, the SYS /A option enables copying CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
Comparable features exist in other DOS-like systems: FDCONFIG.SYS is used by FreeDOS, RXCONFIG.SYS by RxDOS, and CONFIG.PTS by PTS-DOS.
In 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 all, instead sourcing environment variables directly from the Windows Registry.
Within the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during startup.
Example
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 act as jump destinations for , , , , and commands.
- Functions similarly to , also employed for inline comments following other directives.
- Used at the start of inline comments in conjunction with ;.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS extends this with optional conditions for boot menus.)
- Forces unconditional execution of the next CONFIG.SYS instruction.
ATemplate:NbndC
- Determines whether programs can be interrupted upon encountering errors.
- Sets which drives will record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot sequence operations.
- Adjusts the level of detail shown in error messages.
- Alters the default serial driver used for the AUX: device.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads the foundational device driver into system memory.
- Produces a brief beep sound, even when audible alerts are turned off.
- Defines the operating system to be booted next.
- Enables or disables extended Ctrl+C interrupt checks.
- Configures the quantity of disk buffers allocated.
- Functions similarly to BUFFERS but loads buffers into HMA or UMB areas.
- , ,
- Controls cache block allocation, retention duration, and flushing intervals.
- Executes programs listed in CONFIG.SYS, pausing further commands until completion.
- Sets the initial Caps Lock key status at system startup.
- ,
- Specifies CD-ROM driver name along with buffer allocation count.
- Allows continuation of CONFIG.SYS processing from a new file or label.
- , , and other PTS-DOS directives manage system clock settings, screen clearing, and hardware-specific options.
- Defines OEM codepage(s) used by the system.
- , ...,
- Configures serial COM ports including number, sequence, I/O addresses, and timeout parameters.
Additional commands include COMMENT for inline remarks, COUNTRY for internationalization support, CPOS to display cursor position, CPSW for codepage switching, and CPU-specific conditional execution directives (CPU88, CPU286, CPU386+), among others essential for system setup and hardware compatibility.
This extensive directive collection provides flexible system customization across various DOS platforms, enhancing both performance and compatibility tailored to enterprise-level applications and deployments.
DTemplate:NbndF
- Manages relocation settings for drive descriptor tables.
- Defines memory segment limits used during multi-sector disk data deblocking.
- Activates built-in debugger support capabilities.
- Handles boot management functions.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage configurations for keyboard, screen, and printer devices.
- Adjusts cache memory size parameters.
- Specifies compatibility modes for floppy disk drives.
- Determines display font settings.
- Controls loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
- Loads DOS-related tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory space.
- Defines alternative directory paths for DOS files.
- Sets search paths for data files.
- Establishes physical parameters for disk drives.
- Defines settings for unrecognized or unknown drives.
- Refer to for details.
- Enables PDUMP.nnn error logging and specifies target drive location.
- Outputs a message directly on the screen.
- Displays messages utilizing ANSI escape sequences for formatting.
- Adds extra verification steps when launching programs.
- Assigns error or return codes to be assumed subsequently by the system.
- Specifies A20 line gate status at program startup.
- Terminates CONFIG.SYS processing prematurely (with exceptions for SWITCHES and SHELL directives in certain instances).
- Sets hash table size to expedite file open operations (differs from MS-DOS/PC DOS FASTOPEN driver behavior).
- Determines number of cached File Control Blocks that can be open simultaneously (shares buffer space with FILES under DR-DOS).
- Functions like FCBS but explicitly loads these into upper memory blocks.
- Boot management directive controlling boot sequence behavior.
- Configures maximum number of simultaneously open files allowed by the system.
- Similar to FILES but explicitly loads file handles into upper memory areas.
- Executes specified subsections within CONFIG.SYS (refer to IGNORE directive).
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the specified label.
- Continues nested CONFIG.SYS execution at a given label, returning afterwards to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for more context.
- See or for supplementary data.
- Consult for further reference.
- Loads a terminate-and-stay-resident (TSR) program into memory following relocation of the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for related commands.
- See for additional information.
- Consult or for further details.
- Activates console and command line history buffer featuring enhanced pattern searching capabilities.
- Defines the segment address of the High Memory Area (HMA).
- Configures energy-saving mode using the HLT instruction.
- Enables scanning of the boot sector for viruses.
- Loads installable file system drivers.
- Prevents execution of designated CONFIG.SYS subsections.
- Permits programs to operate at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (can be emulated using GOSUB/RETURN in DR-DOS).
- Sets the status of the keyboard Insert mode.
- Installs a TSR program into memory.
- Loads a TSR program into upper memory area, equivalent to HIINSTALL in DR DOS version 5.0.
- Installs a TSR after relocating the DOS data segment. Compare with INSTCDEX.
- Adjusts PIC interrupt priorities to elevate a specific IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Functions like LASTDRIVE but additionally loads Current Directory Structure into upper memory.
- Lists directories searched for DLL files.
- Manages compatibility with legacy software applications.
- Determines the count of file locks allowed.
- Configures boot logo display settings when using PTS-DOS boot manager during startup.
- Sets parameters such as count, order, I/O address, and timeout for LPT1 printer device.
- Applies similar configuration settings to LPT2 device.
- Same configuration parameters applied to LPT3 device.
- Enables and configures LPT4 device similarly to others.
- Specifies time interval before increasing process priority during waiting periods.
- Configures memory allocation strategy preferences.
- Defines default DOS memory allocation method.
- Specifies menu options available in CONFIG.SYS menus.
- Sets color schemes for menus (can be emulated via ECHO commands in DR-DOS).
- Designates default menu block (DR-DOS can emulate this using TIMEOUT and SWITCH).
- Defines individual menu blocks (emulatable through ECHO and SWITCH commands in DR-DOS).
- Enables operations on multitrack disks.
- Continues processing CONFIG.SYS from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character representing No () in Yes/No/Resume prompts.
- Configures initial status of keyboard Num Lock key.
- Allows conditional execution based on error level codes, e.g., .
- Shows a prompt message and waits for any key press, similar to and in DR-DOS environments.
- Requires user confirmation upon encountering errors within CONFIG.SYS processing.
- Sets buffer size parameters for LPT port communications.
- Enables conditional execution specifically on PC-compatible systems.
- Adjusts scheduler priority levels for processes.
- Defines priority assigned to disk I/O operations by the scheduler.
- Changes default printer device driver assignment (for example, switching from LPT1 to LPT3 or LPT4).
- Controls whether DOS applications are permitted to run under current settings.
- Loads and initiates the user interface shell environment.
- Enables conditional execution tailored for IBM PS/1 compatible machines.
- Allows conditional execution tailored specifically for IBM PS/2 compatible systems.
- Suppresses output sent to standard output (STDOUT).
RTemplate:NbndT
- Activates system auto-reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter, preventing assignment to local block devices.
- Establishes the default Resume () character used in prompts.
- Returns control from nested CONFIG.SYS processing to the preceding GOSUB or SWITCH statement, optionally passing a return value.
- Specifies the size of real mode memory available.
- Allows simultaneous loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS environments.
- Determines whether the first character of deleted filenames is stored in the FAT reserved area.
- Sets video display modes or screen access methods depending on the operating system variant.
- Controls the initial status of the keyboard Scroll Lock key.
- Declares environment variables for system use.
- Loads the command interpreter shell into memory.
- Functions like SHELL but permits specifying pre-allocation size to enhance memory efficiency and prevent fragmentation, including UMB loading support under PTS-DOS.
- Adjusts keyboard modifier key states such as Shift Lock, Num Lock, Scroll Lock, or Insert mode.
- Defines file closure behavior when Ctrl+Alt+Del is pressed.
- Specifies whether Power-On Self-Test (POST) is bypassed during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure stack parameters across different DOS versions and derivatives, managing hardware interrupt stacks and buffer placements within memory segments to optimize performance.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS directives responsible for boot management, alternative system loading processes, and memory setup for system components.
- , SWITCH
- Enables conditional processing blocks inside CONFIG.SYS for advanced configuration control, mainly supported natively or via emulation in DR-DOS and related DOS variants.
- , SWAPPATH
- OS/2-specific settings that define paths for error logging and swap file locations to improve system stability and resource management.
- , SWITCHES
- Specify command-line switch characters and special options influencing system behavior across DOS variants such as Novell DOS and DR-DOS.
- , THREADS, TIMESLICE
- OS/2 configurations addressing hardware floating-point unit issues, setting thread counts for concurrency, and adjusting scheduler time slices to enhance multitasking efficiency.
- , TRACE, TRACEBUF
- Control timing of CONFIG.SYS execution, enable single-step debugging modes, and set trace buffer sizes for diagnostic purposes on platforms including DR-DOS, PTS-DOS, FreeDOS, and OS/2.
- , TRAPDUMP
- Defines temporary file extensions (PTS-DOS) and comprehensive error logging options (OS/2) to support troubleshooting and system maintenance.
UTemplate:NbndZ
- Directs DOS to utilize a designated segment as an Upper Memory Block (UMB).
- Specifies the server responsible for managing UMBs.
- Defines address ranges allocated as UMB RAM areas.
- Toggles disk write verification on or off.
- Reports the current DOS version information to applications.
- Configures VGA display status parameters.
- Indicates the active video mode, akin to FreeDOS's SCREEN command functionality.
- Enables usage of virtual Direct Memory Access (DMA).
- Controls processor Virtual Mode Extensions (VME) settings.
- Configures Virtual Device Driver (VxD) parameters for Windows environments.
- Sets system-level support options for Windows operating systems.
- Manages relocation processes for the Extended BIOS Data Area (XBDA).
- Allows conditional execution tailored for XT-compatible machines.
- Implements built-in Year 2000 compliance features.
- Sets the default affirmative response character in user prompts.
- Configures tracking options related to file deletion.
Issues
Although the system is capable of booting without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive DOS customization and satisfying software dependencies. When these files become corrupted or damaged, troubleshooting is required to restore proper functionality.
If the SHELL directive is missing or corrupted in CONFIG.SYS, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if COMMAND.COM cannot be found, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt the user to specify the path to a command processor. This prompt also appears if the main shell is intentionally exited or aborted, providing an option to replace the runtime shell without rebooting.
Because of compatibility issues between MS-DOS 7.0 and later versions of COMMAND.COM and DR-DOS, DR-DOS 7.02 and newer enforce SHELL directives in skip, trace, and step modes to prevent circumvention in multi-boot environments. Furthermore, new key commands were introduced to handle invalid SHELL arguments by requesting users to input valid shell filenames before loading COMMAND.COM.
CONFIG.SYS file size restrictions differ depending on the operating system: MS-DOS and PC DOS limit it to a few kilobytes (with recent versions allowing up to 64 KB), while DR-DOS imposes no practical size constraints beyond those enforced by the file system itself. MS-DOS processes CONFIG.SYS by first compiling it into a tokenized form and then executing directives in a fixed sequence—device drivers preceding TSRs. In contrast, DR-DOS reads directives sequentially line-by-line, enabling precise control over the order in which drivers and TSRs load through DEVICE and INSTALL commands. This approach facilitates resolving conflicts during loading and allows dynamic integration of temporary external programs.
Earlier iterations of MS-DOS limited the length of the SHELL command line to 31 characters; this was expanded to 128 characters in later releases. DR-DOS supports up to 255 characters for this directive. It is important to note that CONFIG.SYS directives do not accept long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows setup, CONFIG.SYS and AUTOEXEC.BAT are renamed as CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality. During a DOS boot session, these files are temporarily restored under their original filenames. Backup copies of Windows 95’s configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.
In systems where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT retain their default names, while DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up drivers and environment variables prior to launching its graphical user interface. Within the OS/2 subsystem embedded in Windows NT, these configuration settings are stored within the registry rather than as traditional files.
A variety of undocumented CONFIG.SYS directives exist specifically for OS/2. The CONFIG.SYS file remains a fundamental component in OS/2 derivatives 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 Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- FreeDOS CONFIG.SYS directive descriptions
- PTS-DOS 2000 Pro User Manual – includes CONFIG.SYS directives (archived)
- Inoffizielle deutschsprachige PTS-DOS-FAQ (PTS/FAQD) – unofficial PTS-DOS FAQ covering CONFIG.SYS directives (archived)