Johnny Cash performs for servicemembers at Rhein-Main Air Base, West Germany, in 1958. It was one of two shows he played at NCO clubs on the base that night. Cash served in the U.S. Air Force and was stationed at Landsberg Air Force Base from 1951 to 1954.

LANDSBERG, Germany — Many famous musicians have served in the armed forces, but it’s unlikely that any assignment to Europe influenced the history of rock ’n’ roll and country music as much as when Johnny Cash learned to play the guitar here.

At 19, Cash volunteered to join the Air Force during the Korean War. He left his native Arkansas for Texas to begin training, then spent most of his time in service stationed in Landsberg am Lech, in southern Bavaria, working as a Morse code interceptor.

The base at Landsberg, Germany, was the scene of heavy U.S. military activity in the decade following Word War II and was maintained into the 1980s. It is now a German air force base.

In 1951, unable to travel, away from friends and family and with only one phone call home allowed per year, the young Cash felt lonely and isolated from the world when he arrived in Landsberg, he would later say.

On the third day, when Cash saw the documentary “Inside Folsom Prison” at the base theater, the film had a big impact on him and the music world. Afterward, he wrote the hit song “Folsom Prison Blues,” according to letters he sent back to his first wife, Vivian Liberto.

“He (Johnny Cash) was here against his will, with no friends, not able to leave. So when he saw this film, it struck him that ‘they are like me. We are all prisoners here,’ and it left an impression on him that stuck with him his whole life,” base historian Herbert Wintersohl said. “It was a very influential period of his life.”

As a radio interceptor, Cash worked in shifts and had a lot of time with not much to do, Wintersohl said. Thankfully for music, Cash bought a guitar in a local store off base and began learning to play. Cash eventually started his first band on base, called the “Landsberg Barbarians,” a play on the name of the base newspaper, the “Landsberg Bavarian.”

He played at events that would routinely pack the local officer club, Wintersohl said.

During his three years in Germany, Cash worked on many songs that would later become famous. He also met an airman who referred to his service-issued footwear as “blue suede shoes.” He suggested while on tour in 1955 with Carl Perkins and Elvis Presley that the description would make a good song.

When he was done with his Air Force tour in 1954, Cash returned to the United States and began the career that would have a lasting effect on both rock ’n’ roll and country music.

“Although he was only here (in Germany) for three years, it had a huge impact on who he became and, of course, the music that he became famous for,” Wintersohl said.

egnash.martin@stripes.com

Twitter: @Marty_Stripes