Samuel Jinks, 18, of Partridge Green in Alton, pleaded guilty to actual bodily harm and possession of a bladed article.
Jinks was also sentenced to nine months for threatening another with a bladed article, and one month for possession of a bladed article, both to run concurrently.
This follows an incident on 24 April 2021, when an argument between Jinks and the victim resulted in Jinks stabbing the victim in an alleyway between Partridge Green and Yellowhammers.
The victim was treated at hospital for a puncture wound to his abdomen. He has since made a full recovery.
Jinks was arrested in the early hours of 25 April.
Following the sentence hearing, Detective Constable Peter Watson said: “This is an act of violence that could have had more severe consequences.
“Jinks was arrested very soon after committing this offence, and I hope this offers reassurance to the community that he has been brought to justice.
“Alton is a safe place to live and work, but we do not rest on our laurels and will work hard to detect and prevent such high harm offences.