Sensing their environment is a crucial ability of all life forms. In higher eukaryotes the sensing of airborne volatile compounds, or olfaction, is well developed. In plants, slime moulds and yeast there is also compelling evidence that these organisms can smell their environment and respond accordingly. Here we show that bacteria are also capable of olfaction. Bacillus licheniformis was able to sense airborne volatile metabolites produced by neighbouring bacterial cultures and cells could respond to this chemical information in a coordinated way. When Bacillus licheniformis was grown in a microtitre plate adjacent to a bacterial culture of the same or a different species, growing in complex medium, biofilm formation and pigment production were elicited by volatile molecules. A weaker response occurred in increasingly distant wells. The emitted volatile molecule was identified as ammonia. These data demonstrate that B. licheniformis has evolved the ability collect information about its environment from the surrounding air and physiologically respond to it in a manner similar to olfaction. This is the first time that a behavioural response triggered by odorant molecules received through the gas phase is described in bacteria.