How to Install Microsoft Teams on Ubuntu 22.04 or 20.04


Microsoft Teams is a collaboration and communication platform developed by Microsoft. It provides various tools and features to help users stay connected and collaborate effectively, regardless of location. Installing Microsoft Teams on Ubuntu can offer many benefits to users, especially those who work in a remote or distributed environment.

Some of the benefits include:

  • Real-time communication and collaboration
  • Access to Microsoft Office apps
  • Secure file sharing and storage
  • Video conferencing and screen sharing
  • Task management and scheduling
  • Chat, voice, and video calls
  • File and screen sharing
  • Online meetings and video conferencing
  • Integration with other Microsoft apps and services, like Office and OneDrive
  • Customizable channels for specific projects or teams
  • Built-in task management and scheduling
  • Available on all major platforms, including Windows, Mac, iOS, and Android.

In this tutorial, you will be guided on installing Microsoft Teams on Ubuntu 22.04 Jammy Jellyfish or Ubuntu 20.04 Focal Fossa LTS. The process includes importing the official GPG key and repository, installing the latest Teams or Teams insider build version, and maintaining and removing the software using the command line terminal. The tutorial will provide step-by-step instructions to ensure a smooth and successful installation.

Step 1: Update Ubuntu

Before installing Microsoft Teams, it’s important to ensure that your system is up-to-date to prevent any issues during the installation process and for general best practices. This can be done by opening your terminal and using the following command to update your system.

sudo apt update && sudo apt upgrade

Step 2: Install the Required Packages

To proceed with installing Microsoft Teams, certain software packages are required. These packages can be installed by using the following command in your terminal.

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

These software packages are commonly found on nearly all Linux distributions.

Step 3: Import Microsoft Teams Repository

To ensure the authenticity of the Microsoft Teams packages, the first step is to import the GPG Key. This can be done by using the following command in your terminal.

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

With the GPG Key imported, the next step is to import the official Microsoft Teams repository. This can be done by using the following command in your terminal.

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

To ensure that your system has the latest information about the packages available in the newly added repository, it’s necessary to update the APT cache. This can be done by using the following command in your terminal.

sudo apt update

Step 4: Install Microsoft Teams

With the repository and GPG key imported and the APT cache updated, the next step is to install Microsoft Teams. This can be done by using the following command in your terminal.

sudo apt install teams

Alternatively, you may also choose to install the Teams Insiders version, which includes the latest features and updates still in testing. This version can be installed using the following command in your terminal.

sudo apt install teams-insiders

Once you have completed the installation of Microsoft Teams, removing the added extra source file from Microsoft is important, as this can cause issues with future updates. To remove the source file, use the following command in your terminal.

sudo rm /etc/apt/sources.list.d/teams.list

Suppose you accidentally delete the wrong file (ms-teams.list). In that case, you can re-import the repository using the command provided at the beginning of the tutorial after removing the (teams.list) source.

See also
How to Install Microsoft Edge on Rocky Linux EL9 or EL8

Step 5: Launch Microsoft Teams

With the installation of Microsoft Teams, there are a few different ways to launch the client. One method is using the command line terminal, where you can quickly open Teams using the following command.

teams

For desktop users who prefer not to use the command line terminal, the best way to launch Microsoft Teams is through the GUI of the application. This can be done by following the path where the application icon can be found and clicked to open the application.

Activities > Show Applications > Microsoft Teams {version}

Example:

Once the application is launched, you will be presented with the “Get started” screen. You can log in to your Microsoft account and start using Teams. If you do not have an existing account, you can create one by clicking on the “Create account” button. Once logged in, you will have access to all the features and tools provided by Teams, including chat, voice and video calls, file sharing, and online meetings.

Example:

Additional Commands & Tips

Fix Microsoft Teams Failing to Launch

Occasionally, Microsoft Teams may not function correctly and appear blank. This issue is typically resolved in newer versions, such as the Insiders build, but older stable versions may still experience this. One solution is to launch the software without a sandbox. This can be done by using a command line flag when launching the application, bypassing the sandbox, and allowing the application to run as intended.

To begin, access the configuration file located at /usr/bin/teams.

sudo nano /usr/bin/teams

Locate the line following the current one, as there are not many lines in the document, making it easy to find.

nohup "$TEAMS_PATH" "$@" --disable-namespace-sandbox --disable-setuid-sandbox > "$TEAMS_LOGS/teams-startup.log" 2>&1 &

Remove this line, add a comment symbol ‘#’ in front of it, and insert the following line.

nohup "$TEAMS_PATH" "$@" --disable-seccomp-filter-sandbox --disable-namespace-sandbox --disable-setuid-sandbox > "$TEAMS_LOGS/teams-startup.log" 2>&1 &

Example:

After that, press ‘CTRL+X’ and confirm to save the changes, then re-launch Microsoft Teams, and the problem should be resolved.

Update Microsoft Teams

To ensure that you have the latest version of Microsoft Teams and any default APT packages, it’s important to run the standard update commands regularly. This can be done by using the appropriate command in the terminal.

sudo apt update

When updates for Microsoft Teams are available, running the standard upgrade command is important to ensure that you are running the latest version.

sudo apt upgrade

Remove (Uninstall) Microsoft Teams

When you no longer want the Teams installed on your system, use the following command to remove it.

sudo apt remove teams
sudo apt remove teams-insiders

If you have no plans to re-install Microsoft Teams, it’s important to remove the repository. This can be done by using the appropriate command in the terminal, and this will prevent any future update conflicts or errors related to the software.

sudo rm /etc/apt/sources.list.d/teams.list
sudo rm /usr/share/keyrings/ms-teams.gpg

Conclusion

In conclusion, installing Microsoft Teams on Ubuntu is a straightforward process. Overall, Microsoft Teams is a powerful collaboration tool that can significantly enhance user communication and productivity on Ubuntu.

2 thoughts on “How to Install Microsoft Teams on Ubuntu 22.04 or 20.04”

  1. These installations instructions do install Microsoft Teams, however after that your update is hosed.
    z@zubnt:~$ sudo apt update
    [sudo] password for z:
    E: Conflicting values set for option Signed-By regarding source https://packages.microsoft.com/repos/ms-teams/ stable: /usr/share/keyrings/ms-teams.gpg !=
    E: The list of sources could not be read.
    z@zubnt:~$

    Software & Updates or Software Updater do not even open.

    Reply
    • I will update this article soon to advise how to fix this; check for an extra source .list for teams in the /etc/apt/sources.list.d

      Microsoft Teams adds an extra source when installing annoyingly. Just remove it with sudo rm /etc/apt/sources.list.d/

      If you remove both somehow, re-import the repository from the guide.

      Reply

Leave a Comment

Share to...