To add a little more confusion, there are two words in Catalan for it. The map says "Pistatxo", which is not wrong, but the synonym I and many people around me use is "festuc", which coincidentally starts with F, so there goes your political border theory.. or not!
In Turkish, when you say "fıstık" alone, people would understand peanuts as well. However peanut is "yer fıstığı" while pistachio is "Antep fıstığı" or for the pink ones "Siirt fıstığı".
Probably it got on the red side because it is a "compound" word шамфъстък where the second part (фъстък) is similar to the languages of the eastern part.
Yeah definitely that. In Turkish, for example, the actual world is Şam Fıstığı ("Fıstık" as root), with literal translation would be "Damascus Peanut").
The origin seems to be Persian (from where the plant comes actually as many other fruits) from which the word entered as a loan to ancient Greek (πιστάκιον) and later Latin (pistācium).
Interestingly enough from middle Persian "pstk'" the initial sound became aspirated (like the "Farsi" name itself for the modern language from Middle Persian "Pārsīk").
And by Turkish/Ottoman domination the f- variant spread in the Middle East.
A lot of fruits, trees and nuts come from Persia... the name of the "peach" in some European languages is closely related to it, for example English "peach" from old French "pesche" is a contraction of medieval latin "persica", cfr Romanian "piersică", Italian "pesca" (and in some Italian dialects it's called "persica"/"persego") and similar variations.
Relevant detail: Ottoman Turkish ⟨فستق⟩ fıstık borrowed it from Arabic ⟨فُسْتُق⟩ fustuq, that borrowed it from Middle Persian - the same variety as Greek and then Latin did. So odds are that the f-variation was caused by Arabic rendering a foreign [p] as [f], and probably predates Persian itself internally undergoing a p→f shift. Source.
The root word is Persian. Middle Persian to be exact. pistakē.
Pistachios are native to Iran, parts of Afghanistan, and a spattering of other middle eastern countries.
Commercial production mostly came out of Iran until the 1970s, when changes to the US tax code made growing for production favorable, then the Iranian Revolution hit and US production took off.