Is Hamlet surprised when the ghost asks him to revenge his father's murder? Is he surprised when he knows who the murderer is?
Yes, on both accounts. In Shakespeare's Hamlet, Hamlet is deeply troubled by his father's unexpected death, his mother's hasty remarriage to his uncle (seen as incestuous), and, presumably, the loss of the throne. But there is no evidence that Hamlet suspects his father was murdered.
When the Ghost first mentions revenge, Hamlet, known for his profound speeches, responds:
What? (Act 1.5.8)
When the Ghost continues:
Revenge his foul and most unnatural murder.
Hamlet, still shocked, responds:
Murder! (Act 1.5.26)
When the Ghost repeats himself, Hamlet pleads for an explanation:
Haste me to know't, that I, with wings as swift
As meditation or the thoughts of love,
May sweep to my revenge. (Act 1.5.29-31)
And when the Ghost reveals the identity of the murderer to be Claudius, Hamlet seems genuinely surprised:
O my prophetic soul!
We have to assume that if not for the Ghost, Claudius would have gotten away with murder. Hamlet had no idea.
I rarely disagree with dstuva, but in this case, I do. I do think Hamlet had some vague suspicions but no proof that Claudius was his father's murderer. When the Ghost tells him that Claudius was his murderer, Hamlet reacts with "O my prophetic soul!" The word "prophetic" here is important. It means that Hamlet had predicted or suspected such a crime, and the Ghost was confirming what he had suspected.