Solution 1:

Yes, the Terminal command that you provided does prevent App Nap:

defaults write com.apple.Terminal NSAppSleepDisabled -bool YES

I tested the command, and it worked successfully…

  • Before:

  • After: