Take a small quantity of salt X in a test tube and add dil. H2SO4.The rotten egg smelling gas Y is evolved. The anion contains in the salt is:
S2-
Metallic sulphides react with dil. sulphuric acid to form respective salt and hydrogen sulphide gas is evolved. The gas is colourless having a foul smell of rotten eggs and it turns moist litmus paper red.
FeS+H2SO4→FeSO4+H2S
So, salt X contains S2−ion.