2 Easy Methods to Install Slack on Ubuntu 22.04 – OrcaCore

Posted on

2 Easy Methods to Install Slack on Ubuntu 22.04 - OrcaCore

2 Easy Methods to Install Slack on Ubuntu 22.04 – OrcaCore

This tutorial aims to guide you through the process of installing Slack on Ubuntu 22.04 using either the Flatpak package manager or Snap. Slack is a popular communication application that allows you to easily interact with your team and colleagues. If you need a reliable and feature-rich platform for team communication, Slack is a solid choice. Follow the steps outlined below on the Orcacore website to successfully install Slack on Ubuntu 22.04 LTS.

Before proceeding with this guide on Slack Ubuntu, ensure you have access to your server as a non-root user with sudo privileges. If you haven’t already, you can refer to this guide on Initial Server Setup with Ubuntu 22.04.

Now, let’s delve into the methods for completing your Slack installation.

Method 1 – Install Slack With Flatpak on Ubuntu 22.04

First, update your system’s package list by executing the following command:

sudo apt update

If you prefer using Flatpak to install Slack, you must have Flatpak installed and Flathub enabled on your system. If you haven’t already done so, refer to this guide on Install and Use Flatpak on Ubuntu 22.04.

Once Flatpak is installed and Flathub is enabled, use the following command to install Slack:

flatpak install com.slack.Slack -y

Upon execution, you’ll observe output similar to this:

**Output**
Required runtime for com.slack.Slack/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/22.   08) found in remote flathub
Do you want to install it? [Y/n]: y

com.slack.Slack permissions:
    ipc                   network               pulseaudio       x11       devices
    file access [1]       dbus access [2]

    [1] xdg-documents:ro, xdg-download, xdg-music:ro, xdg-pictures:ro, xdg-run/pipewire-0,
        xdg-videos:ro
    [2] com.canonical.AppMenu.Registrar, org.freedesktop.Notifications,
        org.kde.StatusNotifierWatcher

        ID                                    Branch        Op  Remote   Download
 1. [-] org.freedesktop.Platform.GL.default   22.08         i   flathub  143.8 MB / 143.1 MB
 2. [-] org.freedesktop.Platform.GL.default   22.08-extra   i   flathub   16.2 MB / 143.1 MB
 3. [-] org.freedesktop.Platform.Locale       22.08         i   flathub   17.8 kB / 333.4 MB
 4. [-] org.freedesktop.Platform.openh264     2.2.0         i   flathub    1.2 MB / 944.3 kB
 5. [-] org.freedesktop.Platform              22.08         i   flathub  174.0 MB / 214.4 MB
 6. [-] com.slack.Slack                       stable        i   flathub   77.2 MB / 77.5 MB

Installing 6/6… ——————————————————————————————— 100%  38.6 MB/s

This output confirms that the Slack on Ubuntu installation using Flatpak was successful.

Uninstall Slack with Flatpak

To uninstall Slack, execute the following Flatpak command:

flatpak uninstall com.slack.Slack
**Output**
        ID                    Branch       Op
        ID                    Branch       Op
 1. [-] com.slack.Slack       stable       r

Uninstalling…

Additionally, you can remove any unused packages by running:

flatpak remove --unused
**Output**
        ID                                            Branch                Op
        ID                                            Branch                Op
 1. [-] org.freedesktop.Platform.GL.default           22.08                 r
 2. [-] org.freedesktop.Platform.GL.default           22.08-extra           r
 3. [-] org.freedesktop.Platform                      22.08                 r
 4. [-] org.freedesktop.Platform.Locale               22.08                 r
 5. [|] org.freedesktop.Platform.openh264             2.2.0                 r

Uninstalling 5/5…

Method 2 – Install Slack with Snap on Ubuntu 22.04

If you prefer to use the Snap package manager, you’ll need to install Snap on your system first. Run the following command:

sudo apt install snapd

Then, install the snap core using this command:

sudo snap install core22
**Output**
core22 20230503 from Canonical✓ installed

Now, you can easily install Slack Ubuntu with Snap using:

sudo snap install slack
**Output**
slack 4.32.122 from Slack✓ installed

Uninstall Slack With Snap

To remove Slack, use the following Snap command:

sudo snap remove slack

How To Access Slack App on Ubuntu?

You can launch Slack by simply typing:

slack

Note: If you installed Slack with Flatpak, launch it using:

flatpak run com.slack.Slack

The Slack dashboard will appear, allowing you to sign in and begin using the application.

[Image of Slack Sign-in Screen]

How To Update Slack in Ubuntu?

