Skip to content

How-ToOS

How to Use Microsoft Edit, the Command-Line Text Editor in Windows 11

Microsoft Edit is a free, open-source text editor that runs in the Windows 11 terminal. We explain how to check you have it, install version 2.0 with syntax highlighting, open files, the shortcuts that matter and practical uses for config files and scripts.

By , Systems & Technical Editor

5 min read

How to Use Microsoft Edit, the Command-Line Text Editor in Windows 11

If you've ever opened a terminal to tweak a config file and then had to jump out to Notepad, Microsoft Edit fixes that. It's a small, free, open-source text editor that runs inside Command Prompt, PowerShell or Windows Terminal, and it's now part of Windows 11.

This guide is based on Microsoft's Learn documentation for Edit, the Windows Command Line blog post that launched it, and the project's GitHub repository and release notes, all checked on 2 December 2026.

What is Microsoft Edit?

Microsoft describes Edit as "a lightweight, open-source command-line text editor for Windows 11". The GitHub project says it "pays homage to the classic MS-DOS Editor, but with a modern interface and input controls similar to VS Code". In other words, it behaves like a normal app with menus and mouse support, not like Vim.

Microsoft's reason for building it is simple. According to its documentation, "64-bit versions of Windows did not include a default CLI text editor" after the old 16-bit MS-DOS Editor was retired. The team wanted a modeless editor, meaning there are no separate modes for typing and issuing commands, and says existing modeless editors either had no first-party Windows support or were too big to bundle, so Edit was written from scratch in Rust. At launch, Microsoft said it was "less than 250kB". It's released under the MIT licence.

Step 1: check whether you already have it

Microsoft says Edit is included in Windows 11 "as part of the September 2025 optional update (or newer)" and in the Windows 11 2025 Update (version 25H2). To check:

  1. Open Windows Terminal, PowerShell or Command Prompt. (New to the terminal? See our Windows Terminal guide.)

  2. Type edit and press Enter.

If Edit opens, you're ready to go. If Windows says the command isn't recognised, move on to Step 2.

Step 2: install or update it

If your PC doesn't have Edit yet, Microsoft's documented route is winget:

winget install Microsoft.Edit

Our guide to installing apps with winget explains the basics if you haven't used it before. You can also download a ZIP from the project's GitHub releases page; version 2.0.0 offers x86_64 and aarch64 Windows builds, so there's a native version for Arm-based Snapdragon laptops too.

It's worth knowing which version you have. The GitHub notes for version 1.2.1 say it "contains the final binaries that ship with Windows 11 25H2". Version 2.0.0, released on 28 April 2026, adds features the in-box copy may not have, most notably syntax highlighting. The README says winget installs the latest version.

Step 3: open and create files

  • Run edit on its own to open a blank document.

  • Run edit <your-file-name> to open a file, for example edit notes.txt. Microsoft says this lets you edit files "directly in the terminal without context switching".

  • In version 2.0, passing a folder rather than a file drops you into the file picker, and the picker now sorts names naturally, so file2.txt comes before file10.txt.

Edit also has a full menu bar. Microsoft's launch post notes that "all the menu options in Edit have keybindings", shown next to each menu item, so you can learn shortcuts from the menus rather than memorising a cheat sheet. You can also click menus, select text and scroll with the mouse.

Step 4: learn the shortcuts that matter

These are the shortcuts Microsoft and the project's release notes document. For anything else, open the menus and read the keybinding shown next to each option.

Task

Shortcut

Source

Switch between open files

Ctrl+P (or click the file list in the lower-right)

Microsoft Learn / launch post

Find

Ctrl+F (Edit > Find)

Microsoft Learn

Replace

Ctrl+R (Edit > Replace)

Launch post

Toggle word wrap

Alt+Z (View > Word Wrap)

Microsoft Learn

Move lines up or down

Alt+Up / Alt+Down

v2.0.0 release notes

Select the whole current line

Ctrl+L

v2.0.0 release notes

