“Of all the paths you take in life, make sure a few of them are dirt.”
I searched for keywords of that text in his books online and on an electronic copy of Muir of the Mountains, and was unable to find it. On rare occasions we find something in Muir's unpublished journals that is new and which can be verified. So I also did a search of the John Muir Papers at the University of the Pacific, and once again came up empty:
Misattributed
Help us to complete the source, original and additional information
John Muir 183
Scottish-born American naturalist and author 1838–1914Related quotes
Source: Bishop brothers; Stephen and Gregory Parkes to become 1 of 11 sibling-bishops in U.S Catholic history https://www.fox13news.com/news/bishop-brothers-stephen-and-gregory-parkes-to-become-1-of-11-sibling-bishops-in-u-s-catholic-history (August 30, 2020)

Variant: We all take different paths in life, but no matter where we go, we take a little of each other everyhwere.