Jason Jordan Segel (/ˈsiːɡəl/; born January 18, 1980) is an American actor, comedian, author, and screenwriter.He is known for his role as Marshall Eriksen in the CBS sitcom How I Met Your Mother, as well as for his work with producer Judd Apatow on the television series Freaks and Geeks and Undeclared.Segel has also starred in several films, including Forgetting Sarah Marshall (2008), I Love You, Man (2009), Despicable Me (2010), Jeff, Who Lives at Home (2011), The Muppets (2011), The Five-Year Engagement (2012), Sex Tape (2014) and The End of the Tour (2015) as the late author David Foster Wallace.