CONFIG.SYS
CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special ASCII text file that contains user-accessible setup or configuration directives evaluated by the operating system's DOS BIOS during boot. CONFIG.SYS was introduced with DOS 2.0.
Usage
The directives in this file configure DOS for use with devices and applications in the system. The CONFIG.SYS directives also set up the memory managers in the system. After processing the CONFIG.SYS file, DOS proceeds to load and execute the command shell specified in the SHELL line of CONFIG.SYS, or COMMAND.COM if there is no such line. The command shell in turn is responsible for processing the AUTOEXEC.BAT file.CONFIG.SYS is composed mostly of name=value directives which look like variable assignments. In fact, these will either define some tunable parameters often resulting in reservation of memory, or load files, mostly device drivers and TSRs, into memory.
In DOS, CONFIG.SYS is located in the root directory of the drive from which the system was booted.
The filename is also used by , an MS-DOS derivative by the former East-German VEB Robotron.
Some versions of DOS will probe for alternative filenames taking precedence over the default CONFIG.SYS filename if they exist:
While older versions of Concurrent DOS 3.2 to 4.1 did not support CONFIG.SYS files at all, later versions of Concurrent DOS 386 and Concurrent DOS XM, as well as Multiuser DOS, System Manager and REAL/32 will probe for CCONFIG.SYS instead of CONFIG.SYS. Some versions of Multiuser DOS use a filename of CCONFIG.INI instead, whereas REAL/32 is known to look for MCONFIG.SYS. These operating systems support many additional and different configuration settings not known under MS-DOS/PC DOS, but they are stored in the binary repository named CCONFIG.BIN rather than in CCONFIG.INI. Both files are typically modified through a configuration utility named CONFIG.EXE only.
Under DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and higher, a file named DCONFIG.SYS, if present, will take precedence over CONFIG.SYS. Since DR DOS 6.0 this was used in conjunction with disk compression software, where the original boot drive C: would become drive D: after loading the compression driver, but it is commonly used to help maintain multiple configuration files in multi-boot scenarios.
In addition to this, OpenDOS 7.01 and DR-OpenDOS 7.02 will look for a file named ODCONFIG.SYS, whereas some issues of DR-DOS 7.02 and higher will instead also look for DRCONFIG.SYS.
Further, under DR DOS 6.0 and higher, the
SYS /DR:ext
command can be used to change the default file extensions. For example, with SYS /L /DR:703
the written Volume Boot Record would look for a renamed and modified IBMBIO.703 system file and the IBMBIO.703 would look for IBMDOS.703 and CONFIG.703, so that multiple parallel sets of files can coexist in the same root directory and be selected via a boot-loader like LOADER, supplied with Multiuser DOS and DR-DOS 7.02/7.03. The SHELL directive is enhanced to provide means to specify alternative AUTOEXEC.BAT files via /P and in this specific scenario, COMMAND.COM will accept file extensions other than ".BAT
" as well. Under DR DOS 6.0 and higher, the CONFIG.SYS directive CHAIN=filespec can be used to continue processing in the named file, which does not necessarily need to reside in the root directory of the boot drive. DR-DOS 7.02 and higher optionally support an additional parameter as in CHAIN=filespec,label to jump to a specific :label in the given file.DR-DOS 7.03 and higher support a new
SYS /A
parameter in order to copy the corresponding CONFIG.SYS and AUTOEXEC.BAT files alongside with the system files.FreeDOS implements a similar feature with its FDCONFIG.SYS configuration file. RxDOS 7.24 and higher use RXCONFIG.SYS instead. PTS-DOS uses CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT can be found included in the root folder of Windows 95, and Windows 98 boot drives, as they are based on DOS. Typically, these files are left empty, with no content, as they are not strictly required to run Windows programs from these versions.
Windows ME does not even parse the CONFIG.SYS file during the Windows boot process, loading those settings from the Windows Registry instead:
Under FlexOS, CONFIG.SYS is a binary file defining the resource managers and device drivers loaded.
CONFIG.SYS directives
;; ; : Similar to REM, but can be used also for in-line comments. See COMMENT.
; * : Used to lead in in-line comments in addition to the ; directive.
; ? : Displays a Yes/No query and optional message to ask the user for confirmation to execute the following CONFIG.SYS directives.
; ! : Unconditionally execute the following CONFIG.SYS directive.
; ABORT : Specifies if programs can be aborted on errors.
; ACCDATE : Configures which drives should store file access date stamps in the reserved area of directory entries in FAT file systems.
; AT : Conditional execution on AT-compatible machines only.
; AUTOCHECK : Boot manager.
; AUTOFAIL : Configures verbosity of error messages.
; AUX : Changes internal default serial device driver for AUX: device.
; AVAILDEV : Disables the availability of character devices outside phantom \DEV directory.
; BASEDEV : Loads base device driver into memory.
; BEEP : Emits a short beep, even if audible notifications are disabled via SWITCHES=/Q.
; BOOTNEXT : Specifies operating system to be booted.
; BREAK : Sets or clears extended checking.
; BUFFERS : Specifies the number of disk buffers to allocate.
; BUFFERSHIGH : Same as BUFFERS, but explicitly loads buffers into HMA or UMB.
; CACHESIZE : Maximum number of 512-byte cache blocks dynamically allocated from system pool.
; CACHETTL : Maximum time in ms before unused cache blocks are returned to system pool.
; CACHEFLUSH : Maximum time in ms before a dirty cache block gets flushed to disk.
; CALL : Similar to INSTALL under DOS, loads programs in CONFIG.SYS. Similar to RUN under OS/2, but runs in foreground and halts CONFIG.SYS processing until return.
; CAPSLOCK : Specifies whether the keyboard status is turned on or off.
; CDDNAME : Specifies the name of the CD-ROM hardware driver.
; CDDBUFFERS : Specifies the number of buffers for CD-ROM access.
; CHAIN : Continues CONFIG.SYS processing in new file and at optional label.
; CLOCK : Specifies the type of clock used by the system.
; CLS : Clears screen.
; CODEPAGE : Specifies the OEM codepage.
; CMOSADDR : Specifies the address of the CMOS RAM.
; COLOR : Specifies colors for boot menus.
; COM1 : Defines count and logical order and configures I/O address and timeout for COM1: device.
; COM2 : Defines count and logical order and configures I/O address and timeout for COM2: device.
; COM3 : Defines count and logical order and configures I/O address and timeout for COM3: device.
; COM4 : Defines count and logical order and configures I/O address and timeout for COM4: device.
; COMAREA : Specifies buffer for DMA.
; COMMENT : Redefines the lead-in character for CONFIG.SYS inline-comments, or causes the following line to be ignored.
; COUNTRY : Enables and configures international support.
; CPOS : Sets display cursor to specified position for configuration menus.
; CPSW : For codepage switching support.
; CPU : Specifies RAM refresh speed.
; CPU88 : Conditional execution on 8088 CPUs only.
; CPU88+ : Conditional execution on 8088 and higher CPUs only.
; CPU86 : Conditional execution on 8086 CPUs only.
; CPU86+ : Conditional execution on 8086/8088 and higher CPUs only.
; CPU286 : Conditional execution on 286 CPUs only.
; CPU286+ : Conditional execution on 286 and higher CPUs only.
; CPU386 : Conditional execution on 386 and higher CPUs only, f.e. or
; CPU386+ : Conditional execution on 386 and higher CPUs only.
; CPU486 : Conditional execution on 486 CPUs only.
; CPU486+ : Conditional execution on 486 and higher CPUs only.
; DDSCS : Configures the relocation of the drive descriptor tables.
; DEBLOCK : Specifies the memory segment address up to which multi-sector disk data deblocking is allowed.
; DEBUG : Enables internal debugger support.
; DEFAULT : Boot manager.
; DEVICE : Loads a device driver into memory.
; DEVICEHIGH : Loads a device driver into upper memory.
; DEVINFO : Configures country and codepage information for KBD, SCR, LPT1, LPT2, LPT3 devices.
; DISKCACHE : Configures cache memory sizes.
; DISKETTE : Specifies floppy disk compatibility mode.
; DISPLAY : Specifies display font.
; DOS : Specifies whether to load DOS into the high memory area and/or use upper memory.
; DOSDATA : Specifies whether to load DOS tables into upper memory.
; DOSDIR : Specifies alternative path to search for DOS files.
; DPBS
; DPATH : Specifies the search path for data files.
; DRIVATTR : Specifies physical parameters of disk drives.
; DRIVPARM : Define parameters for unrecognized drives.
; DRSWITCH : See SWITCH.
; DUMPPROCESS : Enables and specifies drive for
PDUMP.nnn
error logs.; ECHO : Displays a message on screen.
; EECHO : Displays a message including ANSI Escape sequences.
; ERREXE : Specifies if additional checks should be carried out when starting programs.
; ERROR : Specifies an error / return code to be assumed in the following.
; EXECA20OFF : Specifies the state of the A20 gate when starting a program.
; EXIT : Finishes CONFIG.SYS processing before the end of the file has been reached.
; FASTOPEN : Specified the size of the hash table for fast file open operations. Works considerably differently from the external MS-DOS/PC DOS FASTOPEN driver.
; FCBS : Specifies the number of cached FCBs that can be opened at once.
; FCBSHIGH : Same as FCBS, but explicitly loads FCBs into upper memory.
; FILENAME : Boot manager.
; FILES : Specifies the number of files that can be opened at once.
; FILESHIGH : Same as FILES, but explicitly loads file handles into upper memory.
; FORCE : Include execution of specified CONFIG.SYS subsections. See IGNORE.
; GETKEY : Waits for key and sets error level to its ASCII code.
; GOTO : Continues CONFIG.SYS processing at specified label.
; GOSUB : Continues nested CONFIG.SYS processing at specified label, with RETURN returning to old location.
; HIBUFFERS : See BUFFERSHIGH or DOS=HIGH,UMB or DOSDATA.
; HIDEVICE : See DEVICEHIGH.
; HIDOS : See DOS=HIGH,UMB.
; HIFCBS : See FCBSHIGH or DOSDATA.
; HIFILES : See FILESHIGH or DOSDATA.
; HIINSTALL : See INSTALLHIGH.
; HIINSTALLLAST : Installs a TSR program into memory, like HIINSTALL, but installs after the DOS data segment relocation. Compare also: INSTCDEX.
; HILASTDRIVE : See LASTDRIVEHIGH or DOS=UMB or DOSDATA.
; HISHELL : See SHELLHIGH.
; HISTACKS : See STACKSHIGH or DOSDATA.
; HISTORY : Enables and configures console and command line history buffer and extended pattern search functionality.
; HMAREA : Specifies the address of the HMA segment.
; IDLEHALT : Configures HLT energy saving.
; IDTCHK : Specifies if the system should check for boot sector viruses.
; IFS : Loads installable file systems.
; IGNORE : Exclude execution of specified CONFIG.SYS subsections. See FORCE.
; IOPL : Specifies programs which should be allowed to run at ring 2 in order to directly access the hardware for I/O.
; INCLUDE : Include directives from another menu block.
; INSERT : Specifies whether the keyboard mode status is turned on or off.
; INSTALL : Installs a TSR program into memory.
; INSTALLHIGH : Installs a TSR program into upper memory.
; INSTALLLAST : Installs a TSR program into memory, like INSTALL, but installs after the DOS data segment relocation. Compare also: INSTCDEX.
; IRQPRIORITY : Rotates PIC controller interrupt priorities so that specified number gets the highest priority
; KEYBOARD : Specifies the keyboard layout.
; KEYBUF : Specifies the address of the relocated keyboard buffer.
; LASTDRIVE : Specifies the maximum of drives that can be accessed.
; LASTDRIVEHIGH : Same as LASTDRIVE, but explicitly loads the Current Directory Structure into upper memory.
; LIBPATH : Specifies a list of search paths for DLLs.
; LOADFIX : Specifies how old programs should be handled.
; LOCKS : Specifies number of file locks.
; LOGO : Configures boot logo support under MS-DOS. Allows to display startup message in conjunction with PTS-DOS boot manager.
; LPT1 : Defines count and logical order and configures I/O address and timeout for LPT1: device.
; LPT2 : Defines count and logical order and configures I/O address and timeout for LPT2: device.
; LPT3 : Defines count and logical order and configures I/O address and timeout for LPT3: device.
; LPT4 : Enables, defines count and logical order and configures I/O address and timeout for LPT4: device.
; MAXWAIT : Specifies time before a waiting process gets a higher priority.
; MEMMAN : Configures memory allocation strategy
; MEMORY : Specifies the default DOS memory allocation strategy.
; MENU : Defines menu options.
; MENUCOLOR : Specifies menu colors.
; MENUDEFAULT : Specifies the default menu block.
; MENUITEM : Specifies a menu block.
; MULTITRACK : Specifies whether multitrack disk operations are used or not.
; NEWFILE : Continues CONFIG.SYS processing in new file and optionally after loading a specific device driver and setting %NEWFILE% environment variable.
; NOCHAR : Specifies the default No character in Yes/No/Resume questions.)
; NUMLOCK : Specifies whether the keyboard Num Lock| status is turned on or off.
; ONERROR : Conditional execution depending on last return code/error status only, f.e. or .
; PAUSE : Similar to ECHO and GETKEY under DR-DOS, displays a text and waits for a key press.
; PAUSEONERROR : Specifies if user must acknowledge errors in CONFIG.SYS.
; PRINTMONBUFSIZE : Configures buffer size for LPT1, LPT2, LPT3.
; PC : Conditional execution on PC-compatible machines only.
; PRIORITY : Configures priority scheduler.
; PRIORITY_DISK_IO : Configures priority of programs using disk I/O.
; PRN : Changes internal default printer device driver for PRN device.
; PROTECTONLY : Specifies if DOS programs can be run or not.
; PROTSHELL : Loads user interface.
; PS1 : Conditional execution on PS/1-compatible machines only.
; PS2 : Conditional execution on PS/2-compatible machines only.
; QUIET : Mutes display output send to STDOUT.
; REIPL : Specifies if system should reboot automatically on errors.
; REM : Allows comments in CONFIG.SYS.
; RESERVEDRIVELETTER : Specifies a drive letter not to be used up for local block device drivers.
; RESUMECHAR : Specifies the default Resume character in Yes/No/Resume queries.)
; RETURN : Returns nested CONFIG.SYS processing at previous location of GOSUB or SWITCH directive. An optional return code can be given, otherwise 0 is assumed.
; RMSIZE : Defines the real mode memory size.
; RUN : Similar to CALL, loads programs in CONFIG.SYS. Similar to INSTALL under DOS and CALL under OS/2, but loads programs in background concurrently.
; SAVENAME : Specifies, if the first character of deleted files should be stored in the reserved area of directory entries in the FAT file system.
; SCREEN : Similar to VIDEOMODE under PTS-DOS, specifies the video mode to be used under FreeDOS. Under PTS-DOS, SCREEN does not specify the video mode but screen access methods.
; SCROLLOCK
; SET : Sets environment variables.
; SHELL : Loads the command interpreter shell.
; SHELLHIGH : Same as SHELL, but supports an additional SIZE parameter to define the size of the pre-allocation for COMMAND.COM to relocate its resident portion into the HMA
; SHIFTSTATE : Specifies the state of the keyboard modifiers like Shift Lock, Num Lock, Scroll Lock or Insert mode.
; SHUTDOWN : Specifies if files should be closed on.
; SOFTREBOOT : Specifies if POST should be skipped on reboots.
; STACK : Compatibility dummy - DR DOS 3.31 - 6.0 were mostly reentrant and had a different stacks layout.
; STACKS : Specifies the number of stacks for hardware interrupts.
; STACKSIZE : Default stack size allocated for new threads.
; STACKSHIGH : Same as STACKS, but explicitly loads buffers into upper memory.
; STORAGE : Boot manager.
; STRING : Internal use.
; STUBA20 : Specifies how XMS A20 gate control should work.
; SUBMENU : Specifies a submenu block.
; SUPPRESSPOPUPS : Specifies a drive where to log error information instead of displaying a textmode popup screen.
; SWAPPATH : Specifies swap file path.
; SWITCH : Conditionally continues nested CONFIG.SYS processing at one of the specified labels depending on keys pressed, with RETURN returning to old location.
; SWITCHAR : Defines the default SwitChar used by the system.
; SWITCHES : Specifies special options.
; SXFAKEHWFPU : Specifies if a fix for a FPU rounding bug should be activated or not.
; SYSBOOT : Specifies file name of alternative DOS operating systems to boot.
; SYSGEN : Configures the location of the various DOS parts in memory.
; SYSLOAD : Load system from alternative disk area.
; SYSTEMPOOL : Size of system memory pool from which the system dynamically allocates for various purposes
; SYSTOUMB : Specifies if DOS data and code should be loaded into UMBs.
; THREADS : Specifies number of concurrent threads.
; TIMEOUT : Specifies the timeouts in CONFIG.SYS single-stepping and with SWITCH, GETKEY and ?, and the default answers for Yes/No queries and SWITCH selections. PTS-DOS only supports the timeout value.
; TIMESLICE : Configures minimum and maximum time slices for scheduler.
; TMPEXT : Specifies the file extension for temporary files.
; TRACE : Globally or locally enables or disables CONFIG.SYS single-stepping execution. The functionality under OS/2 differs significantly from that under DOS.
; TRACEBUF : Specifies size of TRACE log buffer.
; TRAPDUMP : Logs detailed error information.
; UMB : Configures DOS management to use a specific segment as UMB memory.
; UMBSRV : Configures the UMB server used.
; USERAM : Specifies the address ranges used as UMB RAM.
; VERIFY : Enables or disables disk write verification.
; VERSION : Specifies the DOS version to be reported to programs.
; VGASCREEN : Configures VGA display status.
; VIDEOMODE : Similar to SCREEN under FreeDOS, specifies current video mode.
; VIRTDMA : Specifies if virtual DMA can be used.
; VME : Specifies if the processor's Virtual Mode Extensions should be deactivated or not.
; VXD : Configures VxD driver for Windows.
; WINDOWS : Configures system support for Windows.
; XBDA : Configures the relocation of the Extended BIOS data area
; XT : Conditional execution on XT-compatible machines only.
; YEAR2000 : Configures the built-in Year 2000 support.
; YESCHAR : Specifies the default Yes character in Yes/No/Resume queries.
; ZOMBIEDRV : Configures deletion tracking.
Issues
The system can still boot if these files are missing or corrupted. However, these two files are essential for the complete bootup process to occur with the DOS operating system. They contain information that is used to customize the operating system for personal use. They also contain the requirements of different software application packages. A DOS system would require troubleshooting if either of these files became damaged or corrupted.If CONFIG.SYS does not contain a SHELL directive, DOS typically searches for COMMAND.COM in the root directory of the boot drive. If this is not found, versions of DOS before 6.0 will not start up. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and higher will instead display a prompt to enter the path and filename of a command processor. This recovery prompt is also displayed when the primary command processor is aborted due to faults or if it is exited deliberately. This also provides limited means to replace the shell at runtime without having to reboot the system.
Since the MS-DOS 7.0 and higher COMMAND.COM executable is incompatible with DR-DOS, but typically resides in the root of drive C: in dual-boot scenarios with DR-DOS, DR-DOS 7.02 and higher no longer allow to bypass SHELL directives in // "skip"/"trace"/"step" modes. Also, if no SHELL directive could be found when skipping CONFIG.SYS processing via , the user is prompted to enter a valid shell file name before trying to load COMMAND.COM from the root. Pressing without specifying a file will assume the former default.
Depending on the version, the size of the CONFIG.SYS file is limited to a few kilobytes under MS-DOS/PC DOS, whereas the file's size is unlimited under DR-DOS. This is because the former operating systems will compile the file into some tokenized in-memory representation before they sort and regroup the directives to be processed in a specific order, whereas DR-DOS interprets the file and executes most directives line-by-line, thereby giving full control over the load order of drivers and TSRs via DEVICE and INSTALL and allowing to adapt the user interaction and change the flow through the file based on conditions like processor types installed, any type of keys pressed, load or input errors occurring, or return codes given by loaded software. This becomes particularly useful since INSTALL can also be used to run non-resident software under DR-DOS, so that temporary external programs can be integrated into the CONFIG.SYS control flow.
In MS-DOS/PC DOS 2.0 through 4.01, the length of the SHELL line was limited to 31 characters, whereas up to 128 characters are possible in later versions. DR-DOS even accepts up to 255 characters. CONFIG.SYS directives do not accept long filenames.
Dual booting DOS and Windows 9x
When installing Windows 95 over a preexisting DOS/Windows install, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS. This is intended to ease dual booting between Windows 9x and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS and AUTOEXEC.BAT. Backups of the Windows 95 versions are made as CONFIG.W40 and AUTOEXEC.W40 files.When Caldera DR-DOS 7.02/7.03 is installed on a system already containing Windows 95, Windows' CONFIG.SYS and AUTOEXEC.BAT retain those names. DR-DOS' startup files are installed as DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
uses the CONFIG.SYS file extensively for setting up its configuration, drivers and environment before the graphical part of the system loads.In the OS/2 subsystem of Windows NT, what appeared as CONFIG.SYS to OS/2 programs was actually stored in the registry.
There are many undocumented or poorly documented CONFIG.SYS directives used by OS/2.