Raspberry Pi Pico W UART Updated +Created
You can connect form an Ubuntu 22.04 host as:
screen /dev/ttyACM0 115200
When in screen, you can Ctrl + C to kill main.py, and then execution stops and you are left in a Python shell. From there:
but be aware of: Raspberry Pi Pico W freezes a few seconds after after screen disconnects from UART.