Hereโs a list of the military presidents of Nigeria, including their years in office and the number of years they served:
1. **Major General Johnson Aguiyi-Ironsi**
- **Years in Office:** 1966 (January - July)
- **Years Served:** Less than 1 year
2. **General Yakubu Gowon**
- **Years in Office:** 1966-1975
- **Years Served:** 9 years
3. **General Murtala Mohammed**
- **Years in Office:** 1975-1976
- **Years Served:** 1 year
4. **General Olusegun Obasanjo**
- **Years in Office:** 1976-1979
- **Years Served:** 3 years
5. **Major General Muhammadu Buhari**
- **Years in Office:** 1983-1985
- **Years Served:** 2 years
6. **General Ibrahim Babangida**
- **Years in Office:** 1985-1993
- **Years Served:** 8 years
7. **Chief Ernest Shonekan** (Interim Government)
- **Years in Office:** 1993
- **Years Served:** Less than 1 year
8. **General Sani Abacha**
- **Years in Office:** 1993-1998
- **Years Served:** 5 years
9. **General Abdulsalami Abubakar**
- **Years in Office:** 1998-1999
- **Years Served:** 1 year
These military leaders played significant roles in Nigeria's political history, each influencing the country's governance during their respective tenures.