Indent / unindent several lines

Tab / Shift+Tab

v2.0.0 release notes

Find and Replace supports Match Case, Whole Word and Regular Expression options. In version 2.0 you can also use capture groups such as $1 and $2 in the replacement text when regex mode is on, which is handy for reformatting lists or log lines.

Version 2.0 also marks unsaved work with a ● in the terminal's title bar, so you can see at a glance whether you've saved.

Step 5: use syntax highlighting (version 2.0)

The headline addition in Edit 2.0 is syntax highlighting, built on what the developers call a Lightweight Syntax Highlighter. The release notes describe a footprint of "~40kB footprint for a dozen languages plus runtime". If you edit PowerShell scripts, JSON settings files or similar, colour coding makes mistakes easier to spot.

Version 2.0 also adds preliminary support for a settings.json file. For now this is limited to files.associations, which maps file paths and extensions to languages for highlighting. The developers say they expect later versions to focus on configurability, so treat this as an early feature.

Practical uses on a gaming or enthusiast PC

Edit is at its best for quick jobs where opening a full editor feels like overkill:

  • Game and app config files. Many games and tools store settings in plain-text .ini, .cfg or .json files. Back up the file first, then edit it in place.

  • The hosts file. Run your terminal as administrator, then open C:\Windows\System32\drivers\etc\hosts. Our guide to editing the hosts file in Windows 11 covers what to change and why.

  • Scripts and notes. Edit is fine for short PowerShell or batch scripts, especially with version 2.0's highlighting.

  • Working over SSH or on another OS. Edit is also available for Linux and macOS, so you can use the same editor on a home server. The project recommends the package name msedit on those systems because edit can clash with existing commands.

When to use something else

Edit is deliberately simple; the project's own tagline is "A simple editor for simple needs". If you want plugins, project-wide search or advanced editing, look at a full editor such as those in our best free text editors for Windows 11 guide. For a direct comparison with Microsoft's other built-in editor, read Microsoft Edit vs Notepad, and if you're weighing it against the classic modal editor, see Microsoft Edit vs Vim.

The bottom line

Microsoft Edit gives Windows 11 a proper built-in terminal text editor at last: type edit to check you have it, use winget or GitHub to get version 2.0 with syntax highlighting, and rely on the menus to learn its shortcuts. It's ideal for config files, the hosts file and short scripts, but it's deliberately basic, so keep a full editor for bigger projects.

Sources

  1. 01Microsoft Learn, Edit command line tool
  2. 02Microsoft Windows Command Line blog, Edit is now open source
  3. 03Microsoft (GitHub), Edit project README
  4. 04Microsoft (GitHub), Edit v2.0.0 release notes
  5. 05Microsoft (GitHub), Edit v1.2.1 release notes

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Add Stinger Transitions in OBS Studio (Including Track Mattes)

How-To

How to Add Stinger Transitions in OBS Studio (Including Track Mattes)

Want an animated stinger to play when you switch scenes on stream? OBS Studio has stinger transitions built in, free. Here's how to add one, set the transition point in milliseconds or frames, sort out the audio, use track mattes for shaped reveals and keep playback smooth.

Marcus Thorne6 min

How to Fix a Steam Disk Write Error on a Windows PC

How-To

How to Fix a Steam Disk Write Error on a Windows PC

Steam stuck on an error while updating or installing a game, with disk write error in brackets? Here's what Valve says the message means and the fixes in a sensible order: restart, repair the library folder, clear the download cache, verify files, check antivirus and Controlled folder access, then test the drive.

Marcus Thorne5 min

Microsoft Edit vs Notepad: Which Windows 11 Text Editor Should You Use?

Versus

Microsoft Edit vs Notepad: Which Windows 11 Text Editor Should You Use?

Windows 11 now has two Microsoft text editors: Notepad on the desktop and Edit in the terminal. We compare where they run, editing features, syntax highlighting, spell check, size, openness and updates, and say which to use for notes, configs and scripts.

Callum Reid4 min