A short guide to the ed editor

edIs the original UNIX text editor, it is the most basic editor you can use. It is also rarely used ifonceUsed by most people.

Enter the following to runed. This will start an interactive session. Enter the following to enter the write modeaOn a line, then pressenter. Then enter everything you want, and when you’re done, just write a dot (.),then pressenter.

Type nowwFollowing this is the file name to save the buffer to the file. It will return the number of bytes written to the file.

Then you can pressqdrop out.

you can use itedCall it by using the file name:ed <filename>. When you pressaTo add, add content at the bottom of the file.

insideedConversations you can enter,pPrint the contents of the current file.

Download mine for freeLinux Command Manual

More cli tutorials: