serial command opens a serial port connection, allowing you to interact with serial devices directly from WezTerm.
Synopsis
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
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.
Options
Set the baud rate. The default is 9600 baud.Common baud rates: 9600, 19200, 38400, 57600, 115200Example:
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
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
Examples
Connect with default baud rate (9600)
Connect with 115200 baud
Arduino serial connection
Embedded development board
Network equipment console
Finding Serial Ports
Linux
List available serial ports:macOS
List available serial ports:Windows
Check Device Manager or use PowerShell: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
dialoutgroup to access serial ports:(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 - Connect to remote systems via SSH
- wezterm start - Start a local terminal session