Maybe he is a mentally ill man who just decided to go around stabbing people.
However, the Islamic State issued this call in September 2014:
So O muwahhid, do not let this battle pass you by wherever you may be. You must strike the soldiers, patrons, and troops of the tawaghit. Strike their police, security, and intelligence members, as well as their treacherous agents. Destroy their beds. Embitter their lives for them and busy them with themselves. If you can kill a disbelieving American or European — especially the spiteful and filthy French — or an Australian, or a Canadian, or any other disbeliever from the disbelievers waging war, including the citizens of the countries that entered into a coalition against the Islamic State, then rely upon Allah, and kill him in any manner or way however it may be….If you are not able to find an IED or a bullet, then single out the disbelieving American, Frenchman, or any of their allies. Smash his head with a rock, or slaughter him with a knife, or run him over with your car, or throw him down from a high place, or choke him, or poison him….
And he stabbed both his victims in the neck. “When you meet the unbelievers, strike the necks…” (Qur’an 47:4)
“Two passengers in train attacked with folding knife,” translated from “Zwei Fahrgäste in Zug mit Klappmesser attackiert,” Krone, December 25, 2018 (thanks to Searchlight Germany):
Knife attack on Christmas Eve in a train in Lower Austria: A 26-year-old – probably mentally ill – man suddenly attacked two passengers and hurt them by the neck. The accused was arrested on the train at the train station in St. Valentin.
As police spokesman Heinz Holub said on Christmas Day, the 26-year-old initially attacked a 46-year-old Kremser without warning with a folding knife on his neck. Then he followed an 18-year-old Viennese on the train and also inflicted a bleeding wound on his neck. Both passengers had to be treated as outpatients at UKH Linz….