No, the ghost instructs Hamlet to seek revenge on his uncle, King Claudius, for murdering him and usurping the throne. The ghost does not mention punishing Gertrude, Hamlet's mother.
In Shakespeare's "Hamlet", The Ghost demands Hamlet kill Claudius, the brother who betrayed, murdered and stole his throne and wife. However, this murderous vengeance does not extend to his offending wife. He tells Hamlet not to seek vengeance on her and to just focus on dealing with the usurper.
Hamlet is talking to the Ghost, which Gertrude can't see, which looks bizarre to her. For the first time, Gertrude sees Hamlet as seriously mentally ill, not just disturbed. Ironically, it's Gertrude whose perceptions are faulty in this scene.
the ghost of his father
He reveals that Claudius murdered him. He doesn't tell Hamlet anything about Gertrude he didn't already know.
The Ghost of King Hamlet urges Prince Hamlet to avenge his murder by killing Claudius, who has usurped the throne. However, he instructs Hamlet not to harm Gertrude, his mother, and to leave her judgment to heaven. The Ghost emphasizes the need for Hamlet to focus solely on avenging his death without letting his actions lead to Gertrude's downfall.
Hamlet sees his father's ghost, but the ghost is invisible to Gertrude.
The ghost tells Hamlet the secret of his father's death. Hamlet's father was not killed by a serpent, but was murdered with poison. He also told hamlet that it was his uncle who murdered his father, and that he also seduced Gertrude, his mother. He orders him to revenge his murder against Claudius but to leave Gertrude alone.
The ghost's appearance to Hamlet, rather than to Gertrude, serves to emphasize Hamlet's unique burden as the avenger of his father's murder. The ghost reveals important truths about King Hamlet's death that only Hamlet can act upon. By not appearing to Gertrude, the ghost underscores her complicity and the complexity of her relationship with Claudius, while also allowing Hamlet to grapple with his own feelings of betrayal and moral obligation. This selective communication heightens the tension between duty and familial loyalty central to the play.
Gertrude. I suppose he may have told Hamlet not to take revenge on Gertrude because the ghost still has affection for her, or because it would be particularly evil for a son to kill his mother, or because the ghost knows that Gertrude was not privy to Claudius's murder, and the murder is what he wants revenge for. Or some combination of these.
The ghost warns hamlet not to do anything to his mother, but to "leave her to heaven".
The ghost of Old Hamlet warns Hamlet to not scold Gertrude. Hamlet was warned earlier "leaver her to heaven" (V v) and was warned later in the third act. The ghost warned Hamlet probably for one of two reasons, he still loved her or trying to change Gertrude would not work and who tried would go mad.
The only characters in the play Hamlet who are related to Hamlet are the ghost of his father King Hamlet, his mother Gertrude and his uncle Claudius. None of the rest are related to him.