Home » How To » How To Install and Use Microsoft Edit (Windows Command Line Text Editor)

How To Install and Use Microsoft Edit (Windows Command Line Text Editor)

Learn how to install the new Microsoft Edit, a command-line text editor for Windows, and use it.

For a long time, one of the features missing from Windows has been a good command-line text editor. While you have Notepad, it is a separate GUI (Graphical User Interface) application and requires you to open it to create or edit a text file. That means you cannot edit files directly in the command-line interface.

Thankfully, that is now fixed. All Windows 11 and Windows 10 users can install Microsoft Edit, a free and open-source command-line text editor. It has all the basic features, such as creating and opening files, word wrap, find, go to line, etc., that you would expect from a simple text editor.

In this quick and straightforward tutorial, I will show you the steps to install Microsoft Edit and how to use it to easily create, open, edit, and save text files. Let’s get started.

Install Microsoft Edit in Windows

The easiest way to install Microsoft Edit is using the winget, a command-line package manager. Here’s how.

  1. Press “Windows key + X” to open the power user menu.
  2. Select the “Terminal” option.
  3. Run the “winget install --id Microsoft.Edit” command.
  4. With that, you’ve installed Microsoft Edit in Windows.
install Microsoft Edit

Using Microsoft Edit to Create, Open, and Edit Files

Once you have installed the Microsoft Edit application, you can use it directly from the command line window. Here’s how.

First, open a new terminal window. To do that, right-click on the Windows icon on the taskbar and select the “Terminal” option. Windows 10 users can select “Windows PowerShell”.

Note: You must launch a new terminal/PowerShell window after installing Microsoft Edit. Otherwise, the steps below will not work.

open terminal

In the terminal window, run the following command to launch Microsoft Edit.

edit

To open a specific file using Microsoft Edit, run the following command.

Note: If no file exists with that name in that specific path, Edit will create a new file with the same name upon save.

edit c:\path\to\file.txt

open file in Microsoft Edit

Once the file opens, modify it as needed. The good thing is, you can also use your mouse to navigate through the editor and its options.

edit file using Microsoft Edit

After making the necessary changes, either press the “Ctrl + S” shortcut or click the “File” > “Save” option.

save file in Microsoft Edit

If you’ve opened an existing file or you’ve given a file name and path while opening the file (second command), the file will be saved directly. Otherwise, you will see the save dialog.

Select the folder where you want to save the file at the bottom, type the name of the file in the “File name” field, and press “Enter” on your keyboard.

Note: Clicking “..” takes you back one folder in the current directly.

save dialog in Microsoft Edit

That is all. It is that simple to install and use Microsoft Edit in Windows 11 and Windows 10. If you have any questions or need help, comment below. I’ll be happy to assist.

2 thoughts on “How To Install and Use Microsoft Edit (Windows Command Line Text Editor)”

    1. Avatar for Bashkarla

      Hi, it looks like the double hyphen (–) in the command is being combined into a single hyphen (-), which is likely causing the issue. I’ve corrected it. Could you please try again? I tested this on my Windows 10 machine, so it should work for you as well.

Leave a Comment

Your email address will not be published. Required fields are marked *