Those examples are trying to change the directory on the shell&#x27;s child process, not on the shell itself.<p>That being said, aside from a kernel patch there is definitely no official way of doing it. This is the hacky way:<p><a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2375003&#x2F;how-do-i-set-the-working-directory-of-the-parent-process" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2375003&#x2F;how-do-i-set-the-...</a>