After I shut the door and started back to the living room, he yelled something at me, but I couldn't exactly hear him. I'm pretty sure he yelled "Good luck!" at me. I hope not. I hope to hell not. I'd never yell "Good luck!" at anybody. It sounds terrible, when you think about it.
It's a phony thing to say. It's so empty, so overused that it means nothing. It's like his mom sending his ice skates as a gift. It's like the glad-handing head of the school greeting all the parents. It's like having someone else write a composition about your room for you. It's superficial. There's no thought behind it.
It is also sarcastic. Holden, though quite sarcastic himself, hates people who are insincere. Remember, he yells something similarly sarcastic when he leaves Pency at the end of chapter 7: "Sleep tight, ya morons!" So, "good luck" forshadows his departure from the school, which Holden would agree, is an omen of upcoming "bad luck" episodes.
As a funny side note, there's song by The Contingency Plan called "I am Holden Caufield" which borrows from Albert Kings's "Born Under a Bad Sign" lyrics:
A girl might build me up
But then I'd take a fall
Cause if it weren't for bad luck
I'd have no luck at all
Pretend I'm what I'm not
Packing heat to make me tough
Will I ever get a shot
To do what I love
At the end of Chapter Two of J.D. Salinger's The Catcher in the Rye, Holden Caufield is leaving the home of his favorite former teacher, Mr. Spencer, when he is certain he hears the ailing old man shout toward him, "Good luck." While most would accept such a platitudinous send-off in the spirit in which it was given, Holden, the alienated, aimless teenager, resents the implication, declaring, "I'd never yell 'Good Luck!' at anybody. It sound terrible when you think about it."
Holden Caufield is the quintessential model of alienated youth, emotionally distant and intellectually stultified. He has little good to say about most of those with whom he has crossed paths, and has become the personification of ironic detachment. For an individual so jaded, a platitude like "good luck" carries little or no positive connotation. In fact, to Holden, when hearing it directed at him the phrase is insulting, because it implies that the recipient of "good luck" is borderline pathetic. This is why, later, at the end of Chapter Twenty-Five, the phrase again fills Holden with dread. Having paid a visit to his sister Phoebe's school, he leaves only to hear the elderly assistant to the principal of the school deliver that same bromide:
She yelled 'Good Luck!" at me the same way old Spencer did when I left Pencey. God, how I hate it when somebody yells 'Good Luck!' at me when I'm leaving somewhere. It's depressing.
Holden hates the phrase because it suggests that he needs a reversal of fortune, an ironic sentiment given that he does, indeed, require a different path than the one he is on.