Former U.S. President Barack Obama speaks during a campaign rally for Richard Cordray, Democratic nominee for governor of Ohio, in Cleveland, Ohio, U.S., on Thursday, Sept. 13, 2018.

President Barack Obama said on Thursday that technology has brought about greater inequality and made the public more divided, despite its potential.

The remarks reflect wider concerns about how central technology has become to modern life. Top technology companies such as Facebook, which runs platforms including Instagram and WhatsApp, and Google, which operates YouTube, now face antitrust scrutiny and regular criticism.

"If you follow one rabbit hole on YouTube," Obama told Salesforce CEO Marc Benioff at Salesforce's Dreamforce conference in San Francisco, the world can look different than if you were to go down another one. "Part of what happens is that people don't know what's true and what's not, and what to believe and what not to believe," Obama said.

"That's part of why we're having so much trouble in our political culture," he said. "But it's not just affecting politics. We are siloing ourselves off from each other in ways that are dangerous."

People who watch Fox News live in a different reality than those who read The New York Times, Obama said. He contrasted the current environment with that of his youth, when there were three television stations and people who watched the same shows would have common ground.

Obama said technology has led to considerable creation of wealth.

"How do we modulate that, so every kid has a good school, and nobody is homeless on the streets, and those that have been lucky are giving back in a serious way to pave the path for the next generation of success?" he said.

"We have not adjusted our social institutions to make sure we benefit from this huge rise in productivity that comes from technology."

Today's culture, accelerated by technology and social media, leads to the pursuit of the wrong things, Obama said.

"So much of the anger and frustration that is taking place right now has to be issues of status and, you know, 'I wanna be up here, let me put other people down there.'"

Benioff said that's why Salesforce has people teaching mindfulness.

"Makes a difference," Obama said.

WATCH: President Obama warns against information bias on the internet