There are hints that he served in Rohan1
On the road to Helm's Deep while having dinner with Éowyn, she mentions something Théoden had told her:
My uncle told me a strange thing. He
said that you rode to war with Thengel,
my grandfather. But he must be mistaken.
King Théoden has a good memory. He was
only a small child at the time.
It's only hinted at, but I think yes.
In addition to Edlothiad's answer, Aragorn tells Boromir he's seen Minas Tirith "long ago."
Boromir: I will find no rest here. I heard her voice inside my head. She spoke of my father and the fall of Gondor. She said to me “Even now there is hope left.” But I cannot see it. It is long since we had any hope. My ...
Regarding "sea longing":
As noted in another answer, the "sea longing" is actually a longing for Valinor, which simply put is "paradise". When elves first appeared in Middle-Earth, they were invited by Valar ("the gods") to come live with them in Valinor.
Those elves who accepted and started the journey to Valinor are ...