Microsoft has released a command line editor

Microsoft’s Build developer conference has wrapped up. Like Google’s I/O, the spotlight was mainly on artificial intelligence. But there were also announcements on other fronts — for example, cloud computing and developer tools like Visual Studio. One interesting highlight was Microsoft’s new Rust-based command-line editor. Called Microsoft Edit, it’s open source and runs on both Windows and Linux. Down the line, it’s expected to become a built-in part of Windows 11.

Installation

On Windows, installation is currently done via the package manager winget. Enter the following command in the terminal:

winget install --id Microsoft.Edit

Once the installation is complete, the program can be started in the Terminal by executing edit.

Microsoft Edit in the Windows Terminal
Microsoft Edit on Windows 11

On Linux, Rust must be installed, which can be downloaded from this website. Then, use the git command to clone the Microsoft Edit repository:

git clone https://github.com/microsoft/edit.git

In the next step, use the cd command to navigate to the “edit” directory and then execute the cargo command to build the app:

cd edit
cargo build --release

Finally, the editor must be installed:

sudo cp target/release/edit /usr/local/bin/

On Linux, the program is also started by executing edit in the Terminal.

Microsoft Edit on Fedora Linux
Microsoft Edit on Fedora Linux

Start Microsoft Edit

Once installed, you’re ready to use Edit (although you may need to restart the terminal). As mentioned previously, executing the following command will launch the Microsoft command-line editor:

edit

The edit command can also be used to open a text file, passing the file name as an argument:

edit <file name>

On Windows, packages can also be updated using winget. For Microsoft Edit, run the following command:

winget update Microsoft.Edit

Since it’s an open source editor, you can check out the code (and contribute to the project) on Github.