Edlin is a
line editor
In computing, a line editor is a text editor in which each editing command applies to one or more complete lines of text designated by the user. Line editors predate screen-based text editors and originated in an era when a computer operator typic ...
, and the only
text editor
A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
provided with early versions of
IBM PC DOS,
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
and
OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
. Although superseded in MS-DOS 5.0 and later by the full-screen
MS-DOS Editor, and by
Notepad in
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, it continued to be included in the 32-bit versions of Microsoft operating systems up to Windows Server 2008 and Windows 10.
History

Edlin was created by
Tim Paterson in two weeks in 1980, for
Seattle Computer Products's
86-DOS (QDOS) based on the
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
context editor ''ED'', itself distantly inspired by the
DEC PDP-10 TOPS-10 EDIT text editor.
Microsoft acquired 86-DOS and, after some further development, sold it as MS-DOS, so Edlin was included in v1.0–v5.0 of MS-DOS. From MS-DOS 6 onwards, the only editor included was the new full-screen
MS-DOS Editor.
Windows 95
Windows 95 is a consumer-oriented operating system developed by Microsoft and the first of its Windows 9x family of operating systems, released to manufacturing on July 14, 1995, and generally to retail on August 24, 1995. Windows 95 merged ...
,
98 and
ME ran on top of an embedded version of DOS, which reports itself as
MS-DOS 7. As a successor to MS-DOS 6, this did not include Edlin.
However, Edlin is included in the 32-bit versions of
Windows NT
Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
and its derivatives—up to and including
Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. The successor to Windows 8.1, it was Software release cycle#Release to manufacturing (RTM), released to manufacturing on July 15, 2015, and later to retail on July 2 ...
—because the
NTVDM
Virtual DOS machines (VDM) refer to a technology that allows running 16-bit/32-bit DOS and 16-bit Windows programs when there is already another operating system running and controlling the hardware.
Overview
Virtual DOS machines can operate e ...
's DOS support in those operating systems is based on MS-DOS version 5.0. However, unlike most other external DOS commands, it has not been transformed into a native
Win32 program. It also does not support
long filenames, which were not added to MS-DOS and Windows until long after Edlin was written.
The
FreeDOS version was developed by Gregory Pietsch.
Usage
There are only a few commands. The short list can be found by entering a ? at the edlin prompt.
When a file is open, typing L lists the contents (e.g.,
1,6L
lists lines 1 through 6). Each line is displayed with a line number in front of it.
*1,6L
1: Edlin: The only text editor in early versions of DOS.
2:
3: Back in the day, I remember seeing web pages
4: branded with a logo at the bottom:
5: "This page created in edlin."
6: The things that some people put themselves through. ;-)
*
The currently selected line has an *. To replace the contents of any line, the line number is entered and any text entered replaces the original. While editing a line pressing Ctrl-C cancels any changes. The * marker remains on that line.
Entering I (optionally preceded with a line number) inserts one or more lines before the * line or the line given. When finished entering lines, Ctrl-C returns to the edlin command prompt.
*6I
6:*(...or similar)
7:*^C
*7D
*L
1: Edlin: The only text editor in early versions of DOS.
2:
3: Back in the day, I remember seeing web pages
4: branded with a logo at the bottom:
5: "This page created in edlin."
6: (...or similar)
*
:i - Inserts lines of text.
:D - deletes the specified line, again optionally starting with the number of a line, or a range of lines. E.g.:
2,4d
deletes lines 2 through 4. In the above example, line 7 was deleted.
:R - is used to replace all occurrences of a piece of text in a given range of lines, for example, to replace a spelling error. Including the ? prompts for each change. E.g.: To replace 'prit' with 'print' and to prompt for each change:
?rprit^Zprint
(the ^Z represents pressing CTRL-Z). It is case-sensitive.
:S - searches for given text. It is used in the same way as replace, but without the replacement text. A search for 'apple' in the first 20 lines of a file is typed
1,20?sapple
(no space, unless that is part of the search) followed by a press of enter. For each match, it asks if it is the correct one, and accepts n or y (or Enter).
:P - displays a listing of a range of lines. If no range is specified, P displays the complete file from the * to the end. This is different from L in that P changes the current line to be the last line in the range.
:T - transfers another file into the one being edited, with this syntax:
ine to insert at ull path to file
:W - (write) saves the file.
:E - saves the file and quits edlin.
:Q - quits edlin without saving.
Scripts
Edlin may be used as a non-interactive file editor in scripts by
redirecting a series of edlin commands.
edlin < script
FreeDOS Edlin
A
GPL-licensed
clone of Edlin that includes long filename support is available for download as part of the
FreeDOS project. This runs on operating systems such as
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
or
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
as well as MS-DOS.
See also
*
List of DOS commands
*
ed and
ex, similar
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
line editors.
*
86-DOS
References
Further reading
*
External links
Edlin , Microsoft DocsOpen source EDLIN implementation that comes with MS-DOS v2.0
{{Windows commands
1980 software
Console applications
DOS text editors
Line editor
OS/2 commands
Microsoft free software
Windows components
Windows text editors