In Maryland, Castle Doctrine isn't enshrined by law but is held by precedent and still requires "reasonable belief" of harm.
In Texas, someone entering your property illegally can be met with lethal force in most circumstances, and some property can be protected with lethal force (with more than a few caveats, including the time of day).
Lethal force is lethal force. Whether you shoot someone in a cowboy duel face to face or smack them with a lead pipe when they are unaware doesn't overwhelmingly matter (putting aside reasonable belief issues that might arise).
Also hopefully to make sure that someone doesn't put themselves into a situation where they can be legally killed by someone else. Being mindful that entering someone's home unannounced or brandishing a knife or fists to intimidate that trespasser on your back 40 could result in your death.
These requirements are from old style common law. I should have mentioned that it varies a lot from state to state and even under varying circumstances. For instance, if someone is 20 feet away from you, holding a knife and threatening to kill you, can you shoot them without going to prison?
The question is, does a "Reasonable Person" have a belief that the man holding a knife at 20 feet is able to kill you before you can react. He can't reach you right? But how long does it take a person to cover 20 feet and stab you? Could you react in time? How do you know that he could have covered the distance before you could draw your weapon? Can you beat that brandishing charge if you don't shoot?
Well if you point that gun at him and didn't know how fast that person can cover that 20 feet at the time then it isn't admissible as evidence for your legal defense to prove that a reasonable person would believe the person CAN kill you. Instead the DA will just say "He was 20 feet away!" and the jury will put you in jail because you didn't have the training or evidence that you KNEW he could cover that distance in less time than you can draw.
IMPORTANT: If you are willing to use deadly force, and arm yourself to do so, then you should be trained to do so legally. Not relying on rumors and advice of Hacker News commenters!
You're on the internet holding forth on when/how to "use deadly force, legally", eh?
Are you a lawyer?
If you are an armed citizen please seek training in how to safely and legally use your weapon. Knife, gun, batons, or even less than lethal weapons included. It could keep you out of prison.
A better thing to say before giving such advice about home defense would be to preface it with: "In a home invasion it is always better to take your family and hole up while waiting for the police rather than trying to confront the burglar."
Maybe I should just avoid commenting!
You CANNOT use lethal force to protect property. However there is a special case called Castle Doctrine where a home invader automatically meets the "WILL" condition. A reasonable person can assume that a person breaking into their home WILL kill, kidnap, or maim them. The capability part is usually satisfied as well. However this is why you can't shoot through your front door when someone is trying to break in. You have no reasonable belief that they can hurt you if there is a physical barrier between you and them.
EDIT ADDENDUM: You totally CAN shoot someone in the back if they have invaded your home and you catch them unawares. (This isn't a good idea if you can't identify them as an intruder, but legally speaking you are in the clear) However if they are fleeing they are no longer an imminent threat.