OVERVIEW INSTALL I3 SETUP CLI TASKS DAILY USE

I3 WINDOW MANAGER ON DEBIAN

// Master the keyboard. Reject bloat.

// WHAT WE'RE BUILDING

In this tutorial, you'll install Debian Linux (CLI only) and set up i3, a tiling window manager. i3 is fast, lightweight, and completely keyboard-driven. You'll learn to do everything without a mouse - because reaching for a mouse slows you down.

// WHY THIS MATTERS

Most Linux distributions ship with bloated desktop environments that consume gigabytes of RAM and CPU. i3 is different - it uses a fraction of the resources and forces you to learn the keyboard. Once you master i3, you'll never want to go back. You'll be faster, more efficient, and your computer will run cooler and faster.

// What You'll Learn

This project teaches you:

What is i3?

i3 is a tiling window manager for X11. Unlike traditional desktop environments (GNOME, KDE, XFCE), i3 doesn't have panels, docks, or desktop icons. It simply manages windows - and it does it brilliantly.

"Tiling" means i3 automatically arranges your windows to fill the screen. No dragging, resizing, or maximizing. When you open a new window, i3 decides where it goes based on which mode you're in.

Why No Display Manager?

A display manager (GDM, SDDM, LightDM) shows you a login screen and starts your desktop. But if you have only one user and boot to console, you don't need one. startx does the job - it starts X11 and launches i3 directly.

Prerequisites

System Requirements

Debian with i3 is incredibly lightweight:

// Part 1: Install Debian CLI

We'll install Debian with no desktop environment - just the base system and SSH server.

1.1 Download Debian

Download the Debian netinst ISO (small installer that downloads packages):

Visit debian.org/distrib and download "Small CD" or "netinst" for your architecture (amd64 for most modern computers).

1.2 Create a Bootable USB

$ lsblk
# Find your USB drive (likely /dev/sdX)
$ sudo dd if=debian-12.x.x-amd64-netinst.iso of=/dev/sdX bs=4M status=progress
# Replace sdX with your USB device

1.3 Boot and Install

Boot from USB and follow these steps:

  1. Install - Choose "Install"
  2. Language - Choose English
  3. Location - Choose your country
  4. Keyboard - Choose your keyboard layout
  5. Hostname - Enter something short (e.g., "desktop")
  6. Domain - Leave blank or enter "localdomain"
  7. Root Password - Set a strong password (or skip for sudo)
  8. Full Name - Enter your name
  9. Username - Choose a username
  10. Password - Set a password
  11. Clock - Choose "UTC" or your timezone

1.4 Partitioning

For a simple desktop, use the guided partitioner:

  1. Partitioning Method - Choose "Guided - use entire disk"
  2. Select Disk - Choose your main disk
  3. Partition Scheme - Choose "All files in one partition"
  4. Finish - Choose "Finish partitioning and write changes to disk"
  5. Write - Choose "Yes" to write changes

1.5 Software Selection

This is crucial - don't select any desktop environment:

Only check "ssh server" and "standard system utilities".

1.6 Complete Installation

Wait for the installation to complete, then reboot. You'll see a login prompt - you've got a minimal Debian system!

1.7 First Boot

debian login: your-username
Password: your-password
Linux debian 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 x86_64

The programs included with the Debian GNU/Linux are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Last login: Wed Feb 25 10:00:00 from 192.168.1.1
user@debian:~$

1.8 Initial Setup

$ sudo apt update
# Update package lists
$ sudo apt upgrade
# Install updates

1.9 Add sudo (if you skipped root)

$ su -
Password: root-password
root@debian:~# apt install sudo
root@debian:~# usermod -aG sudo username
root@debian:~# exit

Important

Log out and log back in for sudo group membership to take effect!

// Part 2: Install i3 and X11

Now let's install the graphical stack: X11, i3, and a terminal.

2.1 Install X11

$ sudo apt install xorg
# X11 windowing system

2.2 Install i3

$ sudo apt install i3
# i3 window manager

2.3 Install xinit

