What is the terminal command other than ctrl + c to exit a running Node.js program in a macOS?

Solution 1:

The accurate answer for MAC Keyboard on terminal is:

Command + . (dot/period)

This is equivalent to Ctrl + C or break.

Refer to the:

Terminal Help > Keyboard Shortcuts > Other Shortcuts > Break

The Control or Ctrl key is not a regular modifier in macOS.

However, if you are using a regular Windows keyboard with macOS then Ctrl + C works since there is no Command key in this case.

Solution 2:

Try:

Ctrl + C

It should be the same as Linux.

Duplicate of: this question