ArticleslgStudy

science

CONFIG.SYS

CONFIG.SYS is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand CONFIG.SYS rather than just read about it. In short: CONFIG.SYS is the configuration file for the DOS and OS/2 operating systems that specifies startup options – options that cannot be changed after the system has booted. The data it contains is read by the system and used to configure many aspects including memory management, peripherals and applications.

CONFIG.SYS — main illustration
CONFIG.SYS — illustration

Key takeaways

  • CONFIG.SYS belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect CONFIG.SYS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of CONFIG.SYS from memory before moving on to harder problems.

Reference excerpt

CONFIG.SYS is the configuration file for the DOS and OS/2 operating systems that specifies startup options – options that cannot be changed after the system has booted. The data it contains is read by the system and used to configure many aspects including memory management, peripherals and applications. Each line can contain a name-value pair that is either a directive that sets the value of a system setting or with name "DEVICE" extends system capability by loading a file such as a device driver or a terminate-and-stay-resident (TSR) program. CONFIG.SYS was introduced with DOS 2.0. As Windows technology diverged from DOS over time, use of CONFIG.SYS diminished. Both CONFIG.SYS and AUTOEXEC.BAT are in the root folder of the Windows 95 and Windows 98 boot drives, but typically, they are empty. Windows Me does not use a CONFIG.SYS file at all. Instead, it loads environment variables from the Windows Registry key: HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

Use

User maintained The file is maintained by a user in order to control the behavior of the system. As an ASCII text file, a user generally edits it via a text editor.

System consumed During boot, the DOS BIOS loads the file from the root directory of the drive from which the system boots. After processing the file, the system loads and executes the command shell specified in the SHELL line, or COMMAND.COM if there is no such line. The command shell in turn is responsible for processing the AUTOEXEC.BAT file.

Missing/corrupt Even though loading CONFIG.SYS is part of a normal bootup process, the system can boot if the file is missing or corrupt. A system probably requires troubleshooting if the file gets deleted or corrupted.

Default shell If CONFIG.SYS does not contain a SHELL directive (or the file is corrupt or missing), 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. (In the case of COMMAND.COM, the internal EXIT command is disabled only when the shell was started with /P.) 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 (Ctrl+)F5/F7/F8 "skip"/"trace"/"step" modes. (Some later issues added (Ctrl+)F6 to reinvoke the former F5 "skip" behaviour in order to allow recovery from problems with invalid SHELL arguments as well.) Also, if no SHELL directive could be found when skipping CONFIG.SYS processing via (Ctrl+)F5 (and also with (Ctrl+)F7/F8, when the default file extension has been changed with SYS /DR:ext), the user is prompted to enter a valid shell file name before trying to load COMMAND.COM from the root. Pressing ↵ Enter without specifying a file will assume the former default.

File size limit Depending on the version, the size of the CONFIG.SYS file is limited to a few kilobytes under MS-DOS/PC DOS (up to 64 KB in most recent versions), whereas the file's size is unlimited under DR-DOS. This is because the former operating systems (since DOS 3.0) will compile the file into some tokenized in-memory representation before they sort and regroup the directives to be processed in a specific order (with device drivers always being loaded before TSRs), 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 (for example to solve load order conflicts or to load a program debugger before a device driver to be debugged) 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.

Data limits 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 (a name already used in earlier versions of DR DOS) and AUTODOS7.BAT.

OS/2 OS/2 uses a CONFIG.SYS file for configuring options, drivers and environment before the graphical subsystem loads. There are many undocumented or poorly documented CONFIG.SYS directives used by OS/2. CONFIG.SYS continues to be used by the OS/2 derivatives eComStation and ArcaOS. In the OS/2 subsystem of Windows NT, what appeared as CONFIG.SYS to OS/2 programs is actually stored in the registry.

Example An example CONFIG.SYS for MS-DOS 5:

Variations Some DOS variants load a file with an alternate name if its exists instead of loading from the default CONFIG.SYS:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with CONFIG.SYS

Start with the simplest possible case. Write down what CONFIG.SYS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to CONFIG.SYS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about CONFIG.SYS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of CONFIG.SYS

In research
CONFIG.SYS appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses CONFIG.SYS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
CONFIG.SYS is common in secondary-school and first-year university syllabi. It links to neighbouring topics Configuration files, DOS configuration files, OS/2 files, so understanding it makes those chapters shorter.
In everyday life
Look for CONFIG.SYS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “CONFIG.SYS” →

How to study CONFIG.SYS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what CONFIG.SYS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain CONFIG.SYS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is CONFIG.SYS in simple terms?

CONFIG.SYS is the configuration file for the DOS and OS/2 operating systems that specifies startup options – options that cannot be changed after the system has booted. The data it contains is read by the system and used to configure many aspects including memory management, peripherals and applica…

Why does CONFIG.SYS matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study CONFIG.SYS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on CONFIG.SYS.

Tags

  • Configuration files
  • DOS configuration files
  • OS/2 files

Keep exploring