Slack is updated automatically when you perform a system update. Use these commands:

# sudo apt update
# sudo apt upgrade -y

Note: For Flatpak installations, update Slack using:

flatpak update

Conclusion

You’ve successfully learned how to install the Slack communication app on Ubuntu 22.04 using both Flatpak and Snap package managers. This empowers you to easily connect and collaborate with your team and colleagues.

Hopefully, this tutorial was helpful. You may also find these guides useful:

Slack Setup on Fedora Linux 39

Introduce online Linux terminal

Resolve unknown collation: ‘utf8mb4_0900_ai_ci’

pip clear cache

Alternative Methods for Installing Slack on Ubuntu 22.04

While Flatpak and Snap provide convenient ways to install Slack on Ubuntu, other methods can be considered, especially in environments where these package managers are not preferred or available. Here are two alternative approaches:

1. Using the .deb Package Directly:

Slack provides a .deb package directly on their website, which can be downloaded and installed using apt or dpkg. This method offers more control over the installation process and avoids reliance on third-party package managers.

  • Explanation: The .deb package is the standard package format for Debian-based systems like Ubuntu. By downloading and installing this package, you’re using the native package management system to handle the installation.

  • Steps:

    1. Download the .deb package: Navigate to the Slack downloads page (https://slack.com/downloads/linux) using a web browser on your Ubuntu system. Choose the .deb package for Ubuntu.

    2. Install the package using apt: Open a terminal and navigate to the directory where you downloaded the .deb package (usually the Downloads folder). Then, run the following command:

    sudo apt install ./slack-desktop-*.deb

    Replace slack-desktop-*.deb with the actual name of the downloaded file. apt will automatically handle any dependencies required by Slack.

    1. Install the package using dpkg (if apt fails): If apt fails to resolve dependencies, you can try using dpkg directly, followed by apt to fix dependencies:
    sudo dpkg -i slack-desktop-*.deb
    sudo apt-get install -f

    dpkg installs the package, and apt-get install -f attempts to fix any broken dependencies.

  • Code Example (already shown above, but repeated for clarity):

    sudo apt install ./slack-desktop-*.deb

    or

    sudo dpkg -i slack-desktop-*.deb
    sudo apt-get install -f
  • Advantages:

    • Uses the native package management system.
    • Doesn’t rely on Flatpak or Snap.
    • Offers more control over the installation.
  • Disadvantages:

    • Requires manual download of the package.
    • You are responsible for manually updating the package. You’ll need to download and reinstall a newer .deb package to update.

2. Building from Source (Advanced):

While less common for end-user applications like Slack, building from source provides the ultimate level of customization and control. This requires more technical expertise but can be useful in specific scenarios. Note that Slack does not officially provide source code for its desktop application. This method is presented as a hypothetical alternative if source code were available.

  • Explanation: Building from source involves downloading the source code of the application, compiling it, and installing the resulting binaries.

  • Steps (Hypothetical):

    1. Obtain the source code: If Slack provided source code, you would typically download it from a repository like GitHub or GitLab.

    2. Install build dependencies: Identify and install all the necessary libraries and tools required to compile the source code. This information would ideally be provided in the application’s documentation (e.g., a README file). Example:

    sudo apt install build-essential libgtk-3-dev libwebkit2gtk-4.0-dev  # Hypothetical dependencies
    1. Configure the build: Use a build system like CMake or Autotools to configure the build process. This typically involves running a command like:
    ./configure  # Or cmake .
    1. Compile the source code: Use the make command to compile the source code:
    make
    1. Install the application: Use the make install command to install the compiled binaries:
    sudo make install
  • Code Example (Hypothetical):

    # Assuming source code is in a directory called 'slack-source'
    cd slack-source
    sudo apt install build-essential libgtk-3-dev libwebkit2gtk-4.0-dev  #Hypothetical
    ./configure  # Or cmake .
    make
    sudo make install
  • Advantages (Hypothetical):

    • Maximum customization and control.
    • Potentially optimized for specific hardware or software configurations.
  • Disadvantages (Hypothetical, but realistic):

    • Requires significant technical expertise.
    • Time-consuming and complex process.
    • Difficult to maintain and update.
    • Dependencies might be difficult to resolve.
    • Security risks of using unverified source code.
    • Slack does not provide source code for its desktop application.

In conclusion, while Flatpak and Snap offer straightforward methods for installing Slack on Ubuntu 22.04, the .deb package method provides a more native approach, and building from source (if possible) offers the ultimate level of control (but also complexity). The best method depends on your specific needs, technical expertise, and environment.