Navigate to Applications > Utilities > Terminal.

Paste the below command into Terminal and press Enter:

defaults write com.apple.finder AppleShowAllFiles TRUE

Then, paste the below command into Terminal and press Enter:

killall Finder

Paste the below command into Terminal and press Enter:

defaults write com.apple.finder AppleShowAllFiles FALSE

Then, paste the below command into Terminal and press Enter:

killall Finder