Walking is human’s most important locomotion. Until recently, walking was seen as an automated motor task that requires only minimal cognitive resources. However, recent studies indicate that walking requires higher-level cognitive processes such as executive functions. A different line of research suggests that executive functions consist of 3 core components: inhibition, switching, and updating. Combining these findings, the present study clarified which executive-function component is most essential for human walking. Applying a dual-task methodology, adults (n = 37) and 8- to 13-year-old children (n = 134) walked repeatedly across an electronic pathway while solving an inhibition, switching, and updating task. Both adults and children showed the largest gait alterations in the updating and switching task as opposed to inhibition. Likewise, their cognitive performance revealed the largest performance reductions from single- to dual-task situations in the updating task. Overall, our results highlight remarkable similarities in children’s and adults’ performance with updating working memory representations and switching between rule sets being the most essential cognitive processes for walking. These findings point to a general gait-cognition process. Results have important theoretical value and hold practical implications for creating effective intervention programs.