$ sudo apt install xinit
# Start X without display manager

2.4 Install Terminal

$ sudo apt install xfce4-terminal
# A good terminal emulator

Recommended Additional Packages

Install these for a better experience:

$ sudo apt install feh nitrogen rxvt-unicode rofi dmenu scrot compton lm-sensors
# feh: wallpaper | nitrogen: wallpaper manager | rofi/dmenu: app launcher | scrot: screenshots | compton: transparency | lm-sensors: hardware monitoring

2.5 Install Basic Fonts

$ sudo apt install fonts-terminus fonts-firacode
# Nice monospace fonts

2.6 Configure xinit

Create ~/.xinitrc to tell xinit what to start:

$ nano ~/.xinitrc
# ~/.xinitrc

# Set background color (fallback if no wallpaper)
xsetroot -solid "#1a1a1a"

# Start i3
exec i3
$ chmod +x ~/.xinitrc

2.7 Start i3

Logout or switch to a virtual terminal (Ctrl+Alt+F2), then:

$ startx
# Launch i3!

First Launch

On first launch, i3 will ask if you want to generate a config file. Choose "Yes" and press Enter.

// Part 3: CLI Tasks Without GUI

Without a file manager or graphical text editor, you'll need to learn command-line alternatives. This section covers everything you need.

3.1 Text Editing Without GUI

You have several options, from easiest to most powerful:

Nano - Easiest for Beginners

$ nano filename.txt
# Simple text editor

Controls:

Vim - Most Powerful

$ vim filename.txt
# Or vi

Vim has two modes:

Basic Vim commands:

Tip

Run vimtutor to learn Vim in 30 minutes. It's the best way to learn!

Emacs - Most Features

$ sudo apt install emacs-nox
$ emacs -nw filename.txt
# -nw = no window (terminal mode)

3.2 File Management Without GUI

Instead of a file manager, use the command line:

List Files

$ ls
# List files
$ ls -la
# List with details
$ ls -lh
# Human-readable sizes
$ ls -la | head -20
# First 20 files

Navigate Directories

$ cd /path/to/dir
# Change directory
$ cd ~
# Go home
$ cd -
# Go to previous directory
$ pwd
# Print working directory

View File Contents

$ cat file.txt
# Print entire file
$ less file.txt
# View file with scrolling (q to quit)
$ head -20 file.txt
# First 20 lines
$ tail -20 file.txt
# Last 20 lines
$ tail -f /var/log/syslog
# Follow log file

Create Files and Directories

$ touch file.txt
# Create empty file
$ mkdir newdir
# Create directory
$ mkdir -p dir1/dir2/dir3
# Create nested directories
$ echo "text" > file.txt
# Write text to file (overwrites)
$ echo "text" >> file.txt
# Append text to file

Copy, Move, Delete

$ cp source.txt dest.txt
# Copy file
$ cp -r dir/ backup/
# Copy directory recursively
$ mv oldname.txt newname.txt
# Rename/move file
$ rm file.txt
# Delete file
$ rm -r dir/
# Delete directory
$ rm -rf dir/
# Force delete (be careful!)

DANGER

rm -rf / will destroy your system! Never run commands you don't understand.

Find Files

$ find /home -name "*.txt"
# Find all .txt files in home
$ find / -type d -name "Documents"
# Find directories named Documents
$ locate filename
# Quick search (needs updatedb first)

Permissions

$ chmod +x script.sh
# Make executable
$ chmod 755 file
# rwxr-xr-x permissions
$ chown user:group file
# Change owner

3.3 Package Management

Debian uses APT (Advanced Package Tool):

$ sudo apt update
# Update package lists
$ sudo apt upgrade
# Upgrade all packages
$ sudo apt install packagename
# Install package
$ sudo apt remove packagename
# Remove package
$ apt search term
# Search for packages
$ apt show packagename
# Show package info
$ dpkg -l
# List installed packages

3.4 Process Management

$ top
# Interactive process viewer
$ htop
# Better process viewer (install first)
$ ps aux
# List all processes
$ pkill processname
# Kill process by name
$ kill 1234
# Kill process by PID
$ kill -9 1234
# Force kill

