An optimization procedure for multistep temperature-programmed capillary gas chromatography was developed for the analysis of basil essential oil. The current study was planned after performing the following three steps: a preliminary chromatographic study, primary parameter screening, and final method optimization by using 23 factorial and Doehlert designs (DOE). The optimized conditions were obtained by using a split ratio of
1
/
2
, a gas flow rate of 1.3 mL/min, and a heating rate of 2°C/min. This set of conditions was later used for the optimization of the final method. The optimal experimental conditions were subsequently obtained by response surface optimization (isotherm duration = 6.2 min and slope = 1.06°C/min). The compositions of essential oils from six varieties of basil (Ocimum B. (1), Ocimum B. purpurescens opal (2), Ocimum B. minimum (3), Ocimum. B. cinnamon (4), Ocimum B. (marcellas) (5), and Ocimum B. Citriodora (6)) grown in four regions of Algeria (Ouargla, south of Algeria (O); Mostaganem, west of Algeria (M); Algiers, north of Algeria (A), and Constantine, east of Algeria (C)) were determined. A statistical study was performed based on hierarchical ascending classification and principal component analysis to elucidate the relationships between the basil varieties, their region of growth, and their essential oil composition. In addition to identifying several chemotypes, such as linalool, linalool/eugenol, linalool acetate, methyl eugenol, methyl chavicol, eugenol, methyl cinnamate E, and geraniol, a new compound, namely, octadecenamide (Z) (oleamide), was detected in the essential oil of Ocimum basilicum L. from Algiers (A1).