Installing DWM on Ubuntu 20.10 LTS

DWM is a dynamic, keyboard-driven, tiling window manager developed by Suckless. It’s a great, light-weight window manager that perfectly fits the bill for my malware analysis lab machine.

Unfortunately, it isn’t a simple apt-get away in Ubuntu, but it’s still an easy process to get up and running. Here’s how it’s done.


First off, we need to install a few dependencies:

sudo apt-get install build-essential libx11-dev libxinerama-dev sharutils suckless-tools libxft-dev stterm

Once this is done, we can download the source for DWM, extract it, and fix the permissions:

cd /usr/local/src
sudo wget
sudo tar xvzf dwm-6.2.tar.gz
chown -R `id -u`:`id -g` dwm-6.2

Next, we need to build the project and install it:

cd dwm-6.2/
sudo make clean install

At this point, DWM is installed on your system, but we have to do a bit of extra work to get an entry for it on the login screen:

sudo apt-get install dwm
sudo cp /usr/share/xsessions/dwm.desktop{,.bak}
sudo apt-get purge dwm
sudo mv /usr/share/xsessions/dwm.desktop{.bak,}

Finally, logout and you should be able to select DWM from the login prompt!

The DWM window manager running on my Ubuntu server.
DWM up and running on the box.

Basic Usage

This is here more for my benefit since I’m still getting used to navigating DWM, but here are some of the default key bindings for working with DWM:

  • Alt + Shift + Enter: Launch Terminal
  • Alt + Shift + C: Kill current Client
  • Alt + t: Switch to a Tile Layout
  • Alt + m: Switch to a Monocle Layout
  • Alt + f: Switch to a Floating Layout
  • Alt + p: Launch the demnu
  • Alt + [0-9]: Switch to tag [0-9]
  • Alt + Shift + Q: Quit DWM