When working on Linux, developers often need a lightweight text editor that runs directly in the terminal. While many traditional editors exist, Microsoft Edit provides a modern, efficient option for editing files from the command line. This tutorial explains how to install Microsoft Edit on Ubuntu 24.04.
Install Microsoft Edit
First, grab the most recent release number from GitHub and save it into a variable:
EDIT_VERSION=$(curl -s "https://api.github.com/repos/microsoft/edit/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
Next, download the archive:
wget -qO edit.tar.zst https://github.com/microsoft/edit/releases/latest/download/edit-$EDIT_VERSION-x86_64-linux-gnu.tar.zst
Unpack the archive and place the executable into /usr/local/bin
:
sudo tar xf edit.tar.zst -C /usr/local/bin edit
We can check the Microsoft Edit version as follows:
edit --version
Remove no longer needed archive:
rm -rf edit.tar.zst
Testing Microsoft Edit
You can create a new file or modify an existing one by running the edit
command followed by the filename:
edit test.txt
Run the command with superuser privileges if you don't have sufficient permissions:
sudo edit /var/log/dpkg.log

Uninstall Microsoft Edit
If you decide you no longer need Microsoft Edit, simply delete the binary:
sudo rm -rf /usr/local/bin/edit
Leave a Comment
Cancel reply