How to Install i3 Window Manager | Linux Desktop Guide

How to Install i3 Window Manager | Linux Desktop Guide

Visual depiction of a Linux terminal with the process of installing the i3 command a tiling window manager

Are you seeking to install the a window manager on your Linux system but not sure where to start? Well i3, a dynamic tiling window manager, is an excellent tool that is worth learning to install and use. It enhances your Linux desktop experience, making it more efficient and organized. It’s also available on most package management systems, including APT and YUM, simplifying the installation process once you grasp the steps.

In this guide, we will walk you through the process of installing the i3 window manager in Linux. We will provide you with installation instructions for APT-based distributions like Debian and Ubuntu, as well as YUM-based distributions like CentOS and AlmaLinux. We’ll delve into how to compile i3 from the source, install a specific version, and finally, how to use the i3 window manager and ensure it’s installed correctly.

Let’s dive in and start installing the i3 window manager on your Linux system!

TL;DR: How Do I Install and Use the i3 Window Manager in Linux?

In most Linux distributions, you can install the i3 window manager using sudo apt install i3-wm or sudo yum install i3. You can then verify the installation with, i3 --version. Once you’ve installed i3, you can start it by logging out of your current session and selecting i3 from the session menu when you log back in.

To install in Ubuntu, you can run the following command:

sudo apt-get install i3

This command will install the i3 window manager on your Ubuntu system. Once the installation is complete, you can start using i3 by logging out of your current session and selecting i3 from the session menu when you log back in.

# Output:
# Reading package lists... Done
# Building dependency tree
# Reading state information... Done
# The following additional packages will be installed:
#  i3-wm i3lock i3status suckless-tools
# Suggested packages:
#  i3blocks rofi compton | xcompmgr
# The following NEW packages will be installed:
#  i3 i3-wm i3lock i3status suckless-tools
# 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
# Need to get 872 kB of archives.
# After this operation, 2,890 kB of additional disk space will be used.
# Do you want to continue? [Y/n]

This is a basic way to install the i3 window manager in Linux, but there’s much more to learn about installing and using i3. Continue reading for more detailed information and advanced usage scenarios.

Getting Started with the i3 Window Manager in Linux

The i3 command in Linux refers to a dynamic tiling window manager designed for X11, an essential component of most Linux distributions. This powerful tool is highly configurable, enabling you to manage your workspace efficiently and effectively. It offers a clean, minimalistic look and is favored by developers and system administrators for its simplicity and functionality.

Now, let’s look at how to install the i3 window manager in Linux using different package managers.

Installing i3 in Ubuntu (APT)

If you’re using an APT-based distribution like Ubuntu, you can install i3 using the following command:

sudo apt install i3-wm
# Output:
# Reading package lists... Done
# Building dependency tree
# Reading state information... Done
# The following additional packages will be installed:
#  i3lock i3status suckless-tools
# Suggested packages:
#  i3blocks rofi compton | xcompmgr
# The following NEW packages will be installed:
#  i3-wm i3lock i3status suckless-tools
# 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
# Need to get 872 kB of archives.
# After this operation, 2,890 kB of additional disk space will be used.
# Do you want to continue? [Y/n]

This command installs the i3 window manager along with several additional packages like i3lock and i3status that improve the functionality of i3.

Installing i3 in CentOS (YUM)

For YUM-based distributions like CentOS, you can install i3 using the following command:

sudo yum install i3
# Output:
# Loaded plugins: fastestmirror, langpacks
# Loading mirror speeds from cached hostfile
# Resolving Dependencies
# --> Running transaction check
# ---> Package i3.x86_64 0:4.16.1-2.el7 will be installed
# --> Finished Dependency Resolution
# Dependencies Resolved
# ================================================================================
#  Package    Arch          Version               Repository               Size
# ================================================================================
# Installing:
#  i3         x86_64        4.16.1-2.el7          epel                    590 k
# Transaction Summary
# ================================================================================
# Install  1 Package
# Total download size: 590 k
# Installed size: 1.8 M
# Is this ok [y/d/N]: y

This command installs the i3 window manager on your CentOS system. You can start using it by logging out of your current session and selecting i3 from the session menu when you log back in.

Installing i3 from Source Code

If you’re looking for the latest features or want to contribute to the i3 project, you might want to install i3 from the source code. Here’s how you can do it:

First, clone the i3 repository from GitHub:

git clone https://github.com/i3/i3.git

Next, navigate into the cloned directory and compile the source code:

cd i3
make

Finally, install the compiled program:

sudo make install

Installing Different Versions of i3

Depending on your needs, you might want to install a different version of i3. Here’s how you can do it.

Installing Different Versions from Source

To install a specific version of i3 from source, you need to check out the corresponding Git tag before compiling the source code. For example, to install version 4.18.2, you would do the following:

git clone https://github.com/i3/i3.git
cd i3
git checkout 4.18.2
make
sudo make install

Installing Different Versions Using Package Managers

