Microsoft Teams is a proprietary business communication platform developed by Microsoft. It is a collaboration application built for chat, calling, collaboration, and meetings all in one place to make it easier for teams to stay organized and connected than using several other communication platforms separately.
The following tutorial will teach you how to import the official repository and install Microsoft Teams on your Debian 11 or 10 desktop using the command line terminal with two installation options, along with extra tips if you encounter any troubles launching the application and getting a constant buffering window.
Important Notice
The following tutorial was done with a Debian 11 Bullseye release and example images taken, but it was tested on Debian Buster and Sid. In the future, if Debian makes any changes to break the tutorial for one of the distribution versions, please place a comment for me to investigate so I can update the tutorial.
Recommended Steps Before Installation
Before proceeding with the tutorial, ensuring your system is up-to-date with all existing packages is good.
sudo apt update
Optionally, you can list the updates for users who require review or are curious.
sudo apt --list upgradable
Proceed to upgrade any outdated packages using the following command.
sudo apt upgrade
Install Required Packages
To complete the installation, you will need to install the following software packages using the following command in your terminal.
sudo apt install software-properties-common apt-transport-https wget ca-certificates gnupg2 curl -y
These are the most common software packages found on nearly all Linux distributions.
Create & Import Repository
Import GPG Key
The first task is to import the GPG KEY to verify the authenticity of the downloaded packages using the following command.
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/ms-teams.gpg > /dev/null
Import Repository
Now, import the official Microsoft Teams repository using the following command.
echo 'deb [signed-by=/usr/share/keyrings/ms-teams.gpg] https://packages.microsoft.com/repos/ms-teams stable main' | sudo tee /etc/apt/sources.list.d/ms-teams.list
Lastly, update your APT cache.
sudo apt update
Install Microsoft Teams
The next part of the installation of Microsoft Teams is to proceed with the installation using the following command.
sudo apt install teams -y
Alternatively, you can install the team’s insiders using the following command.
sudo apt install teams-insiders -y
Lastly, remove the added extra source file from Microsoft; this will cause issues with updates in the future. If you somehow delete the incorrect one, re-import the repository using the command at the start of the tutorial.
sudo rm /etc/apt/sources.list.d/ms-teams.list
How to Launch Microsoft Teams
Now that you have the client installed, launching can be done in a few ways.
Using the command line terminal, you can open the browser quickly by using the following command.
teams
The best way to use Microsoft Teams for desktop users that prefer not to use the command line terminal is to open the GUI of the application by following the path.
Activities > Show Applications > Microsoft Teams {version}
Example:
Once launched, you will get to the get started screen. From here, you can log on and use Microsoft Teams.
Example:
How to Update Microsoft Teams
Run the standard update commands for Teams and any default APT packages for future updates.
sudo apt update
When updates are available, run the standard upgrade command as you would with any other APT available updates.
sudo apt upgrade
Some users do not like the terminal and use it to ensure that whatever GUI methods you have set up are working correctly. The terminal often never fails unless something has gone wrong.
How to Fix Microsoft Teams Failing to Launch
Sometimes Microsoft Teams can not work and appear blank, mainly in virtual environments. The easiest method is to launch the software without a sandbox.
This can be done in the terminal as follows.
teams --no-sandbox
Insiders alternatively use the following.
teams-insiders --no-sandbox
For desktop users using the application, you may want a more permanent solution, so let’s modify the application.
Users that use the desktop icon use the following command to open up.
sudo nano /usr/share/applications/teams.desktop
Insiders use the following instead.
sudo nano /usr/share/applications/teams-insiders.desktop
If you are unsure or cannot find or open the files above, I suggest using a command that will print all applications with the name teams to get the correct name.
ls /usr/share/applications/teams*
Once this is done, you should get an output like follows.
/usr/share/applications/teams.desktop
/usr/share/applications/teams-insiders.desktop
So, for example, you could open the nightly, and now you have the correct name and path.
Once you open the correct application, find the following line.
Exec=teams %U
And change it to the following, adding the –no-sandbox to the line, so you do not need to use the command line terminal each time.
Exec=teams %U --no-sandbox
Example:
How to Remove (Uninstall) Microsoft Teams
When you no longer want the Teams installed on your system, use the following command to remove it.
sudo apt autoremove teams
For those that installed the Insiders, use the following command.
sudo apt autoremove teams-insiders
Remove the repository if you plan not to re-install Teams again.
sudo rm /etc/apt/sources.list.d/teams.list
After removing the repository list file, remove the GPG.
sudo rm /usr/share/keyrings/ms-teams.gpg