Switching between Linux and Xilinx PYNG

How to exit from PYNQ to Linux OS

Can you elaborate?
PYNQ is based on linux/ubuntu. So if you open a terminal on the PYNQ image you have a ubuntu based shell.
Do you mean switching between PYNQ and PetaLinux?