Great question! Some people are allergic to many kinds of tree nuts, but some people only react to one or two kinds. Tree nuts include the nuts you mention, as well as others like cashews, Brazil nuts, and pine nuts, to name a few. Some tree nuts are botanically similar, such as pistachios and cashews, and walnuts and pecans, for example, while others are not.
Many doctors suggest patients who are allergic to one type of tree nut to avoid them all, for a few reasons. First, a person who is allergic to one type of tree nut has a higher chance of being allergic to other types of nuts, too. Also, when nuts are used in the factories where food is made, there is a high likelihood of cross-contact between different kinds of tree nuts.
Doctors can do tests for all types of tree nuts to help decide whether or not someone who is allergic to one type of tree nut should avoid all tree nuts, or just a few. If needed, oral food challenges (in which tiny amounts of an allergen are eaten under a doctor's supervision to find out whether someone is allergic) can be performed in an allergist's office to help determine if certain tree nuts can be safely ingested or not. Discuss this with your allergist.
I hope this clears up your confusion!
The information above is not designed to take the place of a doctor’s instructions. Patients are urged to contact a doctor for specific information regarding guidelines for care.