Pheromones regulate male social behaviors in Drosophila, but the identities and behavioral role(s) of these chemosensory signals, and how they interact, are incompletely understood. We found that (z)-7-tricosene, a male-enriched cuticular hydrocarbon that was previously shown to inhibit male-male courtship, was essential for normal levels of aggression. The mechanisms by which (z)-7-tricosene induced aggression and suppressed courtship were independent, but both required the gustatory receptor Gr32a. Sensitivity to (z)-7-tricosene was required for the aggression-promoting effect of 11-cis-vaccenyl acetate (cVA), an olfactory pheromone, but (z)-7-tricosene sensitivity was independent of cVA. (z)-7-tricosene and cVA therefore regulate aggression in a hierarchical manner. Furthermore, the increased courtship caused by depletion of male cuticular hydrocarbons was suppressed by a mutation in the olfactory receptor Or47b. Thus, male social behaviors are controlled by gustatory pheromones that promote aggression and suppress courtship, and whose influences are dominant to olfactory pheromones that enhance these behaviors.