my parallel version is 12.2.0 (41591), how can i share ubuntu folder to Mac, so that I can wirte code in Mac. thanks for any apply.
There's no any functionality in Parallels Desktop which allows to share file system of guest Linux with host macOS (only vice versa). But you may use any generic network file sharing mechanism: setup up NFS or SMB server in Ubuntu and mount it into macOS. If you're speaking about "writing code" you may be interested it placing, say, git repository on Linux and clone it into macOS.