How To Install sway on Ubuntu
Posted on April 1, 2023  (Last modified on May 20, 2023 )
2 minutes • 392 words
Introduction
In this tutorial we learn how to install sway on Ubuntu.
What is sway
sway is:
sway (SirCmpwn’s Wayland compositor) is a tiling Wayland compositor and a drop-in replacement for the i3 window manager for X11. It works with your existing i3 configuration and supports most of i3’s features, plus a few extras. This means it is a minimalist, tiling window manager.
There are three methods to install sway on Ubuntu. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install sway Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install sway using apt-get by running the following command:
sudo apt-get -y install sway
Install sway Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install sway using apt by running the following command:
sudo apt -y install sway
Install sway Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.
sudo aptitude update
After updating apt database, We can install sway using aptitude by running the following command:
sudo aptitude -y install sway
How To Uninstall sway on Ubuntu
To uninstall only the sway package we can use the following command:
sudo apt-get remove sway
Uninstall sway And Its Dependencies
To uninstall sway and its dependencies that are no longer needed by Ubuntu, we can use the command below:
sudo apt-get -y autoremove sway
Remove sway Configurations and Data
To remove sway configuration and data from Ubuntu we can use the following command:
sudo apt-get -y purge sway
Remove sway configuration, data, and all of its dependencies
We can use the following command to remove sway configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge sway
Dependencies
sway have the following dependencies:
- libgl1-mesa-dri
- swaybg
- policykit-1
- libc6
- libcairo2
- libevdev2
- libgdk-pixbuf-2.0-0
- libgles2
- libglib2.0-0
- libinput10
- libjson-c5
- libpango-1.0-0
- libpangocairo-1.0-0
- libpcre3
- libpixman-1-0
- libsystemd0
- libudev1
- libwayland-client0
- libwayland-cursor0
- libwayland-server0
- libwlroots9
- libxcb1
- libxkbcommon0
References
Summary
In this tutorial we learn how to install sway package on Ubuntu using different package management tools: apt, apt-get and aptitude.