Skip to main content
The connect command connects to a named multiplexer domain configured in your WezTerm configuration file.

Synopsis

Description

Connects to a multiplexer domain that you’ve defined in your WezTerm configuration. This allows you to attach to remote or local multiplexer sessions and work with persistent terminal sessions.

Arguments

string
required
Name of the multiplexer domain section from the configuration to which you’d like to connect.This must match a domain name defined in your wezterm.lua configuration file.Example:
string[]
Instead of executing your shell, run PROG. The program and its arguments should be specified after the domain name.Example:
This will spawn bash as if it were a login shell.

Options

flag
When spawning into an existing GUI instance, spawn a new tab into the active window rather than spawn a new window.
string
Override the default windowing system class. The default is org.wezfurlong.wezterm.
  • Under X11 and Windows: changes the window class
  • Under Wayland: changes the app_id
This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs.
string
Override the default workspace with the provided name. The default is "default".Example:
string
Override the position for the initial window launched by this process.Format options:
  • --position 10,20 - set x=10, y=20 in screen coordinates
  • --position screen:10,20 - set x=10, y=20 in screen coordinates
  • --position main:10,20 - set x=10, y=20 relative to the main monitor
  • --position active:10,20 - set x=10, y=20 relative to the active monitor
  • --position HDMI-1:10,20 - set x=10, y=20 relative to the monitor named HDMI-1

Configuration Example

Before using wezterm connect, you need to define multiplexer domains in your wezterm.lua:

Examples

Connect to a Unix domain

Connect to an SSH domain

Connect and spawn in a new tab

Connect with a specific workspace

Connect and run a specific program