Across the U.S., high schools and universities shut their doors and shifted classes online this semester to comply with social distancing measures to combat the coronavirus pandemic. As a result, in-person graduation ceremonies were canceled.
But many schools are still celebrating online. To make up for the loss of live commencements, celebrities like Ryan Reynolds and business leaders like Apple CEO Tim Cook joined online graduation ceremonies to offer words of wisdom and hope to the class of 2020.
Below, CNBC Make It rounded up advice by celebrities, athletes and business leaders given to this year's graduates.
Students from Kitsilano Secondary School in Vancouver received a commencement speech by a former student: "Deadpool" star Ryan Reynolds.
The actor told students in a pre-recorded video to practice compassion every day, especially for others.
"Empathy has got me so much more, so much farther in not only my life, but in my career," said Reynolds. For him, "the most radical act of ambition you can ever demonstrate" is being able to empathize and validate someone else's experience.
It is something he has worked on his whole life, Reynolds said. "It has allowed me to fully accept and provide love," he continued. "It has helped me recognize mistakes that I made and learn from them, and above all, made me happy."
Apple CEO Tim Cook reminded graduates of Ohio State University that they are not the sole authors of their stories. He said students must share credit with a "difficult and selfish collaborator" — their circumstances.
When their hopes and dreams are scrambled, graduates have a choice, said Cook. They can either "curse the loss of something that was never going to be," or be grateful and embrace a "remade world."
"Think anew, act anew," said Cook. "Build a better future than the one you thought was certain, and in a fearful time, call us once again to hope."
For his Some Good News show on YouTube, actor and director John Krasinski enlisted fellow celebrities to surprise graduates with one-on-one conversations. That included Oprah Winfrey, who was asked how the lowest point in her career had impacted her.
Winfrey recalled the time she was hired as a television news anchor in Baltimore alongside an older male colleague who did not want her there. A few months after landing the job, her boss informed her she was no longer needed and demoted her to a local talk show.
Although it felt like a blow to her career at the time, Winfrey used it as a learning opportunity. "I believe that failure is an opportunity to move yourself in a different direction," she said. "It gets better because you have learned the lessons from the first time."
Also on Some Good News, a new graduate asked director Steven Spielberg how to follow their dreams when the world is not supportive.
Spielberg responded by explaining the importance of dreams: They test your determination and allow you to overcome obstacles, he said.
Although we are living in a time of huge loss, it is also a chance to dream big and imagine a better future. "When you finally hit on something that really means something to you, that is something that stays with you for the rest of your life," said Spielberg.
These difficult times are also teaching us that anything is possible and "it will be imagination and innovation that gets us all to the other side."
In the Wall Street Journal's "To the Class of 2020" series, Bill and Melinda Gates shared ways graduates can help make the world a better place.
"You can always use your voice and your vote to advance change," wrote the couple. You can insist on policies that create a healthier and better future for everyone.
Despite new worries that have risen for students and graduates, such as their families' health and future job prospects, Bill and Melinda assure them they have a role in improving the world. "You are inheriting a world that has already proven that progress is possible," they wrote.
On May 15, Facebook hosted a virtual graduation to congratulate the class of 2020. Celebrities including Selena Gomez, Oprah Winfrey and Cardi B shared advice.
Rapper Cardi B told those going on to college to choose classes that will benefit them later on. "Make sure you research careers that are around the money that you want to make in the future," she said.
She also told students to ask themselves if their desired career paths will help them pay off their college debt and allow them to live the lifestyle they want.
"It's more than a diploma," said Cardi B. "It's more than graduation. It's knowledge."
On May 16, basketball star LeBron James hosted the televised event "Graduate Together: America Honors the High School Class of 2020" for students missing out on graduation ceremonies due to the coronavirus.
For many students living in poor neighborhoods, school is the only safety net they can rely on, said James. It is the only place where they can be fed and receive support, and students shouldn't forget those who were there for them along the way, like teachers, coaches and pastors. "They, along with your friends and family, got you to this moment," he said.
Although the last thing students want to hear is to stay home, their communities need them, James said. Even if they don't stay close physically, they should take part in trying to rebuild their communities.
"Pursue every ambition, go as far as you can possibly dream and be the first generation to embrace a new responsibility," said James. "A responsibility to rebuild your community."
Soccer star Megan Rapinoe also spoke to students on "Graduate Together."
"These moments can feel powerless, purposeless and overwhelming," said Rapinoe. "The cliché would be for me to ask you all to come together, but we aren't together."
Instead of coming together, "I am going to ask you to demand better," she said.
Rapinoe pointed out this year's election is the first time some students can vote and urged them to do so. They shouldn't overlook the "importance of who makes decisions in times of crisis and in times of triumph."
"Take the torch and leave your mark," said Rapinoe. "Plant your stake in the ground and build your future that you want and what you believe in and fight like hell to do it."