President Obama is not going quietly into his post-presidency.

He has said he plans to stay out of the day-to-day political scrum, find some “quiet” and write a book when his second term ends Friday. For the moment, though, he is staying in the media spotlight with speeches, interviews and a news conference planned for Wednesday. And Obama has used the flurry of appearances to stake out a legacy imperiled by the surprising victory of President-elect Donald Trump.

He has also offered Trump some advice when it comes to tweeting.

"What's going on?" Steve Kroft of "60 Minutes," asked Obama in the wake of Trump tweets that attacked actress Meryl Streep as "over-rated" and suggested that the United States needs to expand its nuclear arsenal.

Obama first warned not to “underestimate [Trump], because he is going to be the 45th president of the United States.” Then the outgoing commander in chief made the case for hewing to some presidential “norms” and “traditions.”

“There is a reason they are in place,” Obama said in the interview, which airs Sunday night.

Obama expounded a bit more on the topic of presidential improvisation in an interview with NBC News anchor Lester Holt that aired Friday on "Dateline NBC."

“The interesting thing about the presidency is that there aren’t a lot of things that are spontaneous,” Obama said. A stray remark by the president, he noted, can move markets or trigger wars.

But Obama did, at times, depart from the script with powerful results.

“You do look for moments of human connection, and in some ways, those end up being the moments that are most meaningful,” he said.

One of those moments came during the eulogy Obama delivered in Charleston, S.C., for the Rev. Clementa Pinckney, who was in 2015 shot dead in his church there. Before Obama began singing "Amazing Grace," he recalled, he looked into the pews and saw the slain pastor's two daughters.

“There are going to be times where people will listen and times where they won’t,” Obama said of the country’s long and often torturous debates about issues such as race relations and gun violence. “There were open hearts at that moment.”

Obama has used these final interviews to talk about improvements to the economy, progress in fighting climate change and diplomatic inroads with longtime adversaries such as Cuba and Iran. He also has talked about the failure to secure gun legislation following the 2012 massacre of 20 elementary school students in Newtown, Conn.

“I didn’t expect that you’d see some huge movement on gun-safety legislation, but I thought, ‘They are going to have to make some effort,’ ” Obama said of Congress in the NBC interview.

Obama has been careful not to criticize Trump too directly, though he did speculate in a podcast interview with David Axelrod, the chief strategist for Obama's two presidential campaigns, that he and his vision for the country would have defeated the president-elect in a head-to-head matchup.

Even when he leaves office and stops giving interviews, Obama will not be completely absent from the media spotlight. Both Vice News and the History Channel have interviewed Obama for documentaries that will air after Trump’s inauguration.