> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/wezterm/wezterm/llms.txt
> Use this file to discover all available pages before exploring further.

# wezterm serial

> Open and interact with a serial port in WezTerm

The `serial` command opens a serial port connection, allowing you to interact with serial devices directly from WezTerm.

## Synopsis

```bash theme={null}
wezterm serial [OPTIONS] <PORT>
```

## Description

Opens a connection to a serial port device. This is useful for interacting with embedded systems, microcontrollers, network equipment, and other hardware that communicates via serial interfaces.

## Arguments

<ParamField path="PORT" type="string" required>
  Specifies the serial device name.

  * **Windows:** Use names like `COM0`, `COM1`, `COM2`, etc.
  * **Linux/Unix:** Use device paths like `/dev/ttyUSB0`, `/dev/ttyACM0`, `/dev/ttyS0`, etc.
  * **macOS:** Use device paths like `/dev/cu.usbserial-1234`, `/dev/tty.usbserial-1234`, etc.

  **Examples:**

  ```bash theme={null}
  # Windows
  wezterm serial COM3

  # Linux
  wezterm serial /dev/ttyUSB0

  # macOS
  wezterm serial /dev/cu.usbserial-1234
  ```
</ParamField>

## Options

<ParamField path="--baud" type="number">
  Set the baud rate. The default is 9600 baud.

  Common baud rates: 9600, 19200, 38400, 57600, 115200

  **Example:**

  ```bash theme={null}
  wezterm serial --baud 115200 /dev/ttyUSB0
  ```
</ParamField>

<ParamField path="--class" type="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.
</ParamField>

<ParamField path="--position" type="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
</ParamField>

## Examples

### Connect with default baud rate (9600)

```bash theme={null}
# Linux
wezterm serial /dev/ttyUSB0

# Windows
wezterm serial COM3
```

### Connect with 115200 baud

```bash theme={null}
wezterm serial --baud 115200 /dev/ttyUSB0
```

### Arduino serial connection

```bash theme={null}
# Linux
wezterm serial --baud 9600 /dev/ttyACM0

# macOS
wezterm serial --baud 9600 /dev/cu.usbmodem14101
```

### Embedded development board

```bash theme={null}
wezterm serial --baud 115200 /dev/ttyUSB0
```

### Network equipment console

```bash theme={null}
wezterm serial --baud 9600 /dev/ttyUSB0
```

## Finding Serial Ports

### Linux

List available serial ports:

```bash theme={null}
ls /dev/tty*
# Look for ttyUSB*, ttyACM*, ttyS*
```

Or use:

```bash theme={null}
dmesg | grep tty
```

### macOS

List available serial ports:

```bash theme={null}
ls /dev/cu.*
ls /dev/tty.*
```

### Windows

Check Device Manager or use PowerShell:

```powershell theme={null}
[System.IO.Ports.SerialPort]::getportnames()
```

## Common Use Cases

* **Arduino/Microcontroller Development:** Connect to Arduino boards or other microcontrollers for programming and debugging
* **Embedded Systems:** Interact with embedded Linux systems via serial console
* **Network Equipment:** Access console ports on routers, switches, and other network devices
* **Debugging:** Monitor serial output from hardware devices
* **IoT Devices:** Communicate with IoT hardware during development

## Tips

* On Linux, you may need to add your user to the `dialout` group to access serial ports:
  ```bash theme={null}
  sudo usermod -a -G dialout $USER
  ```
  (Log out and back in for changes to take effect)

* Some devices require specific baud rates. Check your device documentation.

* Use Ctrl+C to send interrupt signals to the connected device

## Related

* [wezterm ssh](/cli/ssh) - Connect to remote systems via SSH
* [wezterm start](/cli/start) - Start a local terminal session
