The edit
tool is not currently available in common Linux package managers (such as apt
, dnf
, or yum
). This script provides a convenient and reliable way to always install the latest official release directly from Microsoft's GitHub repository, without waiting for distribution maintainers to package it.
This project provides a simple shell script to install the latest release of Microsoft's edit
command-line editor on Linux.
- Automatically fetches the latest release from GitHub
- Downloads and installs the correct Linux binary for your architecture
- Adds the binary to
~/.local/bin
(creating the directory if needed) - Optionally updates your
PATH
in~/.profile
if required - Checks if
edit
is already installed and up-to-date, and only updates if a newer version is available - Optional: Can set Microsoft
edit
as your defaultedit
command (overriding/usr/bin/edit
) with a flag - Provides clear instructions to undo this change
curl -fsSL https://raw.githubusercontent.com/raymondlowe/install-msedit-linux/main/install_msedit.sh | sh
- The script will:
- Detect the latest version
- Download and extract the binary
- Place it in
~/.local/bin/edit
- Make it executable
- Optionally update your
PATH
if needed
- After install, the script will tell you how to make Microsoft
edit
the default (see below).
If you want the Microsoft version to take precedence over /usr/bin/edit
, run:
curl -fsSL https://raw.githubusercontent.com/raymondlowe/install-msedit-linux/main/install_msedit.sh | sh -s -- --set-default
- This creates a symlink at
~/bin/edit
pointing to the Microsoft binary. - Make sure
~/bin
is in yourPATH
(the script will tell you if it isn't).
To remove the Microsoft edit
as the default and restore your previous edit
(e.g., /usr/bin/edit
):
rm ~/bin/edit
source ~/.profile
edit --version
curl
awk
tar
zstd
orunzstd
(for .tar.zst archives)- Install with:
sudo apt install zstd
(Debian/Ubuntu) orsudo dnf install zstd
(Fedora/RHEL)
- Install with:
unxz
(for .xz archives)- Standard POSIX
sh
(no bashisms required) - glibc 2.34+ (or whatever version the Microsoft binary requires)
Note: The Microsoft
edit
binary may require a recent version of glibc (e.g., 2.34+). If you see errors about missing GLIBC versions when runningedit
, you may need to upgrade your Linux distribution to a newer release that includes a compatible glibc version.
- The script is designed for x86_64 and aarch64 Linux systems.
- If you encounter issues, ensure you have the required tools installed.
- For more information about
edit
, see the official repository.
This project is not affiliated with Microsoft. It simply automates installation of their open source tool.