KISSIMMEE, Fla. -- Chris Johnson made a strong opening impression in his bid to win the Astros' starting third-base job by hitting a two-run homer in the fourth inning off left-hander Ross Detwiler to lead Houston to a 3-1 win over the Nationals in the Grapefruit League opener for both teams Saturday at Osceola County Stadium.

Livan Hernandez, making his first appearance in an Astros uniform, threw two scoreless innings against his former team. Hernandez allowed three hits and struck out two batters while throwing 22 of his 33 pitches for strikes, and then threw 15 more pitches in the bullpen.

"It's tough the first time you're pitching," he said. "Sometimes you're all over the place, but today was very good. I can't complain."

Hernandez spent seven years with the Nationals, including the previous three seasons.

"I faced a lot of my friends, and Mike Morse last night was sending me text messages saying, 'I'm coming. You better be ready,'" Hernandez said. "It's nice to hear from friends and it's tough to face them, but everybody has to do their job."

Edwin Jackson made his debut for the Nationals, allowing one hit and two walks in two scoreless innings. He signed with Washington after going 12-9 with a 3.79 ERA last season between the White Sox and Cardinals.

The Nationals got a run off Brett Myers in the fifth inning on back-to-back doubles by Roger Bernadina and Jesus Flores. Myers, who has been in the Astros' rotation the past two years, was moved into the closer role last week.

Catcher Jason Castro, who tore up his right knee in a Spring Training game a year ago and missed the entire season, made his return for the Astros and was 0-for-1 and threw out a runner attempting to steal in his three innings of work.

Nationals up next: Right-hander Stephen Strasburg is expected to throw 40-45 pitches for the Nationals on Sunday at home against the Astros. First pitch is at 1:05 p.m. ET on MLB.TV. After recovering from Tommy John surgery, Strasburg will be on an innings limit during the regular season. He is expected to throw 160 innings.