Install and Configure the Sway Window Manager on Linux

Install And Configure Sway Window Manager On Ubuntu

Sway gives you a keyboard-driven Wayland desktop that tiles windows instead of placing them freely. Install the distribution package, keep the supplied configuration as your starting point, and verify the installed build before you choose a Sway session.

What Sway is and when it fits

Sway is a tiling Wayland compositor built to work with most i3 configuration and habits, and the project describes it as an i3 replacement for X11.

It is not a full desktop environment. You choose the terminal, application launcher, notifications, wallpaper tool, lock screen, and status bar that suit your setup, so start with the supplied configuration before adding extras.

Install Sway from your distribution

The Sway project recommends installing your distribution’s sway package. On Debian and Ubuntu systems, install it with apt:

sudo apt install sway -y

The package supplies Sway and a default configuration, while Fedora also offers a Sway Spin for an installation assembled around this compositor.

Verify the installed build

Check that the executable resolves before you leave your current desktop session. This small check separates an installed package from a session-selection or graphics problem.

sway --version
Terminal showing sway --version and Sway version 1.10.1
Confirm the installed Sway build before starting a new session.

I installed the current Debian package for this refresh, and the command returned Sway version 1.10.1. Your distribution may ship a different supported build, so use the result from your machine when comparing documentation or reporting an issue.

Create a personal configuration

Keep local changes in your home directory rather than editing the system file. This leaves the packaged default intact and makes your configuration portable.

mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/config

Read the existing key bindings before changing the copied file, because the Sway configuration reference treats it as a list of commands run at startup.

Start Sway without losing your way back

Log out, select Sway in a Wayland-capable display manager, and sign in. You can also start Sway from a Linux virtual terminal, but a display manager is easier when you are moving from GNOME, KDE Plasma, or another desktop.

Keep your existing desktop session installed while you learn the configuration, then return to it to check the graphics driver, display-manager logs, and Sway messages if the new session does not start.

Add desktop pieces one at a time

Sway manages windows without deciding every desktop service for you, so add a bar, launcher, notification daemon, wallpaper utility, idle manager, and screen locker only after the base session starts and your core bindings work.

Each extra program should have one job and a visible configuration entry, because a copied collection of dotfiles makes failures much harder to isolate.

Sway hardware and workflow boundaries

Sway is a good choice when you want Wayland tiling and are willing to maintain a small configuration. It is a weaker fit when you need a complete desktop assembled for you, rely on desktop-specific settings panels, or have not yet confirmed that your graphics stack works well with a Wayland session.

Read the default configuration after your first successful login, then change one binding or service at a time. That gives you a clear recovery path and a desktop you can maintain instead of a copied theme you cannot explain.

Frequently asked questions

These answers cover the decisions that matter before you replace a familiar desktop session.

Is Sway a desktop environment?

No. Sway is a Wayland compositor and tiling window manager. You add services such as a bar, launcher, notifications, wallpaper utility, idle manager, and screen locker as needed.

Can I use an i3 configuration with Sway?

Sway is designed to be compatible with most i3 configuration and workflow conventions. Start with Sway’s supplied configuration, then migrate only the entries you understand and need.

Where should I keep my Sway configuration?

Keep personal changes in ~/.config/sway/config. Copy the packaged configuration from /etc/sway/config first so updates do not overwrite your local choices.

Sources

Sway project · Sway README · Sway configuration reference · Fedora Sway Spin