NUMLOCK (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | Configuration directives for DOS and OS/2 operating systems |
CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, contains configuration commands interpreted by the operating system's DOS BIOS—typically found in IBMBIO.COM or IO.SYS—during system startup. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to set up DOS for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is defined, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
This file primarily consists of name=value pairs that establish configuration parameters or load device drivers and TSR (terminate-and-stay-resident) programs. CONFIG.SYS is located in the boot drive’s root directory.
Certain DOS variants prioritize alternative filenames over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 utilize CCONFIG.SYS instead, which supports extra settings stored in binary CCONFIG.BIN files editable via CONFIG.EXE.
- In DR DOS version 3.31 and subsequent releases such as Novell DOS 7 and DR-DOS 7.02+, DCONFIG.SYS takes precedence. Initially associated with disk compression configurations, this allows for multi-boot arrangements.
- OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, whereas some DR-DOS editions check for DRCONFIG.SYS.
- Starting with DR DOS 6.0, users can modify default system file extensions using SYS /DR:ext, enabling multiple system file sets to coexist and be selected by boot loaders like LOADER.
- The SHELL command permits specifying alternative AUTOEXEC.BAT files and supports extensions other than .BAT; this capability is also present in 4DOS.
- DR-DOS includes a CHAIN=filespec directive to continue processing additional configuration files, with optional label support added in versions 7.02 and later.
- Beginning with DR-DOS 7.03, the SYS /A option allows copying both CONFIG.SYS and AUTOEXEC.BAT alongside system files.
Other DOS derivatives offer similar functionality: FreeDOS uses FDCONFIG.SYS, RxDOS relies on RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.
In Windows versions built on DOS (such as Windows 95/98), CONFIG.SYS and AUTOEXEC.BAT are present but often remain empty. Windows Me does not process CONFIG.SYS during startup; instead, it depends on environment variables stored in the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
For the FlexOS operating system, CONFIG.SYS is a binary file defining resource managers and device drivers loaded during boot.
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 that serve as jump points for , , , and commands.
- Functions similarly to , but can also be used for inline comments following other directives. Note that under MS-DOS/PC DOS, inline comments inside double quotes are not ignored.
- Used at the start of inline comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands (FreeDOS supports this without custom messages but includes boot menu conditions). From DOS 6.0 onward, a similar feature exists by appending after a directive (e.g., ).
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs may be terminated upon encountering errors.
- Defines which drives record file access timestamps in FAT file systems.
- Enables conditional commands on AT-compatible hardware.
- Manages boot sequence selection.
- Adjusts the detail level of error message output.
- Alters the default serial port driver assigned to the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads the fundamental device driver into system memory.
- Produces an audible beep even if sound notifications are turned off.
- Indicates which operating system should boot next.
- Enables or disables extended Ctrl+C interrupt checking.
- Defines how many disk buffers should be allocated.
- Functions like BUFFERS but places buffers in HMA or UMB memory areas.
- Sets the maximum count of cache blocks allocated from the system pool.
- Specifies the maximum duration before unused cache blocks are returned to the system pool.
- Sets the maximum interval before dirty cache blocks are flushed to disk storage.
- Loads and executes a program listed in CONFIG.SYS, pausing further processing until it completes.
- Indicates the status of the keyboard Caps Lock key.
- Names the hardware driver for CD-ROM devices.
- Defines how many buffers are used for CD-ROM access operations.
- Continues processing CONFIG.SYS from another file or label.
- Specifies the type of system clock in use.
- Clears the display screen content.
- Designates OEM codepage(s) for character encoding.
- Identifies CMOS RAM address location.
- Sets color scheme for boot menu display.
- Defines count, logical sequence, I/O address, and timeout parameters for COM ports (applicable to DR-DOS 7.02 and later).
- Buffer allocation for DMA operations (specific to PTS-DOS).
- Redefines inline-comment lead characters or causes subsequent line to be ignored (behavior varies by OS).
- Activates and configures internationalization support (implementation depends on OS).
- , CPSW, CPU*, and related directives control cursor positioning, codepage switching, CPU type conditions, and RAM refresh rates primarily under PTS-DOS and DR-DOS platforms, with partial support across other DOS variants.
DTemplate:NbndF
- Configures repositioning of drive descriptor tables in memory.
- Specifies memory segment address used for multi-sector disk data deblocking routines.
- Enables internal debugger functionality within the system.
- Boot manager utility for selecting operating systems during startup.
- Loads a device driver into system memory for hardware support.
- Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage information affecting keyboard, screen, and printer devices.
- Configures sizes of cache memory allocations used by the system.
- Defines compatibility mode settings for floppy disk drives.
- Specifies font used for display output.
- Controls loading of DOS into high memory areas and/or utilization of upper memory blocks.
- Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory segments.
- Provides an alternative directory path for DOS system files.
- Defines search paths for locating data files during operation.
- Specifies physical parameters associated with disk drives.
- Sets configuration parameters for drives not explicitly recognized by the system.
- See .
- Enables creation of
PDUMP.nnnerror log files and designates their storage drive. - Displays a textual message on the screen interface.
- Outputs messages containing ANSI escape sequences for enhanced formatting.
- Determines whether additional validation checks occur when launching programs.
- Specifies a default error or return code to be assumed after execution of certain commands.
- Controls A20 gate state at program startup to manage memory addressing modes.
- Terminates CONFIG.SYS processing prematurely, except under certain conditions involving SWITCHES and SHELL directives.
- Defines size of hash tables used to accelerate file open operations (differs from MS-DOS/PC DOS FASTOPEN driver implementation).
- Sets maximum number of cached File Control Blocks that can be open simultaneously (shares buffer with FILES under DR-DOS).
- Equivalent to FCBS but explicitly loads these structures into upper memory areas.
- Boot manager functionality for operating system selection during bootup sequences.
- Specifies how many files can be opened concurrently by the system or applications.
- Similar to FILES but explicitly loads file handle tables into upper memory segments.
- Allows inclusion and execution of specified CONFIG.SYS subsections (refer to IGNORE directive).
GTemplate:NbndI
- Awaits a key press or timeout, returning an error level set to the ASCII value or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a specified label.
- Continues nested CONFIG.SYS execution at a given label and then returns 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 information.
- Consult for details.
- Loads a TSR program after relocating the DOS data segment; compare with INSTCDEX.
- Refer to , , or for related uses.
- See for further reference.
- Consult or for additional guidance.
- Activates console and command line history buffer featuring enhanced pattern searching.
- Defines the address of the High Memory Area (HMA) segment.
- Configures power-saving mode using HLT instruction.
- Specifies whether to perform boot sector virus scanning.
- Loads installable file system drivers.
- Prevents execution of designated CONFIG.SYS subsections.
- Permits certain programs to execute at CPU ring 2, allowing direct hardware I/O access.
- Incorporates directives from an alternate menu block (emulatable by GOSUB/RETURN in DR-DOS).
- Sets the keyboard's Insert mode status.
- Installs a TSR program into conventional memory.
- Loads a TSR program into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
- Installs TSR after relocating DOS data segment (see also INSTCDEX).
- Adjusts PIC interrupt priorities, assigning highest priority to the specified IRQ line.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated keyboard buffer's memory address.
- Sets the maximum number of accessible drives in the system.
- Functions like LASTDRIVE but loads Current Directory Structure into upper memory.
- Determines search paths for dynamic-link libraries (DLLs).
- Manages backward compatibility with legacy software.
- Establishes the count of file locks allowed.
- Configures display of boot logo using PTS-DOS boot manager.
- Sets parameters such as count, order, I/O address, and timeout for the LPT1 printer port.
- Applies LPT1 settings similarly to LPT2 device configuration.
- Mirrors LPT1 configurations for LPT3 device usage.
- Enables and configures the LPT4 port in a comparable manner.
- Defines wait duration before elevating process priority levels.
- Sets strategy for memory allocation management.
- Specifies default DOS memory allocation approach.
- Declares menu options available during boot or configuration.
- Configures menu color schemes (emulatable under DR-DOS).
- Selects default menu block (emulatable within DR-DOS environment).
- Defines individual menu blocks (emulatable under DR-DOS).
- Enables operations involving multitrack disk access.
- Continues CONFIG.SYS processing in a new file after loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Determines the default character used for No () responses in Yes/No/Resume prompts.
- Toggles the state of the keyboard Num Lock key on or off.
- Enables conditional execution based on the last error code, such as .
- Displays text and pauses until a key is pressed, similar to and commands in DR-DOS.
- Requires user confirmation when errors occur in CONFIG.SYS processing.
- Configures buffer sizes for LPT port operations.
- Allows conditional execution on PC-compatible hardware platforms.
- Sets scheduling priority levels for processes or tasks.
- Adjusts priority specifically for disk input/output operations.
- ; Changes default printer device driver assignment among LPT1 through LPT4 ports.
- Limits execution of DOS programs according to specified criteria.
- Loads a user interface shell environment during startup or runtime.
- ; Enables conditional execution on IBM PS/1-compatible systems only.
- ; Enables conditional execution on IBM PS/2-compatible systems only.
- ; Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Adds comments within CONFIG.SYS files.
- Allocates a specific drive letter, preventing assignment to local block devices.
- Determines the default character for Resume () prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command location, optionally passing a return value.
- Specifies the amount of real mode memory available.
- Allows simultaneous loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Controls whether the first character of deleted files is saved in the FAT reserved area.
- Sets video display modes in FreeDOS or screen access methods in PTS-DOS.
- Changes the state of the keyboard Scroll Lock key.
- Defines environment variables for the system.
- Loads the command interpreter shell.
- Similar to SHELL but includes support for pre-allocating space to relocate COMMAND.COM into HMA or UMBs, enhancing memory efficiency with third-party shells.
- Configures keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Manages file closure behavior triggered by Ctrl+Alt+Del key combination.
- Skips the Power-On Self-Test (POST) during reboot operations.
- Serves as a compatibility placeholder due to differing stack structures in earlier versions of DR DOS.
- Specifies the number of hardware interrupt stacks available.
- Sets the default stack size allocated for new threads.
- Functions like STACKS but loads buffers into upper memory areas instead.
- Configuration settings for the boot manager.
- { { nobold |(MS-DOS 3.0 only, ignored in DR-DOS 7.02+) }}
- Directive intended for internal use only.
- { { mono |STUBA20 }} { { nobold |(PTS-DOS only) }}
- Controls behavior of the XMS A20 gate.
- { { mono |SUBMENU }} { { nobold |(DOS 6.0+, excluding DR DOS and FreeDOS) }}
- Defines submenu blocks, which are emulated in DR-DOS via CLS, ECHO, and SWITCH commands.
- { { mono |1=SUPPRESSPOPUPS }} { { nobold |(OS/2 3.0+ ) }}
- Redirects error information to a disk log instead of displaying popup dialogs.
- { { mono |1=SWAPPATH }} { { nobold |(OS/2 ) }}
- Sets the directory path for swap file storage.
- { { mono |1=SWITCH }} { { nobold |(DR DOS 6.0+ ) }}
- Enables conditional nested processing of CONFIG.SYS based on keypresses, supporting RETURN values.[1]
- { { mono |1=SWITCHAR }} { { nobold |(DOS 2.x, DR-DOS 7.02+, PTS-DOS, FreeDOS ) }}
- Defines the default system switch character ('/' or '-').
- { { mono |1=SWITCHES }} { { nobold |(DOS 4.0, Novell DOS 7+, ignored in PTS-DOS) }}
- Specifies special configuration options for system setup.
- { { mono |1=SXFAKEHWFPU }} { { nobold |(OS/2 Warp 4 FixPak 1+ ) }}
- Activates a patch addressing an FPU rounding error.
- { { mono |1=SYSBOOT }} { { nobold |(PTS-DOS only) }}
- Identifies alternative boot file names for DOS startup.
- { { mono |1=SYSGEN }} { { nobold |(PTS-DOS only) }}
- Configures memory locations for DOS components.
- { { mono |1=SYSLOAD }} { { nobold |(PTS-DOS only) }}
- Loads system files from an alternative disk area.
- { { mono |1=SYSTEMPOOL }} { { nobold |(Embedded DOS 6-XL only) }}
- Sets the size of the dynamic system memory pool allocation.
- { { mono |1=SYSTOUMB }} { { nobold |(PTS-DOS only) }}
- Loads DOS data and code into Upper Memory Blocks (UMBs).
- { { mono |1=THREADS } }{ { nobold |(OS/2 ) } }
- Specifies how many concurrent threads can be scheduled by the system's scheduler.
- {{ anchor |TIMEOUT } }{ { mono |1=TIMEOUT } }{ { nobold |(DR DOS 6.0+, PTS-DOS ) } }
- Configures timeout intervals for single-step processing in CONFIG.SYS and sets default responses to prompts.[1]
- {{ anchor |TIMESLICE } }{ { mono |1=TIMESLICE } }{ { nobold |(OS/2 ) } }
- Determines minimum and maximum time slices allocated by the scheduler.
- {{ anchor |TMPEXT } }{ { mono |1=TMPEXT } }{ { nobold |(PTS-DOS only) } }
- Defines the file extension used for temporary files by the system.
- {{ anchor |TRACE } }{ { mono |1=TRACE } }{ { nobold |(DR-DOS 7.02+, PTS-DOS, OS/2 ) } }
- Globally or locally enables or disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT.[2]
- {{ anchor |TRACEBUF } }{ { mono |1=TRACEBUF } }{ { nobold |(OS/2 ) } }
- Specifies buffer size for TRACE log data.
- {{ anchor |TRAPDUMP } }{ { mono |1=TRAPDUMP } }{ { nobold |(OS/2 3.0+ ) } }
- Records detailed diagnostic error information.
UTemplate:NbndZ
- Assigns a particular memory segment for use as an Upper Memory Block (UMB) in DOS.
- Designates the server responsible for managing UMBs.
- Sets specific address ranges allocated for UMB RAM.
- Toggles disk write verification on or off.
- Determines the DOS version number presented to applications.
- Configures the status of the VGA display.
- Defines the active video mode, functioning similarly to the SCREEN command in FreeDOS.
- Activates virtual DMA capabilities.
- Regulates the processor's Virtual Mode Extensions (VME).
- Sets parameters for Windows VxD drivers.
- Oversees system support functions within Windows.
- Controls relocation settings for the Extended BIOS Data Area (XBDA).
- Executes commands conditionally on XT-compatible hardware.
- Handles integrated Year 2000 compliance features.
- Specifies the default character used for affirmative responses in prompts.
- Monitors file deletion status.
Issues
Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT files, these configuration files are crucial for comprehensive operating system customization and meeting software prerequisites. Any corruption or damage to these files necessitates troubleshooting.
In cases where CONFIG.SYS does not include a SHELL directive—or if CONFIG.SYS is absent or corrupted—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to DOS 6.0 fail to boot if COMMAND.COM is missing. From MS-DOS 6.0/PC DOS 6.1 onward, including Novell DOS 7 and later, users are prompted to specify an alternative command interpreter path if COMMAND.COM is unavailable or aborted, enabling limited shell functionality without rebooting.
Due to incompatibilities between MS-DOS 7.x’s COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and above restrict bypassing SHELL directives during skip or trace modes (activated by Ctrl+F5/F7/F8). Subsequent updates introduced Ctrl+F6 as a recovery mechanism for invalid SHELL parameters. When skipping CONFIG.SYS processing without a defined SHELL, users must provide a valid shell filename before COMMAND.COM loads.
CONFIG.SYS file size restrictions differ by operating system: MS-DOS and PC DOS impose limits ranging from a few kilobytes up to 64 KB in later versions, whereas DR-DOS does not enforce size limits beyond those of the filesystem. MS-DOS compiles CONFIG.SYS into a tokenized format stored in memory, ensuring drivers load before TSRs in a fixed sequence. In contrast, DR-DOS interprets CONFIG.SYS line-by-line, allowing precise control over load order and conditional execution based on hardware detection or user input. This approach facilitates advanced setups such as debugging device drivers or temporarily loading software through the INSTALL command.
Limits on SHELL command line length also vary: MS-DOS/PC DOS versions from 2.0 through 4.01 allowed up to 31 characters, later versions expanded this limit to 128 characters, and DR-DOS supports up to 255 characters. Note that CONFIG.SYS directives do not accommodate 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. This renaming facilitates dual booting between Windows 9x and DOS by restoring these files temporarily as CONFIG.SYS and AUTOEXEC.BAT when booting into DOS mode. Additionally, Windows 95 creates backup copies named CONFIG.W40 and AUTOEXEC.W40.
In contrast, when Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, Windows retains its original CONFIG.SYS and AUTOEXEC.BAT filenames, while DR-DOS employs alternative startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS to set up drivers and environment parameters prior to launching its graphical user interface.
Within the Windows NT OS/2 subsystem, the configuration settings for OS/2 applications, typically found in CONFIG.SYS, are maintained within the system registry instead of traditional files.
OS/2 includes a variety of CONFIG.SYS commands that are not officially documented, highlighting the system's intricate configuration requirements.
CONFIG.SYS continues to be a fundamental component 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 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 command explanations
- User Manual for PTS-DOS 2000 Pro including CONFIG.SYS directives
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS commands