Two salt metathesis reactions are popular for laboratory scale reactions. In the Kolbe nitrile synthesis, alkyl halides undergo nucleophilic aliphatic substitution with alkali metal cyanides. Aryl nitriles are prepared in the Rosenmund-von Braun synthesis.  
In general, metal cyanides combine with alkyl halides to give a mixture of the nitrile and the isonitrile, although appropriate choice of counterion and temperature can minimize the latter.  An alkyl sulfate obviates the problem entirely, particularly in nonaqueous conditions (the Pelouze synthesis).