本文主要记录qemu的使用经验。

behavior of -serial stdio vs. -serial mon:stdio

To avoid QEMU being terminated on SIGINT (Ctrl+c), instead of just stdio, supply the special parameter mon:stdio to-serial option.

https://kashyapc.wordpress.com/2016/02/11/qemu-command-line-behavior-of-serial-stdio-vs-serial-monstdio/

quit the QEMU monitor when not using a GUI

Ctrl-A X
https://superuser.com/questions/1087859/how-to-quit-the-qemu-monitor-when-not-using-a-gui

built-in monitor mode

https://pdos.csail.mit.edu/6.828/2018/labguide.html

QEMU includes a built-in monitor that can inspect and modify the machine state in useful ways. To enter the monitor, press Ctrl-a c in the terminal running QEMU. Press Ctrl-a c again to switch back to the serial console.

For a complete reference to the monitor commands, see the QEMU manual.