APT

To install a specific version of i3 using APT, you can use the following command:

sudo apt install i3=4.18.2-1

YUM

YUM doesn’t support installing specific versions directly. However, you can download the RPM package of the version you want and install it using rpm -i.

Why Choose One Version Over Another

Different versions of i3 come with different features and bug fixes. For example, version 4.18 introduced an improved version of the i3bar, while version 4.19 fixed several bugs related to window focus.

Here’s a comparison of the last three versions:

VersionKey FeaturesCompatibility
4.19Bug fixes (window focus)Compatible with most systems
4.18Improved i3barCompatible with most systems
4.17New i3-msg commandsCompatible with most systems

Using the i3 Command

Once you’ve installed i3, you can start it by logging out of your current session and selecting i3 from the session menu when you log back in. To open a terminal, press Mod+Enter. To launch an application, press Mod+D to open the application launcher.

Verifying the Installation

To verify that i3 is installed correctly, you can use the i3 --version command:

i3 --version
# Output:
# i3 version 4.19 (2020-11-15) © 2009 Michael Stapelberg and contributors

This command will print the installed version of i3, confirming that the installation was successful.

Exploring Alternative Window Managers in Linux

While the i3 window manager is an excellent tool for enhancing your Linux desktop experience, it’s not the only option available. Let’s explore some alternative window managers that you might consider, such as dwm and awesome.

DWM: The Dynamic Window Manager

dwm is a dynamic window manager for X. It manages windows in tiled, monocle, and floating layouts. All of the layouts can be applied dynamically, optimizing the environment for the application in use and the task performed.

Installing dwm is straightforward. For instance, on an APT-based system like Ubuntu, you can use the following command:

sudo apt install dwm
# Output:
# Reading package lists... Done
# Building dependency tree
# Reading state information... Done
# The following NEW packages will be installed:
#  dwm
# 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
# Need to get 36.7 kB of archives.
# After this operation, 81.9 kB of additional disk space will be used.
# Do you want to continue? [Y/n]

dwm is minimalistic, lightweight, and extremely fast. However, it’s less user-friendly than i3, especially for beginners, as it requires editing its source code for customization.

Awesome: Highly Configurable Window Manager

awesome is a highly configurable, next-generation framework window manager for X. It’s extremely fast, small, dynamic, and heavily extensible using the Lua programming language.

To install awesome on an APT-based system, use the following command:

sudo apt install awesome
# Output:
# Reading package lists... Done
# Building dependency tree
# Reading state information... Done
# The following additional packages will be installed:
#  awesome-common libev4 libid3tag0 libimlib2 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-xinerama0 libxcb-xkb1
#  libxkbcommon-x11-0
# Suggested packages:
#  awesome-doc
# The following NEW packages will be installed:
#  awesome awesome-common libev4 libid3tag0 libimlib2 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-xinerama0 libxcb-xkb1
#  libxkbcommon-x11-0
# 0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
# Need to get 1,425 kB of archives.
# After this operation, 4,974 kB of additional disk space will be used.
# Do you want to continue? [Y/n]

awesome is known for its configurability, extensibility, and stylish look. However, it might be overkill if you’re looking for something simple and straightforward.

Making a Choice

When choosing a window manager, consider your specific needs and preferences. If you prefer simplicity and ease of use, i3 might be the best choice. If you need a lightweight and blazingly fast window manager, consider dwm. If you’re looking for a highly customizable and extensible window manager, awesome might be the right choice.

Troubleshooting Common Issues with i3 Window Manager

While the i3 window manager is a powerful tool for managing your Linux desktop, you may encounter some issues when using it. We’ll discuss some common problems and their solutions here.

i3 Doesn’t Start After Installation

Sometimes, after installing i3, you might find that it doesn’t start when you log in. This could be due to several reasons, such as a missing dependency or a problem with your display server. One way to troubleshoot this is to start i3 from the command line and see if any error messages are displayed. You can do this by opening a terminal and typing:

startx /usr/bin/i3
# Output:
# xauth:  file /home/user/.Xauthority does not exist
# xauth: (argv):1:  merge:  unable to open file /home/user/.serverauth.1234
# /usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server

This command will try to start i3 using the X server, and if there’s a problem, it will print an error message. In this case, the error message indicates that the X server can only be run by console users.

i3 Doesn’t Remember Your Settings

Another common issue is that i3 doesn’t remember your settings. This could be due to a problem with your configuration file. i3 stores its configuration in a file called .i3/config in your home directory. If this file is missing or corrupted, i3 might not remember your settings.

To check if your configuration file exists and is readable, you can use the following command:

cat ~/.i3/config
# Output:
# cat: /home/user/.i3/config: No such file or directory

This command will print the contents of your i3 configuration file. If the file doesn’t exist, you’ll see a ‘No such file or directory’ error message.

i3 Doesn’t Work Well with Your Display Server

