LOS ANGELES — Joel McHale is going from “Soup” to nuts.

After more than a decade of sniping at the worst reality TV has to offer with the clips show “The Soup,” McHale’s now starring in a new CBS comedy “The Great Indoors.” He plays a journalist who’s spent his life in the wilderness writing for an outdoor magazine. He thinks the world has gone nuts when he becomes the desk-bound boss to a group of millennials in the digital department of the publication.

Instead of dealing with killer bears, poisonous snakes, deadly plants and dangerous locations, the writer faces his most terrifying challenge — working with millennials whose idea of roughing it is worrying about charging their cellphone.

Executive producer Mike Gibbons describes the show as a Gen-Xer re-entering the workplace and finding the workplace is unrecognizable to him. And, he’s unrecognizable to the young staff members.

The office millennials will fuel a lot of the comedy, but it’s not going to be a one-sided attack.

Gibbons says: “The millennial generation are very smart, and we have that in the show in spades. And it’s just they have a voice, and it’s great. But they also have an inability to resist, like, taking four photos of themselves every day. So if something is about them, they will come. And also, it really is an equal fight in this workplace. I mean, it was born out of me feeling so out of place and all the faults that kind of the Gen X generation has in the workplace.”

McHale feels very comfortable playing the Gen Xer because he’s part of that generation.

“When I look at the top 10 tunes on iTunes, and I can name one of the artists, I feel great about myself,” McHale says at a CBS party. “I buy a lot of technology, and I understand about 30 percent of it. I can relate to the character very well.”

The interplay is one of the things McHale likes about the show. Not only does he get to work with some strong young comedy talents, but at the same time, veteran comedian Stephen Fry is part of the cast. A lot of the humor will come from the three generations trying to work together.

This formula is not that different than the one used in McHale’s last network comedy series, “Community,” that had talented young actors and veteran Chevy Chase.

TV PREVIEW

“The Great Indoors”

8:30 p.m. Thursday, Oct. 27, CBS