Many people are looking at his past and public statements for clues about how he will shape one of the world's most influential public platforms.

Growing up as a white person under the racist apartheid system in South Africa may have shaped Mr. Musk, but he has not talked much about it in public.

White kids were insulated from the harsh reality of it, according to Mr. Musk's graduate from the school.

Interviews with relatives and former classmates show that the upbringing of a child in a white community was filled with anti-Black government propaganda and detached from the atrocities that white political leaders inflicted on the Black majority.

Mr. Musk grew up in the economic hub of Johannesburg, as well as the executive capital of Pretoria and the coastal city of Durban. His suburbs were mostly covered in misinformation. The national anthem and an image of the national flag were displayed on the screen as the nightly news bulletin ended with the names of white young men who were killed fighting for the government.

We were not clued in as white South African teenagers. Melanie Cheary was a classmate of Mr. Musk at Bryanston High School in the northern suburbs of South Africa, where Black people were rarely seen other than in service of white families.

Mr. Musk has been a critic of the platform for removing posts and banning users. Eusebius McKaiser, a political and legal analyst in South Africa, said that he would not have had to suffer the consequences of misinformation if he were a white South African.

After graduating from high school in South Africa, Mr. Musk went to college in Canada. He didn't reply to emails about his childhood.

He was described by his classmates at two high schools as a lonely man. He didn't give any recollections of things he said or did that revealed his views on politics of the time.

ImagePretoria Boys High School, from which Elon Musk graduated, leaving soon after to attend college in Canada.
Pretoria Boys High School, from which Elon Musk graduated, leaving soon after to attend college in Canada.Credit...Joao Silva/The New York Times

Errol Musk said in an interview with The New York Times that his son, brother and sister were aware that there was something wrong with the system when they were young. Errol, who was elected to the City Council in 1972, said they would ask him about the laws prohibiting Black people from patronizing restaurants, movie theaters and beaches. He said that they had to make calculations when they were out with nonwhite friends.

Being sheltered from it is nonsense. Errol said he belonged to the anti-apartheid Progressive Party. He said that they didn't like it.

Errol gave a description of their lives that showed how removed they were from the country's violent reality. He said that his children had a good relationship with their domestic staff and that life in South Africa during apartheid was mostly better and safer than it is now.

According to a biography of Mr. Musk, he did not want to serve in the military in South Africa because he would have been involved in the apartheid regime.

The difference between those who spoke English and those who spoke Afrikaans was created by the apartheid system. Ms. Cheary said that English-speaking white South Africans enjoyed wealth that felt to some like a birthright.

She said that they were the white, English-speaking elite of the world.

There was a socially progressive aspect to the boys. Some students traveled to anti-apartheid gatherings because the school's headmaster participated in freedom struggle activities.

If you didn't adopt them, Mr. Beney said, you were exposed to progressive ideas.

The Black children who were fighting for basic rights in township schools were beaten and shot by state security forces. Mr. Beney said that many students bought into government propaganda.

Terence Beney, who graduated with Mr. Musk from Pretoria Boys High, in a hallway of the school. Credit...Joao Silva/The New York Times

He recalled a debate in one of his classes in the 1980's about the government's requirement that they serve in the military, squashing efforts by Black South Africans to defeat an oppressive regime.

Some people said they wouldn't kill for an unjust political system. The country was in an all-out war, according to others. Some people said the fight was to protect against communists. Others argued that Black people were vulnerable to bad ideas.

Mr. Beney said that Black people could not be trusted with the right to vote because they had no tradition of democracy.

Black people were forced to live in certain areas. Stanley Netshituka, who became the first black student at the school in 1981, said that the country was made up of many tribes with some opting for independence in their own homelands.

Mr. Netshituka said he had friends who understood how bad things were for black people in South Africa. He said they were the exception.

The majority were ignorant and happy to be, according to Mr. Netshituka, who was allowed to attend the school because his father was a diplomat.

He recalled that classmates would call Black freedom fighters terrorists but tell him that he was not bad.

Mr. Musk became friends with a cousin of Mr. Netshituka. Mr. Musk chided the student for using the anti-Black slur, but the student got bullied for doing so.

Card 1 of 6

Mr. Musk was one of the few white people who attended the funeral of Mr. Mashudu.

He said that it was rare during that time.

Stanley Netshituka, the first black student at Pretoria Boys High School, at his home in his home in Midrand, South Africa. His son Masas (background photo, right) also attended the school. Credit...Joao Silva/The New York Times

Errol Musk, who worked as an engineer, said that his family did not buy into the negative propaganda about freedom fighters, some of whom had to resort to violent sabotage to combat a regime that stripped them of political rights and freedoms like choosing where to live.

He said that they were concerned about a bomb being placed next to their house.

Errol Musk said that he believed his son had learned not to discriminate. The electric car company has faced accusations of racism. The company is being investigated by the state of California for allegedly allowing racial discrimination against Black employees. A jury found last year that the company had failed to address the racism he faced at work, and ordered them to pay 15 million dollars to him.

The life of Musk in South Africa was traumatic and unfulfilling. His parents divorced when he was 10 years old. He moved with his mother to the south coast of the country, but then returned to live with his father in the capital. Mr. Musk said they had a tense relationship.

The first two years of the South African high school curriculum were rough for Mr. Musk.

Elon Musk (front row, far left) was a member of the chess A team at Bryanston High School in 1985. Credit...Bryanston High School Yearbook

If Bryanston High was traumatic for Mr. Musk, he found more stability at the Afrikaans school, called Pretoria Boys, which has a forest of evergreens, a pond and English-revival buildings.

Some students lived on campus while others commuted from home.

The culture had a fear of apartheid. There was a cadet program at many schools of that era. They wore brown uniforms and did marching drills. There was a band.

Mr. Beney said that Mr. Musk's current views on free speech are similar to those of the English philosopher John Stuart Mill.

Mr. Beney said that Mr. Musk's ideas about free speech are liberal.

People should not discount the evolution Mr. Musk could have gone through after he left South Africa. Andrew was in German class with Mr. Musk at Bryanston High.

He never saw the suffering of the Black people when he was a white student. He did his military service and that changed.

At some point, people realize that they've been fed a lot of stuff.

Mr. Musk in Chicago in 2018.Credit... Joshua Lott/Getty Images

Kitty Bennett was involved in research.