A dog can be trained not to bark by using one of the following six techniquesÂ of The Humane Society of the United States: removing the motivation, ignoring barking, desensitizing the dog, teaching the dog a "silent" command, asking the dog for a different behavior and keeping the dog tired. To remove the motivation for the dog, take away whatever it is that the dog expects from the barking.
If the dog typically barks at people who are walking by a window, then put the dog in another room or close the window. Change his behavior by removing what it likes to bark at. Ignoring the barking is another technique that simply involves ignoring the dog until it stops barking.
To desensitize the dog, work on slowly introducing the dog to the stimulus that bothers it, and then reward it for being near the stimulus. This is a slow, lengthy process that requires patience on the part of the owner.
Teaching the dog a "silent" command can teach the dog that it must be quiet and not bark whenever instructed by the owner. Another technique is to ask the dog to do something that it cannot do while it is barking, such as by tossing it a treat on its bed and drawing the dog's undivided attention to the treat despite the door or the stimulus that is bothering it.
The final technique is to keep the dog tired by taking it on walks and giving it interactive toys as well as playing games with it. A tired dog is less likely to bark from boredom and it will also be more mellow.