If you’re using a non-standard display server, such as Wayland, you might find that i3 doesn’t work well. This is because i3 is designed to work with the X11 display server. If you’re using Wayland, you might want to consider using a Wayland-compatible window manager, such as Sway.

In conclusion, while i3 is a powerful window manager, it’s not without its quirks. However, with some troubleshooting and understanding of how it works, you can overcome these issues and make the most of your Linux desktop experience.

Understanding Window Managers in Linux

Before we delve deeper into the i3 window manager, it’s crucial to understand what a window manager is and why it’s an essential part of a Linux system.

What is a Window Manager?

A window manager is a system software that controls the placement and appearance of windows within a windowing system. It is an essential part of a graphical user interface (GUI) and significantly influences the user’s interactions with the operating system.

# A simple example of a window manager in action is when you open a terminal in Linux.

gnome-terminal &
# Output:
# [1] 12345

In this example, when you run gnome-terminal &, a new terminal window opens. The window manager determines where this window appears, its size, and how it behaves when you interact with it (such as minimizing, maximizing, or closing the window).

Why are Window Managers Important?

Window managers play a crucial role in managing the user’s workspace. They handle the way application windows are displayed, their arrangement, appearance, and the interaction between them and the user. This includes functions like resizing, moving, and switching between windows.

# For example, you can switch between windows using the Alt+Tab shortcut. This is handled by the window manager.

# No output is expected from this command, as it's a keyboard shortcut.

Without a window manager, all these tasks would need to be handled manually, leading to a poor user experience. Therefore, a window manager is vital for a productive and user-friendly desktop environment.

The Role of the i3 Window Manager

The i3 window manager is a tiling window manager. Tiling window managers arrange windows in a non-overlapping pattern, allowing you to see all your windows simultaneously without any of them being obscured. This is particularly useful for tasks that require monitoring multiple terminals or documents at the same time.

# For example, you can open multiple terminals side by side using the i3 window manager.

# No output is expected from this command, as it's a keyboard shortcut.

In conclusion, understanding window managers and their importance in a Linux environment provides a solid foundation for learning how to install and use the i3 window manager effectively.

Window Managers: Enhancing Productivity and System Administration

The role of window managers in Linux goes far beyond merely controlling the appearance and placement of windows. They play a crucial role in system administration and significantly enhance productivity.

Window Managers and System Administration

For system administrators, a window manager like i3 can be a game changer. It allows multiple terminals to be tiled side by side, making it easier to monitor system logs, network traffic, and other tasks simultaneously.

# For example, you can monitor system logs and network traffic side by side using the i3 window manager.

# No output is expected from this command, as it's a keyboard shortcut.

This feature is particularly beneficial when managing multiple servers or troubleshooting complex issues.

Boosting Productivity with i3

The i3 window manager can significantly boost productivity. Its tiling feature allows you to view multiple applications simultaneously, eliminating the need to switch back and forth between different windows.

# For example, you can have a text editor, a web browser, and a terminal open side by side, allowing you to code, research, and test your application simultaneously.

# No output is expected from this command, as it's a keyboard shortcut.

This feature is particularly beneficial for developers, researchers, and anyone who needs to multitask.

Exploring Related Concepts

If you’re interested in enhancing your Linux desktop experience further, you might want to explore related concepts like desktop environments and display servers. Desktop environments provide a complete graphical user interface for your Linux system, while display servers control the input and output of your system to and from its display.

Further Resources for Mastering i3 and Linux Window Management

To deepen your understanding of the i3 window manager and Linux window management, consider exploring these resources:

  1. i3 User’s Guide: A comprehensive guide to using i3, covering everything from installation to configuration.

  2. Linux Window Managers: An overview of different window managers available for Linux and how to choose the right one for your needs.

  3. Desktop Environments, Window Managers, Display Servers: A Guide: A detailed guide explaining the differet window managers in linux.

Wrapping Up: Installing the i3 Window Manager in Linux

In this comprehensive guide, we’ve delved into the world of the i3 window manager in Linux, a powerful tool that enhances your desktop experience by providing efficient workspace management.

We began with the basics, learning how to install the i3 window manager using the package manager in Linux distributions like Ubuntu and CentOS. We then explored more advanced usage scenarios, such as installing i3 from the source code, installing different versions, and using the i3 command. Along the way, we tackled common issues that you might encounter when using i3, providing solutions to ensure a smooth user experience.

We also ventured into alternative approaches to window management in Linux, comparing i3 with other window managers like dwm and awesome. Here’s a quick comparison of these window managers:

Window ManagerEase of UseCustomizabilityMemory Efficiency
i3HighModerateHigh
dwmModerateLowHigh
awesomeHighHighModerate

Whether you’re just starting out with i3 or looking to level up your Linux desktop management skills, we hope this guide has given you a deeper understanding of i3 and its capabilities.

With its balance of ease of use, customizability, and memory efficiency, the i3 window manager is a powerful tool for enhancing your Linux desktop experience. Happy Linux-ing!