Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Microsoft Edit: Install and Use the Windows Terminal Text Editor

Open a text file from PowerShell or Command Prompt with Microsoft Edit, install it with winget if needed, and save without leaving the terminal.

Table of Contents

In PowerShell or Command Prompt, run edit "notes.txt" to open a text file in Microsoft Edit. If Windows doesn’t recognize edit, install the open-source editor or run the release executable directly. Editing an ordinary file in your own folder doesn’t require administrator rights.

Install Microsoft Edit if it isn’t already available

On a PC with Windows Package Manager, open a terminal and run:

winget install --id Microsoft.Edit --exact

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 3

Open a new terminal afterward if the command isn’t recognized. You can also download the appropriate release archive from the Microsoft Edit repository, extract it, and launch edit.exe from that folder. If multiple copies are installed, where.exe edit shows the locations Windows finds.

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 1

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 2

Open, edit, and save a file

Run Edit from the folder containing the file or give it a full path. Put the full path in double quotes if it contains spaces.

edit "notes.txt"
edit "My script.bat"

Use Ctrl + S to save, Ctrl + F to find text, and Ctrl + Z to undo. The on-screen menus show the shortcuts for your installed version.

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 4

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 5

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 6

Edit scripts without running them

Edit opens batch and PowerShell scripts as text. Saving your changes doesn’t execute the script. Review the commands and test your own changes from the shell when you’re ready. Start in a folder you can write to if you’re learning, so permissions on system files don’t interfere.

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 7

Microsoft Edit is the Command Prompt editor you've been waiting for. Picture 8

For related shell commands, see the Windows and PowerShell references in the TipsMake utility hub.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.