On Debian with the GNOME desktop environment, the command equivalent to clicking the "Quit" button in a program window (which typically closes the window but does not forcefully kill the program) is:
bashxdotool getactivewindow windowkill
However, this requires xdotool to be installed. If you want a more native approach, you can use:
bashwmctrl -c :ACTIVE:
This sends a "close window" request to the active window, allowing the program to handle the shutdown gracefully (e.g., prompting to save files if needed).
wmctrl (if not already installed):
bashsudo apt install wmctrl
This mimics the behavior of clicking the "X" button or selecting "Quit" from the menu, rather than forcefully terminating the process.