How do I install the *latest* version of Emacs?

Solution 1:

To install WSL 2, you will need the following requirements:

  • Windows 10 Insider Preview Build 18917 or higher.
  • WSL 2 will be generally available in Windows 10, version 2004 and later.

The latest stable version of Emacs 26.3 is a native Ubuntu package and can be installed in WSL 2 in all currently supported versions of Ubuntu with the following command:

sudo snap install emacs --classic

The beta version (27 at the time of the answer) can be installed with:

sudo snap install emacs --channel=beta --classic

The latest development version of Emacs 28.0 can be installed with the following command:

sudo snap install emacs --channel=edge --classic

Solution 2:

Using flatpack to install 27.2 version

sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnu.emacs