This is a cross-sectional analysis of data obtained in the baseline of the Longitudinal Study on the Lifestyle and Health of University Students (n 685) carried out in a public Brazilian university. Food intake was assessed using a 24-h dietary recall. Dietary patterns (DP) for breakfast, lunch and dinner were identified using principal component analysis. Generalised linear models were used to analyse the variables associated with each DP. Three DP were extracted for each meal: breakfast: ‘White bread and butter/margarine’, ‘Coffee and tea’ and ‘Sausages, whole wheat bread and cheese’; lunch: ‘Traditional’, ‘Western’ and ‘Vegetarian’ and dinner: ‘Beans, rice and processed juice’, ‘White bread and butter/margarine’ and ‘White meat, eggs and natural juice’. Students who had meals at the campus showed greater adherence to the ‘White bread and butter/margarine’ (exp (βadj) = 1·15, 95 % CI 1·11, 1·19) and ‘Coffee and tea’ (exp (βadj) = 1·06, 95 % CI 1·02, 1·10) breakfast patterns; ‘Western’ lunch pattern (exp (βadj) = 1·04, 95 % CI 1·01, 1·08) and to the ‘Beans, rice and processed juice’ dinner pattern (exp (βadj) = 1·10, 95 % CI 1·06, 1·14). Having meals at the campus was associated with lower adherence to the ‘Sausages, whole wheat bread and cheese’ breakfast pattern (exp (βadj) = 0·93, 95 % CI 0·89, 0·97), ‘Traditional’ lunch pattern (exp (βadj) = 0·96, 95 % CI 0·93, 0·99) and to the ‘White bread and butter/margarine’ (exp (βadj) = 0·96, 95 % CI 0·93, 0·99) and ‘White meat, eggs and natural juice’ (exp (βadj) = 0·96, 95 % CI 0·93, 0·99) dinner pattern. The food environment at campus may influence students’ DP. Recognising meal eating patterns is important to support healthy eating promotion strategies on campus. Adjustments in the University Canteen menu could contribute to healthier eating choices among students.