Small Aircraft
Flight Crew Instrument; Flight Crew Private
Flight Crew Last 90 Days 24.7; Flight Crew Total 3530; Flight Crew Type 3000
Distraction; Situational Awareness; Communication Breakdown
Conflict NMAC; Deviation / Discrepancy - Procedural Published Material / Policy; Deviation / Discrepancy - Procedural Clearance
Air Traffic Control Issued Advisory / Alert
Human Factors
I had arranged a fly-in of several aircraft to ZZZ or to ZZZ1; and we were going to talk enroute on XXY.ZA [Frequency] to confirm the destination after we could see if the North coast was fogged in.  I had been on flight-following with Oakland Center.  I do not recall my exact location but likely about halfway to ZZZ1 from departure at Oakland.  There was another private pilot in the right seat.  I was talking with the other pilots on my standby radio on [Frequency] and looking at the radio when I heard ATC call out traffic.  At the same time that ATC called; a low-wing airplane; which I cannot identify by brand; passed immediately beneath me.  I responded to ATC that traffic had passed.  When we all calmed down from the frightful realization that it could have been our last day on earth; my copilot said that he had heard one previous call from ATC about a traffic conflict and had been looking for traffic; but had not seen this aircraft until it barely passed under us. It was coming from about our 9 to 10:00 position at exactly 6;500 feet.The most important lesson of this near miss is that when I am PIC in VMC; I cannot be spending any amount of time more than a second looking at my radios; or focusing intently on something other than flying the airplane and scanning for traffic.  Had I heard ATC's initial transmission; I would have immediately climbed or descended to put good distance between my plane and the other one before there was any real chance for a close encounter.  I had not looked at my ADS-B traffic for the minute or so that I was engaged in talking with the other pilots on [Frequency].  Had I been scanning the ADS-B instrument as I typically do almost constantly; I would have perceived the threat and given it a wide berth perhaps even before ATC called out the traffic.My copilot has better than 20/20 far vision and often sees aircraft before I do - so it is likely the other aircraft was not visible until it was very close.  I am still shell-shocked at how close we all came to one another.
GA pilot reported an NMAC during cruise in ZOA Class E airspace.