Gedi studied at Jamal Abdul Nasser High School in Mogadishu, graduating in 1972. He completed military training and national service, and taught in the early 1970s. At university, Gedi excelled in his studies, and went on to the University of Pisa. He graduated in 1978, and was subsequently employed by the Somali National University (Faculty of Veterinary Medicine) as an assistant lecturer. From 1980 to 1983, he studied at the University of Pisa for postgraduate studies and obtained a Doctorate Degree in Veterinary Pathology and Surgery. He then returned to teaching in 1983 as a lecturer and headed the department until 1990.