cmd + shift + .
defaults write com.apple.Finder AppleShowAllFiles false #Change 'false' by 'true' to show hidden files killall Finder
defaults write com.apple.Finder AppleShowAllFiles true
>> To show hidden files, hold down: Cmd + Shift + . (dot) >> Hold down Cmd + Shift + . (dot) a second time to hide the files again.
Toggle hidden files on macOS: Command + Shift + .
defaults write com.apple.finder AppleShowAllFiles YES