Tag archive for: macOS screen

How to terminate screen terminal sessions cleanly on macOS

So how do you communicate with a serial device that is connected to your Mac?

In this situation, you can use the screen command on your Mac to do so.

After you terminate the serial session with Ctrl+A+D, you may find that the serial device is still being hogged by the screen command.

When you try to access the device again, you may encounter a Resource busy error message.

For example, after I detached my screen terminal from /dev/cu.SLAB_USBtoUART, I will get the following message if I try to connect to the same device again:

Cannot open line ‘/dev/cu.SLAB_USBtoUART’ for R/W: Resource busy

Given these points, this post shows how we can terminate screen terminal sessions cleanly on macOS.