While he focused on Mr. Bloomberg, the president did not spare any of his Democratic rivals. He and Mr. Hannity played a lightning round where Mr. Hannity invited the president to say whatever came to mind about Democratic presidential candidates, including former Vice President Joseph R. Biden Jr., Senator Elizabeth Warren of Massachusetts and Senator Bernie Sanders of Vermont.

Mr. Trump falsely called Mr. Sanders a “communist” and claimed that he had been married in Russia.

“I think of communism when I think of Bernie,” Mr. Trump said. “Didn’t he get married in Moscow?”

Mr. Sanders was married in Burlington, Vt., before traveling to the Soviet Union soon after, and the trip has been used as fodder by his critics as evidence that he has communist leanings.

During his Fox sit-down, both Mr. Trump and his interviewer seemed more interested in allowing the president to focus on his grievances over impeachment and his re-election effort rather than elaborate on a global public health crisis.

“It’s been very unfair from the day I won,” Mr. Trump said. “Mostly it was unfair to my family.”

He gave a comparatively cursory amount of attention to the spread of the coronavirus, which caused his administration to bar foreign nationals and Americans who had traveled to China recently from entering the United States.

“We pretty much shut it down coming in from China,” Mr. Trump said of the coronavirus. “But we can’t have thousands of people coming in who may have this problem, the coronavirus.”

Mr. Trump summed it up this way: “So we’re going to see what happens. But we did shut it down, yes.”