Subshells
A subshell creates a separate instance of the command processor, or a subprocess of the parent shell. Although a subshell is started in its parent’s working directory, directory changes made within the subshell don’t carry over to its parent. This makes subshells ideal for running one-off commands in a different directory:
$ pwd /Users/jeffkreeftmeijer/rust/conway/ $ (cd www && npm install) [...] $ pwd /Users/jeffkreeftmeijer/rust/conway/