Note that it can only be Finder, it is still invisible in the terminal.
defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder
Enter the above command in the terminal.
This way, after opening finder, you can see hidden files.
Reference link: http://sspai.com/26273