How To Install Ed?

How To Install Ed?

ed

The original Unix text editor.

Maintainer: Martin Zobel-Helas



Section: editors

Install ed

  • Debian apt-get install ed Click to copy
  • Ubuntu apt-get install ed Click to copy
  • Alpine OS apk add ed Click to copy
  • Arch Linux pacman -S ed Click to copy
  • Kali Linux apt-get install ed Click to copy
  • CentOS yum install ed Click to copy
  • Fedora dnf install ed Click to copy
  • Raspbian apt-get install ed Click to copy
  • macOS brew install ed Click to copy

The original Unix text editor.

How to use ed?

Below are few example commands for ed that you can use in the terminal.

Start ed, editing an empty document (which can be saved as a new file in the current directory):
edClick to copy
Start ed, editing an empty document, with `:` as a command prompt indicator:
ed -p :Click to copy
Start ed editing an existing file (this shows the byte count of the loaded file):
ed -p : path/to/fileClick to copy
Toggle the printing of error explanations. (By default, explanations are not printed and only a `?` appears):
HClick to copy
Add text to the current document. Mark completion by entering a period by itself in a new line:
a<Enter>text_to_insert<Enter>.Click to copy
Print the entire document (`,` is a shortcut to the range `1,$` which covers the start to the end of the document):
,pClick to copy
Write the current document to a new file (the filename can be omitted if `ed` was called with an existing file):
w filenameClick to copy
Quit ed:
qClick to copy
To install the latest version of ed in your favorite operating system just copy the ed installation command from above and paste it into terminal. It will download and install the latest version of ed 2026 package in your OS.