Various timelines have been floated, but Trump on Wednesday seemed vague, saying only that it would happen "over a period of time".
In one of his first meetings of the day, Shanahan told civilian leaders of the U.S. military to focus on "China, China, China", even as America fights militants in Syria and Afghanistan, a U.S. defense official said.
In televised remarks on January 2, Trump said he "essentially fired" Mattis.
On Wednesday, Trump proclaimed to Cabinet members and the assembled press that "as you know, President Obama fired [Mattis], and essentially, so did I". How had he done in Afghanistan? Not too good. Not too good.
But Trump was reportedly irked by news coverage of Mattis' impending departure that focused on his resignation letter in which he cited policy differences with the president and said Trump was abandoning USA allies. "I'm not happy with what he's done in Afghanistan and I shouldn't be happy", Trump said, according to the New York Times.
According to USA officials, Trump is also considering a 50 per cent drawdown in Afghanistan - another move that has left some lawmakers and worldwide allies fearing what might come next.
"While we are focused on ongoing operations, Acting Secretary Shanahan told the team to remember: China, China, China", the official said.More news: The Official Coachella 2019 Lineup Has Arrived
Trump said during the cabinet meeting that Islamic State militants should be combated by nations in the region, including U.S. adversary Iran.
Trump tweeted days later that Mattis would depart the administration at the beginning of the year, as opposed to his initial departure date of February 28, writing that he had given Mattis a "second chance" in government after he was "ingloriously fired" by former President Barack Obama.
"The National Defence Strategy is [Mattis'] strategy", Shanahan said.
Shanahan did not serve in the military but since July 2017 has been the deputy defence secretary. Shanahan had worked for Boeing for 31 years, including in positions overseeing big defense programs.
With Shanahan moving up from deputy secretary to acting secretary, the Pentagon's budget chief, David Norquist, has been chosen to fill in temporarily as the deputy secretary, according to Pentagon spokesman Tom Crosson.