10 Mac Terminal Commands You Should Know


    1. Restart Your Mac When It Is Frozen


    sudo systemsetup -setrestartfreeze on

    The above command helps you reboot your Mac when it is frozen. Just type it once in Terminal and it will reboot your machine whenever it freezes up.

    2. Show Hidden Folders and Files


    defaults write com.apple.finder AppleShowAllFiles -bool true

    The above command enables Finder to show hidden files and folders on your Mac. It is quite useful when you wish to see the system folders that are hidden by default.

    3. Disable Delete Prompt


    defaults write com.apple.finder WarnOnEmptyTrash -bool false

    It disables the prompt that you get while emptying the Trash on your Mac. All the files in the Trash will be gone without you first confirming the action.

    4. Make Your Mac Speak Text


    say TEXT

    Enter anything in the place of TEXT in the above command and your Mac will speak it out for you. Sometimes it helps to hear things out loud, such as checking to see if it is correct or to fully understand what it means.

    5. Activate AirDrop on Older Macs


    defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool TRUE

    While AirDrop can be used on newer Macs just out of the box, older Macs require you to execute the above command to enable the functionality. It lets you exchange files between several of your Macs instantly.

    6. Rebuild the Spotlight Index


    sudo mdutil -E /

    Spotlight lets you quickly search for files and folders on your Mac. In order to do that it builds an index of all the files for faster searching. Sometimes the index needs to be rebuilt for various reasons, and the command above lets you do that. It helps you rebuild the Spotlight index on your Mac.

    7. Enable Text Selection in Quick Look


    defaults write com.apple.finder QLEnableTextSelection -bool TRUE

    As the name implies, Quick Look lets you quickly look at a file on your Mac. You just need to click the file and press Spacebar to activate it. What it does not let you do, though, is select text. The command above removes that limitation and lets you enable text selection in Quick Look on your Mac.

    8. Prevent Your Mac From Sleeping



    Like humans, your Mac does fall asleep when it is not used for a certain amount of time. To prevent your Mac from falling asleep you can use the above command.

    9. Remove Dashboard From Your Mac


    defaults write com.apple.dashboard mcx-disabled -boolean YES

    When was the last time you used Dashboard on your Mac? If you do not remember you probably do not need it. The command above should help you remove it from your Mac.

    If you ever want to get it back on your machine simply replace “YES” with “NO” in the above command, and it will be back.

    10. See Commands History



    Have you ever wondered what all the commands are that you have typed into the Terminal so far? The command above should list out all of those commands for you.

    Knowing these commands should help you make the most out of the Terminal app on your Mac. It will no longer be an app that only a geek uses; it will become an app that everyone uses.

    10 Mac Terminal Commands You Should Know