How to Install Microsoft Edge on Debian 12 or 11

Microsoft Edge is a Chromium-based web browser that offers a fast, secure, and feature-rich browsing experience. Known for its deep integration with Microsoft services, Edge provides tools like enhanced privacy controls, a built-in password manager, and seamless synchronization across devices. Edge is available in multiple versions: the stable build for everyday use, the beta build for testing upcoming features, and the developer (dev) build for accessing the latest updates and experimental features before they reach the broader audience.

On Debian 12 or 11, Microsoft Edge can be installed using Microsoft’s official APT repository, which allows you to install and update the latest stable, beta, or dev builds. This flexibility enables you to choose the version that best suits your needs or even install all three side by side. This guide will walk you through adding Microsoft’s official APT repository to your system and installing Microsoft Edge in the version you prefer.

Update Debian Before Microsoft Edge Installation

Before installing Microsoft Edge, it’s crucial to update your Debian system to ensure all existing packages are up to date. This ensures that your system has the latest security patches and dependencies needed for a smooth installation. To update your system, execute the following command:

sudo apt update && sudo apt upgrade

Install Initial Packages For Microsoft Edge Installation

To successfully install Microsoft Edge, you must install specific packages that are essential for installation. These packages may already be installed on your system, but running the following command will ensure that they are present and up-to-date:

sudo apt install software-properties-common apt-transport-https ca-certificates curl -y

Import Microsoft APT Repository

In this step, you’ll import the GPG key required to verify the authenticity of the Microsoft Edge package. This ensures that the package you’re downloading is genuine and safe to install. To download and import the GPG key, execute the following command:

curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null

Next, add the Microsoft Edge repository to your system’s list of sources by running the following command:

echo 'deb [signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list

Update Package List After APT Repository Import

Now that you’ve added the Microsoft Edge repository, you need to refresh your system’s package list to recognize the new repository. To do this, execute the following command:

sudo apt update

Finalize Microsoft Edge Browser Installation

You can now proceed to install the Microsoft Edge browser. Three branches are available: stable (recommended), beta, and dev (nightly). To install the stable version of Microsoft Edge, run the following command:

sudo apt install microsoft-edge-stable

Optional: Install Microsoft Edge Browser Beta or Dev Version

If you prefer to try out the beta or dev (nightly) builds of Microsoft Edge, you can install them instead of the stable version. Note that these versions are not recommended for daily use, especially on a primary desktop or production server. They are intended for users who want to explore upcoming releases or live on the cutting edge.

These versions do not replace the stable version and are installed separately. However, it is recommended that you install only one version at a time.

To install the beta version of Microsoft Edge, run the following command:

sudo apt install microsoft-edge-beta

Lastly, you can install the dev (nightly) version of Microsoft Edge with the following command:

sudo apt install microsoft-edge-dev

Launching Microsoft Edge Browser

CLI Commands to Launch Microsoft Edge

You can launch Microsoft Edge by executing the appropriate command in your terminal. This method provides a quick and easy way to open the browser directly from the command line. Use the command that matches your installation build:

microsoft-edge
microsoft-edge-beta
microsoft-edge-dev

GUI Method to Launch Microsoft Edge

While using terminal commands can be efficient, it might not be the most practical method for everyday use. You can also launch Microsoft Edge directly from your desktop environment. To do this, follow these steps:

  1. Click on Activities (usually located at the top-left corner of your screen).
  2. Click on Show Applications (represented by a grid of dots, often at the bottom-left corner of your screen).
  3. Look for the Microsoft Edge icon, Click on it to launch the browser.

Additional Commands Microsoft Edge Commands

Update Microsoft Edge

To keep your Microsoft Edge browser updated and secure, you should regularly check for and apply any available updates.

Firstly, run the “apt update” command in your terminal to refresh your package list and check for any available updates:

sudo apt update

If an update for Microsoft Edge is available, use the “apt upgrade” command to apply the update:

sudo apt upgrade

Remove Microsoft Edge

If you need to uninstall Microsoft Edge from your system, follow these steps:

Remove Microsoft Edge

Depending on the version of Microsoft Edge you have installed, use one of the following commands to remove the browser build you installed:

sudo apt remove microsoft-edge-stable
sudo apt remove microsoft-edge-beta
sudo apt remove microsoft-edge-stable-dev

Remove Microsoft Edge APT Repository

To remove the Microsoft Edge repository from your system, run the following command:

sudo rm /etc/apt/sources.list.d/microsoft-edge.list

Remove the GPG Key

Finally, remove the GPG key you imported during the installation process:

sudo rm /usr/share/keyrings/microsoft-edge.gpg

Resolve Microsoft Edge Sources.list File Conflicts on Debian

Remove Redundant Sources.list Files

In Debian, installing different versions of Microsoft Edge – stable, beta, and dev – results in the creation of separate sources.list files in the /etc/apt/sources.list.d/ directory. These individual files can cause update conflicts when using the apt update command, potentially leading to skipped updates. To address this, you need to remove the unnecessary sources.list files.

To delete these files individually, use the following commands:

sudo rm /etc/apt/sources.list.d/microsoft-edge.list
sudo rm /etc/apt/sources.list.d/microsoft-edge-beta.list
sudo rm /etc/apt/sources.list.d/microsoft-edge-dev.list

Alternatively, for a more streamlined approach, you can remove all Microsoft Edge-related sources.list files in one command:

sudo rm /etc/apt/sources.list.d/microsoft-edge*

Consolidate to a Single Repository

After cleaning up the redundant files, the next step is adding a single repository to manage updates for all Microsoft Edge versions. This approach simplifies the update process and avoids potential conflicts. To add the repository, execute the following command:

echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list

This command creates a new sources.list file specifically for Microsoft Edge, ensuring updates for all versions are managed from a single source.

Update the APT Package Cache

With the repository correctly set up, the final step is to refresh your system’s package list. This ensures your system recognizes the new repository configuration and can receive updates accordingly. Update your package list using the following:

sudo apt update

Following these steps, your Debian system will be configured to receive updates for all Microsoft Edge versions through a single, conflict-free sources.list file. In case you accidentally delete all your sources.list files, refer back to the earlier sections of this guide for instructions on how to restore them.

Conclusion

By installing Microsoft Edge on your Debian system via Microsoft’s official APT repository, you gain access to the latest versions of this powerful browser, whether you prefer the stability of the stable build, the cutting-edge features of the beta, or the experimental updates in the dev build. This method ensures that your browser remains up-to-date with the latest features and security improvements. With the ability to install multiple versions simultaneously, you can tailor your browsing experience to suit your needs, whether for daily browsing or web development on Debian.

3 thoughts on “How to Install Microsoft Edge on Debian 12 or 11”

  1. I believe I’ve found the answer, which may be helpful to others. MSFT Edge is only available for Debian on AMD64 architectures. Since Raspberry Pi is Debian (Raspberry PI OS) on ARM64 architecture, no dice.

    Reply
  2. After following the steps in the article on Raspberry PI OS Bookworm (Debian 12), I receive error “Unable to locate package microsoft-edge-stable” when I execute “sudo apt install microsoft-edge-stable”. I’d appreciate advise on how I might fix this error? I have the following APT list:
    “Hit:1 http://deb.debian.org/debian bookworm InRelease
    Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
    Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
    Hit:4 https://packages.microsoft.com/repos/edge stable InRelease
    Hit:5 https://repo.homebridge.io stable InRelease
    Hit:6 http://archive.raspberrypi.com/debian bookworm InRelease ”
    Thank you

    Reply

Leave a Comment