xquartz --version or launching XQuartz from /Applications/Utilities/ . If you have Homebrew, you can also install with: brew install --cask xquartz

you need to install xquartz 2.7.7 or higher first