Question: how to use xquartz on mac?
Answer: Install XQuartz on your Mac, which is the official X server software for Mac.
Run Applications > Utilities > XQuartz.app.
Right click on the XQuartz icon in the dock and select Applications > Terminal. ... 
In this xterm windows, ssh into the linux system of your choice using the -X argument (secure X11 forwarding).