This school is No. 2 for graduating CEOs—and it's not Harvard, MIT or Wharton

The No. 1 behavior that transforms ordinary people into successful CEOs

While prestigious private schools like MIT, Harvard and Wharton remain popular options among America's future executives, Pennsylvania State University is actually the No. 2 institution in the country for graduating CEOs, LinkedIn finds.

Some of Penn State's most notable alumni include leaders of Fortune 500 companies like Nike CEO Mark Parker, Merck CEO Kenneth Frazier and PPL's William Spence, as well as Hanesbrands chairman and former CEO Richard Noll.

To better understand how business leaders got where they are today, LinkedIn looked at the profiles of over 12,000 chief executives from 20 countries, tracked where they had gotten their undergraduate and/or graduate degrees and then compiled a list of the most-attended institutions. The only other public school besides Penn State to make the top 10 is the University of California, Berkeley.

Penn State, which has more than 41,000 enrolled students, is ranked the No. 52 best university in America by U.S. News for its robust undergraduate and graduate programs.

It has been recognized elsewhere as one of the top 10 universities in the country for producing Fortune 500 CEOs, including Baker Hughes CEO Martin Craighead and CH2M CEO Jacqueline Hinman. And one of Penn State's richest alums, Terrence Pegula, who is worth $4.3 billion, owns the Buffalo Sabres and the Buffalo Bills.

LinkedIn also finds that, by far, the most popular field of study for CEOs was computer science. While "the most common starting place for these CEOs was a consulting job," numerous CEOs began as software engineers, too.

"One thing is for sure, millennials are interested in moving up," director of insights for LinkedIn Talent Solutions Sarah O'Brien tells CNBC Make It. "By looking at the path of leaders at some of the top companies globally, [this analysis] can help provide insights into what moves they should consider taking now to get there in the future."

To help you choose a career you can thrive in for years to come, check out the 10 best and worst jobs for the future.

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss:

The trick Equinox CEO Niki Leondakis uses to get men to listen to her