So much depends on the bear and the location of the encounter. My experiences, going back to 1974, all with black bears in the Sierra, break down into two general categories: Habituated bears, along the JMT, and unhabituated bears in far more less frequented areas. My first experience with a habituated bear was a yearling on his own for the first time. I was also on my first real Sierra backpacking trip, 17 days in the Upper Kern Basin, and pretty much clueless about dealing with bears. At the end of our second day we were totally beat and set up camp at Wright Creek, right at timberline, 11,200′. It was dusk and I decided it was more important to set up the tent and cook dinner than to hang our food, “reasoning” that there wouldn’t be any bears that high. Sure enough, in the middle of the night I heard a sickening rrriiiiippp and bolted out of the tent to find a yearling bear extracting a packet of food from the bottom compartment of my pack. I banged on a pan, threw a couple of rocks, and bellowed at the top of my lungs. To my relief he bolted, but not before he had snarfed down my prized Syrian apricot paste. Fortunately, that was not essential to the trip,and we went on to have a glorious time. My second experience with a habituated bear was at Vidette Meadows 5 years later. This time I came prepared, and was carrying a goodly quantity of firecrackers, the kind that come woven into a packet/string. I had undone one of the packets so that I had about 20 or so of them loose in a baggie and ready to go, along with an intact string. This time I hung my food. In the middle of the night I heard the food bag hit the ground with a “THUD”. I bolted out of the tent with my firecrackers, a Bic lighter, and my flashlight gripped between my teeth to confront a very large bear who was lying down with my food bag cradled between his front paws. I lit a firecracker and tossed it at his feet from about 20′ away. The flash bang surprised him, and I followed with several more in quick succession, as he got to his feet and then began to back away. Finally, I had advanced to the food bag and he was pacing back and forth about 30 or so feet away, growling and weaving his head back and forth. It was pretty clear he was getting ready to rip me a new one, so, in desperation, I pulled the intact string of firecrackers out of my baggie, lit it, and flung it at him. The continuous series of flash bangs spooked him, and he backed off a hundred feet or so. I yelled to my buddy to get a fire started, and that was how it ended. We spelled each other keeping the fire going until dawn, and he eventually left. I hope never to repeat that experience, because it clearly could have ended otherwise. That was my last encounter with a habituated bear. I learned a couple of important things from those two incidents: Be careful about packing odiferous foods like chocolate or sweetened fruit, both of which the second bear extracted from my trail mix bag, leaving the main part of my food intact, thereby saving the trip, as was the case with the first bear; Avoid popular areas, where habituated bears are a given. Later, I also decided to avoid sleeping in the same area where I eat when passing through popular areas, and to go no cook, which also cuts down on odors. In short, it is far better to avoid attracting a bear than to have to deal with him/her once they show up. In the intervening 39 years, I have seen a total of five bears in widely separated, but remote areas, and never around camp. Four out of the five couldn’t get the he!!out of dodge fast enough, and the fifth, as I was descending into Kern Canyon at Upper Funston Meadow, was so fat that it could have cared less about me as it waddled on its way in the direction of Kern Hot Springs, probably to harass the campers there for amusement. Nowadays, canisters are a very effective way, if bulky and heavy, to keep bears from getting your food, but they don’t prevent the hassles that ensue because you have attracted a bear into camp by poor odor management and campsite selection. Evasion, evasion, and more evasion is the name of the game, IMO/IME. FWIW