We found that O-linked α1,2 mannosylation of Bl-Eng2 is chiefly recognized by Dectin-2 and augments the expansion, differentiation, tissue residency of Ag-specific CD4+ and CD8+ T cells in the lung and protects mice against fungal and viral infection. Here, CD4 is linked to viral infectious disease.