macOS: Five Terminal commands you should try now

Terminal has been built into macOS for years, and it’s a very powerful tool, just like Command Prompt is for Windows users. Most non-developers and home users skip pass the tool, and many haven’t heard of it, but Terminal can perform some powerful commands that will chance your macOS experience.

You can launch Terminal through Spotlight Search (type ‘terminal’), the Applications folder in Finder, or Launchpad. Most tips in this article can be reversed to their original state at any time.


Make the Mac Dock autohide animation faster

One annoyance of many Apple users is the amount of animations built into their devices. On iOS, you cannot disable or reduce the effect of these, but macOS is much more flexible. If you have your Dock set to autohide (right click, Dock Preferences), there’s a way to bring it up much quicker when you need it.

Remove the autohide animation altogether

Source: Apple TLD

Simply type the following command into Terminal and press Enter. The autohide time is set to ‘0’, which means the animation is removed. The Dock will also relaunch and may go black after entering this command.

defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock

Restore the Dock autohide animation

Type the following line into Terminal to restore the nice animation that is used to autohide the Dock by default. Your Dock will again relaunch and you’ll notice the effect straight away.

defaults delete com.apple.dock autohide-time-modifier;killall Dock

Change default screenshot location

Source: Apple TLD

By default, your Mac saves screenshots to the Desktop. Most users leave this location alone, but if you like to have a clean desktop, it’s easy to change the location to an external hard drive or separate folder elsewhere. Replace ‘new location’ with the file location (e.g Documents).

defaults write com.apple.screencapture location [new location]
killall SystemUIServer

Enable chime when connected to power

When you connect an iOS device to power, it will chime to indicate that it’s charging and plugged in. If you have a MacBook, MacBook Pro or MacBook Air, you can enable this for your computer too – obviously, this won’t work for any desktop Macs!

defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app

Download files directly with no browser

Using websites to download files from the internet is very easy and convenient, but, if you have the direct file link, then you can use the Terminal application to download it. This is really handy for avoiding adverts and websites full of trackers. A direct link to a file could be something like ‘appletld.com/files/2019-02/xyz/tldmaker.dmg’ – look for the file type in the URL.

cd ~/Downloads/
curl -O appletld.com/files/2019-02/xyz/tldmaker.dmg

In this case, the file location selected is the Downloads folder, and Terminal will obtain the file from the given link (which you will need to change from the code) and download it to that folder. You can also change the location too (first line).


Personalise Terminal with custom colours and fonts

Source: Apple TLD

Apple’s Terminal window is set as black text on white background by default, but if you prefer a more ‘Matrix’ style look or simply prefer to read lighter colours on darker ones, there’s a way to change this. It’s really easy: open a Terminal window, click Terminal in the menu bar, then Preferences, Profiles. Select a preset theme or customise the existing one with fonts, text colours, backgrounds, window sizes and lots more options. Play around!

Default image
Ben Ward

3 Comments

  1. Great content! Super high-quality! Keep it up! 🙂

  2. Hello there! I could have sworn I’ve visited this site before but after looking at many
    of the posts I realized it’s new to me. Regardless, I’m definitely pleased I found it and I’ll be bookmarking it and
    checking back often!

  3. Ahaa, its fastidious conversation about this article at this place at this web site, I have read all that,
    so at this time me also commenting here.

Leave a Reply