The only nuts that are not classed as tree nuts are peanuts, which are actually legumes.
Raw nuts can be kept at room temperature for short periods of time (a few days or weeks) providing they are kept in an airtight container away from direct sunlight (in cold climates this time will extend to 3-6 months). Roasted nuts have a longer shelf life at room temperature than raw nuts. Ideally all nuts should be refrigerated in an airtight container to extend freshness.
Yes, nuts can go ‘bad’. They contain natural oils that can go rancid if nuts aren’t stored correctly or are past their use-by date. Nuts are sensitive to heat and air and can quickly become stale if not stored in an airtight container away from direct sunlight. Refrigeration is recommended in warm climates or for longer term storage.
All nuts are naturally gluten free. However, as always, there is a possibility of cross-contamination depending on processing and storage conditions.