Deku Scrubs first appeared in Ocarina of Time, where they primarily appear as enemies Inside the Deku Tree where they are subordinate to Gohma.Here Link learns of his ability to deflect their nuts back at them with his Shield for the first time. Unlike other enemies, once struck they will not be destroyed, and will run around in a panic. When Link approaches, they will plead for mercy and offer him some advice to progress through the dungeon.
A group of three Deku Scrubs appear prior to Gohma's room, guarding the doorway. Unlike previous Deku Scrubs, these enemies will become stunned on the stop when hit, and will not give up unless Link defeats them in the correct order, a secret revealed by Deku Scrub defeated previously in the dungeon. This can be remembered using the phrase "twenty-three is number one". When Link beats them, they reveal to Link the strategy to use in order to defeat Gohma.
In the Master Quest version of the game, the Deku Scrub that reveals the correct order is replaced by a Mad Scrub, and the order to defeat the three Deku Scrubs is changed to 3 1 2. Link can only discover this new order by trial and error.
Business Scrubs are Dekus that have taken to selling certain items, but they will only offer these items once Link defeats them. Business Scrubs appear within the Lost Woods but are also common in many caves and secret holes in the rest of Hyrule. While most of their deals are extortionate, some of them will offer important items such as a Heart Piece or even the ability to carry more Deku Sticks or Deku Nuts.
Mad Scrubs appear in the Sacred Forest Meadow when Link is young, and also in Kokiri Forest as an adult. Unlike regular Dekus, these are far more aggressive and will attack in bursts, and will make no attempt to bargain with Link and can be destroyed in battle.
Regular Deku Scrubs also appear in the Lost Woods, most notably in the Forest Stage. Here, a group of Deku Scrubs will judge the face of any vistor who stands on the stage, and reward them depending on what they think of it. This reward varies from Rupees, nothing at all or a hail of Deku Nuts. If Link visits with the correct mask, he will meet a large Deku Scrub who will offer him a greater reward. According to him, the Skull Mask looks like the Deku's sacred forest totem.
One normal Deku Scrub also appears in the Lost Woods making his home in the top of a tree from which hangs a small drum-like target. If Link hits the center of the target three times in a row, he will be granted a larger Bullet Bag.
Majora's Mask explores a different side of this species, in which there is a functioning society composed entirely of Deku Scrubs, known as the Deku Tribe. They are situated in the swamp of Termina under monarchial rule. The Deku Royal Family is composed of a King and a Princess, who are served by guards, yes-men, and a butler whose son had died mysteriously prior to the game. The Deku of the swamp are also hinted to have a sophisticatededucation system. However, if an unknown stranger ever goes near a Deku, it will attack; walking close to them forces their passive bodies into their Deku Flowers. Dekus normally live in either a nest or a Deku Flower, and if other Dekus try to enter without permission, they usually become enraged. Some Deku have propellers on their heads which allow for flight.
Skull Kid also turns Link to a Deku Scrub at the beginning of the game. When Link was healed, he received the Deku Mask. Link in his Deku form was able to perform spinning attacks, shoot Bubbles, perform a Deku Flower Jump and glide using spinning flowers, hop across water and have the ability to retreat into a hardened nut-like shell for defensive purposes, but it is unclear if other Dekus share these abilities.
Mad Scrubs also appear in the Deku Palace and Woodfall. Like in Ocarina of Time, these Dekus do not attempt to be friendly with Link and can be destroyed in battle, usually leaving behind a Deku Flower for Link to use.
In Oracle of Ages and Oracle of Seasons, Deku Scrubs are scattered throughout Labrynna and Holodrum's lands and caves. Most of them are non-violent Business Scrubs that trade freely with Link. Some sell staples such as Mystical Seeds and Bombs, though most Business Scrubs sell Shields. The largest population of Deku Scrubs appears in a forest in western Labrynnain the past, appropriately named Deku Forest.
Of the two games, Oracle of Seasons is the only one to feature hostile Deku Scrubs. These Scrubs behave similarly to the ones in Ocarina of Time: they shoot seeds at Link from afar and hide themselves when he approaches. Deflecting their seeds back at them with the Shield will cause them to surrender, at which point they will offer Link helpful advice. Two such Scrubs appear on Mt. Cucco, one of which has a sign next to it that forbids the use of shields and deflecting seeds, comically revealing its weakness.
There are also three friendly Deku Scrubs who have roles in sidequests. One of them is located in the Lost Woods and plays a role in the Oracle of Seasons trading sequence. After playing the Phonograph for it, it will tell Link how to find his "Secret Spot," where the final reward for the trading sequence, a greater sword, is located. In a Linked Game of Oracle of Ages, a friendly Deku Scrub appears in Deku Forest. He can be heard singing a "secret" (the Deku Secret) called "Love the Seed," which is apparently quite popular among Dekus. Link tells the secret to another singing Deku that appears in a cave west of Sunken City in Holodrum, who also loves the secret song but can't remember the last half. As thanks, the Deku increases the size of Link's Seed Satchel.
The Deku Scrubs of the Oracle series are unique in that they appear to be individualistic creatures, given that most of them remain distanced from one another and they are never seen to interact. In fact, the singing Deku Scrubs are the only ones that refer to others of their own kind. The supposedly popular Deku song, "Love the Seed," is the only indication that these Deku Scrubs share any form of culture. Only the friendly Dekus that aren't Business Scrubs demonstrate musical inclination, however.
Four Swords Adventures features a group of Deku Scrubs living in the Lost Woods. They are similar in appearance to the Dekus of Majora's Mask. These Deku Scrubs were awoken from their slumber by Ganon transforming the forest into the Lost Woods. They look forward to the expansion of the Lost Woods to cover all the forests of Hyrule, at which point they can travel freely.If someone gets lost in these woods, they are said to transform into a Deku Scrub. Despite being tied to the woods, they are able to travel beyond the forest using underground passageways, and later appear in Frozen Hyrule where they have taken to a new game they call Terrorpin Hockey. Despite working for Ganon, none of these Dekus will attack the four Links, and will speak freely with them, assuming they are not a threat.
So yeah, there's some Zelda logic for my fellow Deku's.
Anyways, hope you like.