Terminal GuideTerminal Guide
wezterm icon

WezTerm

Terminal Emulators
macOSLinuxWindows
Rust

GPU-accelerated cross-platform terminal emulator configurable with Lua.

Official Website

Features

GPU AccelerationLua ConfigurationMultiplexingLigaturesImage Protocol

Installation

Homebrew
brew install --cask wezterm
Chocolatey
choco install wezterm
Scoop
scoop install wezterm

Why Use WezTerm?

WezTerm is a high-performance terminal emulator written in Rust, featuring flexible configuration with Lua and smooth rendering with GPU acceleration.

Lua Configuration

Configuration files are Lua scripts. Supports conditional branching, function definitions, and dynamic configuration changes.

GPU Acceleration

Fast rendering using OpenGL/Metal/Vulkan. Displays large amounts of output smoothly.

Built-in Multiplexer

Built-in split panes, tabs, and workspace features without needing tmux.

Cross-Platform

Share the same configuration file across macOS, Linux, and Windows. Consistent experience everywhere.

Main Features

Ligatures and Color Emoji

Support for ligatures (diphthongs) in programming fonts and full-color emoji. Maximize the appeal of ligature fonts like Fira Code and JetBrains Mono.

Multiplexer Features

WezTerm has built-in tmux-like features. Supports pane splitting, tab management, and remote multiplexer connections via SSH.

Image Protocol Support

Supports iTerm2 image protocol, Sixel, and Kitty image protocol. Display images directly in the terminal.

Installation

macOS

macOS - Homebrew
# Install via Homebrew Cask
brew install --cask wezterm

# Or nightly build
brew install --cask wezterm@nightly

Linux

Linux
# Flatpak (Recommended)
flatpak install flathub org.wezfurlong.wezterm

# Ubuntu/Debian (from official repository)
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /etc/apt/keyrings/wezterm-fury.gpg
echo 'deb [signed-by=/etc/apt/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
sudo apt update
sudo apt install wezterm

# Arch Linux
pacman -S wezterm

Windows

Windows
# Install via Scoop
scoop bucket add extras
scoop install wezterm

# Install via Chocolatey
choco install wezterm

# Install via winget
winget install wez.wezterm

Basic Configuration

WezTerm configuration files are located at ~/.wezterm.lua. Being Lua scripts, advanced configurations using conditional branching and functions are possible.

Basic Configuration File

~/.wezterm.lua
-- ~/.wezterm.lua
local wezterm = require 'wezterm'
local config = wezterm.config_builder()

-- Font settings
config.font = wezterm.font 'JetBrains Mono'
config.font_size = 14.0

-- Color scheme
config.color_scheme = 'Tokyo Night'

-- Window settings
config.window_background_opacity = 0.95
config.window_decorations = "RESIZE"
config.window_padding = {
  left = 10,
  right = 10,
  top = 10,
  bottom = 10,
}

-- Tab bar settings
config.hide_tab_bar_if_only_one_tab = true
config.tab_bar_at_bottom = false

-- Scrollback
config.scrollback_lines = 10000

return config

OS-Specific Conditional Configuration

OS-Specific Settings
local wezterm = require 'wezterm'
local config = wezterm.config_builder()

-- OS detection
local is_mac = wezterm.target_triple:find("darwin") ~= nil
local is_windows = wezterm.target_triple:find("windows") ~= nil
local is_linux = wezterm.target_triple:find("linux") ~= nil

-- OS-specific font settings
if is_mac then
  config.font = wezterm.font 'SF Mono'
  config.font_size = 14.0
elseif is_windows then
  config.font = wezterm.font 'Cascadia Code'
  config.font_size = 12.0
  -- Set WSL as default shell
  config.default_prog = { 'wsl.exe' }
else
  config.font = wezterm.font 'JetBrains Mono'
  config.font_size = 13.0
end

return config

Keybinding Configuration

Keybindings
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
local act = wezterm.action

config.keys = {
  -- Pane splitting
  { key = 'd', mods = 'CMD', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' } },
  { key = 'd', mods = 'CMD|SHIFT', action = act.SplitVertical { domain = 'CurrentPaneDomain' } },

  -- Pane navigation
  { key = 'h', mods = 'CMD|SHIFT', action = act.ActivatePaneDirection 'Left' },
  { key = 'l', mods = 'CMD|SHIFT', action = act.ActivatePaneDirection 'Right' },
  { key = 'k', mods = 'CMD|SHIFT', action = act.ActivatePaneDirection 'Up' },
  { key = 'j', mods = 'CMD|SHIFT', action = act.ActivatePaneDirection 'Down' },

  -- Pane resize
  { key = 'LeftArrow', mods = 'CMD|ALT', action = act.AdjustPaneSize { 'Left', 5 } },
  { key = 'RightArrow', mods = 'CMD|ALT', action = act.AdjustPaneSize { 'Right', 5 } },

  -- Tab operations
  { key = 't', mods = 'CMD', action = act.SpawnTab 'CurrentPaneDomain' },
  { key = 'w', mods = 'CMD', action = act.CloseCurrentPane { confirm = true } },

  -- Copy mode (vi-style)
  { key = 'v', mods = 'CMD|SHIFT', action = act.ActivateCopyMode },
}

return config

Default Keyboard Shortcuts

Below are the default shortcuts for macOS. On Linux, replace ⌘ with Ctrl.

ShortcutFunction
⌘TOpen new tab
⌘WClose current tab/pane
⌘1-9Switch tabs by number
⌘⇧←/→Move tab
⌘FSearch
⌘KClear scrollback
⌘EnterToggle fullscreen
Ctrl+⇧+SpaceQuick Select mode (select URLs, file paths, etc.)
⌘⇧PCommand palette

Advanced Configuration

Status Bar Customization

Status Bar
local wezterm = require 'wezterm'
local config = wezterm.config_builder()

-- Enable status bar
config.status_update_interval = 1000

wezterm.on('update-right-status', function(window, pane)
  -- Current time
  local date = wezterm.strftime '%H:%M:%S'

  -- Battery info (macOS)
  local battery = ''
  for _, b in ipairs(wezterm.battery_info()) do
    battery = string.format('%.0f%%', b.state_of_charge * 100)
  end

  window:set_right_status(wezterm.format {
    { Text = battery .. ' | ' .. date .. ' ' },
  })
end)

return config

SSH Multiplexer Connection

SSH Multiplexer
local wezterm = require 'wezterm'
local config = wezterm.config_builder()

-- SSH domain settings
config.ssh_domains = {
  {
    name = 'my-server',
    remote_address = 'server.example.com',
    username = 'user',
    -- Connect as multiplexer
    multiplexing = 'WezTerm',
  },
}

-- Connection methods:
-- wezterm connect my-server
-- or press Ctrl+Shift+U for domain selection

return config

Tips

  • *Configuration Reload: Configuration files are automatically reloaded when saved. If there are errors, a notification appears at the top of the screen.
  • *Debug Overlay: Press Ctrl+Shift+L to show the debug overlay and try code in real-time in the Lua console.
  • *Color Schemes List: Use wezterm.get_builtin_color_schemes() to see available color schemes. Over 700 schemes are built-in.
  • *Quick Select: Press Ctrl+Shift+Space to quickly select and copy URLs, file paths, Git hashes, etc. using only the keyboard.
  • *Share Configuration: When managing dotfiles on GitHub, you can share a single configuration file across macOS, Linux, and Windows by using OS detection.
Written by Dai AokiPublished: 2026-01-20

Related Articles

Explore More