High Court judge Justice Siti Mariah sentenced corporal Mohd Azidi Said after he admitted to the charge.
He wascharged with possessing a cellphone containing an image of the Islamic State (IS) flag.
Earlier in mitigation, Azadisaid he was influenced by the terrorist group's ideology. The soldier had been working with army for more than eight years.
While passing the judgement, Mariah said the court viewed it as a serious offence and had also considered several other factors, including Azidi being a first-time offender and his guilty plea.
Several army personnel have been charged with committing offences related to the IS, said Wan Shaharuddin Wan Ladin, Deputy public prosecutor.
