By being armed themselves, by taking all precautions possible to prevent armed thugs from taking them by surprise, by having themselves mentally and physically prepared to fight back with their bare hands if necessary, and by be adamant about not being a victim.
I'm fortunate in that I'm much larger (6-3, 260) and stronger than most people, but I don't take it for granted. The surest way to be attacked, whether as a person or a nation, is to relax and think you're so strong no one in their right mind will take you on. Someone always will. Therefore, you have to be of the mindset that you'd rather die than be victimized. You have to be tough, and unfortunately most Americans these days are not even close.
Scouts Out! Cavalry Ho!