Safari mostly uses the open-source WebKit, except it of course sets all the Mac defines and Apple-specific feature flags, and there’s a bit of extra code sprinkled in internally. On Linux you can get something similar but not exactly the same by using one of the WebKit browsers, such as GNOME Web.