How to hide or unhide folders in Mac

In order to hide or unhide folders in Mac, we must follow these steps:

Process to unhide folders

1. Get into the terminal

alejandros-MacBook-Pro:~ alejandro$ defaults write com.apple.finder AppleShowAllFiles TRUE

2. Refresh the Finder

alejandros-MacBook-Pro:~ alejandro$ killall Finder

Process to hide folders

1. Get into the terminal

alejandros-MacBook-Pro:~ alejandro$ defaults write com.apple.finder AppleShowAllFiles FALSE

2. Refresh the Finder

alejandros-MacBook-Pro:~ alejandro$ killall Finder