Top Mac Terminal Tricks Your Need To Know

Coding on Laptop
Quick Fix

Download and try Outbyte MacAries right now to see what it can do for your Mac.

Developed for macOS

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy Policy.

The Terminal in macOS is a gateway to useful features and tricks that aren’t readily available through the graphical user interface. Hidden beneath the sleek and user-friendly surface of your Mac lies a powerful command-line interface inherited from UNIX, allowing users to dive into advanced system functions.

Show Hidden Files and Folders

One common task among users is dealing with hidden files and folders created by macOS for various reasons. These can be revealed easily using a Terminal command:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE
killall Finder

Switch back to hiding them by setting the boolean to FALSE and running the commands again.

Copying and Downloading Files

Copying files between folders in a more sophisticated way than the usual drag-and-drop can be done using Terminal’s Ditto command. For instance, to copy files with a verbose output showing you each file name as it’s copied, you would type:

Pro Tip: Scan your Mac for performance issues, junk files, harmful apps, and security threats
that can cause system issues or slow performance.

Free Scan for Mac Issues
410.674 downloads
macOS compatible

Special offer. About Outbyte, uninstall instructions, EULA, Privacy Policy.

Ditto -v [original folder] [new folder]

Alternatively, downloads from the internet can be managed through the Terminal without the need to use a browser, courtesy of the curl command:

cd ~/Downloads/
curl -O [URL of the file]

Customizing System Behavior

Terminal commands can modify how your Mac behaves in certain scenarios. For example, to keep your Mac awake overriding Energy preferences, or to set an automatic restart on system freeze, try:

caffeinate or caffeinate -u -t [number of seconds]
sudo systemsetup -setrestartfreeze on

Customizing the Dock and Managing Apps

The Dock’s appearance and features can be tweaked for a more streamlined user experience, such as hiding non-active apps or creating a delay before the Dock appears on screen:

defaults write com.apple.dock autohide-delay -float 0; killall Dock

Apps can also be managed directly from Terminal. For example, the Force Quit command instantly closes an application if it becomes unresponsive:

killall [AppName]

Screenshot Management

Mac users who take frequent screenshots may find the default options insufficient. Terminal commands can change where screenshots are saved, remove drop shadows, and even alter the default screenshot file type:

defaults write com.apple.screencapture location [path]; killall SystemUIServer

Entertainment and Easter Eggs

Beyond all the practical uses, Terminal can also provide some fun. Turns out, you can play Tetris, Pong, or even watch an ASCII version of Star Wars all within Terminal. Just type:

emacs (follow the ensuing key commands for games)
telnet towel.blinkenlights.nl (for Star Wars)

For more information on the capabilities of Terminal and hidden tricks you can perform, there are vast resources and community discussions available online. A particularly engaging discussion offering both useful and “just for fun” Terminal commands is found on Reddit, where users share their favorite Terminal snippets.

From keeping a Mac awake to playing hidden games, Terminal grants access to a dimension of macOs that can make your workflow more efficient, customized, and occasionally, more entertaining. Whether you’re an experienced coder or a curious user looking to understand your Mac better, Terminal is a tool worth exploring.

Give us some love and rate our post!
[Total: 0 Average: 0]
Subscribe
Notify of
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Featured Stories
How to Keep Your Mac Cool: Monitoring Mac CPU Temperatures
Mac
The Dark Side on Your Mac: How to Switch to Dark Mode
Mac
macOS Terminal Guide: Basic to Advanced