3.5 System Information

$ uname -a
# Kernel info
$ free -h
# Memory usage
$ df -h
# Disk usage
$ lsblk
# Block devices
$ ip addr
# Network addresses
$ uptime
# How long running
$ cat /proc/cpuinfo
# CPU info
$ sudo sensors
# Temperature (if lm-sensors installed)

// Part 4: Daily Use with i3

Now you have i3 running. Let's make it productive.

4.1 i3 Basics

i3 uses a "mod" key (usually Mod4 = Windows key, or Mod1 = Alt):

Window Management

Layout Modes

Workspace Management

4.2 Launching Programs

Press Mod+d to open dmenu - a minimal application launcher. Start typing the name of the program you want to launch:

4.3 Essential Keyboard Shortcuts

Terminal (xfce4-terminal)

Copy/Paste in Terminal

4.4 Customizing i3

Edit ~/.config/i3/config to customize i3:

$ mkdir -p ~/.config/i3
$ cp /etc/i3/config ~/.config/i3/config
# Copy default config

Change Mod Key

# Find this line and change it:
set $mod Mod1

# Or use Windows key:
set $mod Mod4

Add Custom Keybindings

# Launch terminal with Mod+Enter
bindsym $mod+Return exec xfce4-terminal

# Launch browser with Mod+b
bindsym $mod+b exec firefox

# Screenshot with Print key
bindsym Print exec scrot ~/screenshot-%Y%m%d-%H%M%S.png

Status Bar Configuration

Install i3status for a status bar:

$ sudo apt install i3status

Configure in ~/.config/i3status/config or use i3blocks for more options.

4.5 Multi-Monitor Setup

$ xrandr
# List monitors and outputs
$ xrandr --output HDMI-1 --mode 1920x1080 --right-of DP-1
# Set up dual monitors

Add this to ~/.xinitrc to make it permanent.

4.6 Managing Audio

$ sudo apt install alsa-utils
# Basic audio tools
$ alsamixer
# Interactive mixer (ncurses)

Volume Controls

$ amixer sset Master 50%
# Set volume to 50%
$ amixer sset Master toggle
# Mute/unmute
$ amixer sset Master 5%+
# Increase volume
$ amixer sset Master 5%-
# Decrease volume

4.7 Screen Brightness

$ xbacklight -set 50
# Set brightness to 50%
$ xbacklight -inc 10
# Increase by 10%
$ xbacklight -dec 10
# Decrease by 10%

4.8 Installing Software

Some recommended packages to install:

$ sudo apt install firefox-esr chromium
# Web browsers
$ sudo apt install vim-gtk3 curl wget git htop
# CLI essentials
$ sudo apt install zathura zathura-pdf-poppler
# PDF viewer
$ sudo apt install mpv
# Video player
$ sudo apt install imagemagick
# Image tools (convert, etc)
$ sudo apt install ranger
# CLI file manager (optional)
$ sudo apt install network-manager-gnome
# WiFi GUI (if needed)

// Part 5: Troubleshooting

5.1 Can't Connect to WiFi?

$ ip link
# Check network interfaces
$ sudo apt install firmware-iwlwifi
# Intel WiFi firmware
$ sudo systemctl restart NetworkManager

5.2 No Sound?

$ pavucontrol
# PulseAudio volume control (install first)
$ sudo usermod -aG audio username
# Add user to audio group

5.3 i3 Not Starting?

$ startx 2>&1 | tee ~/xlog
# Start and save errors
$ cat ~/xlog
# Check for errors

5.4 Return to Console

If i3 freezes or you need to get out:

5.5 Get Help

$ man command
# Read manual
$ command --help
# Quick help
$ info command
# Detailed info

// Summary

You've installed a minimal Debian system with i3 window manager!

What You Can Do Now

Next Steps:

You've taken back control of your computer. No bloat, no unnecessary features, no sluggish performance. Just you and your keyboard.

The revolution will not be proprietary.