Transform Your MacBook into a Powerhouse with These Terminal Commands

Akshay S B
Mac O’Clock
Published in
4 min readJan 29, 2023

--

Made with Canva.com

The terminal is a powerful tool for customizing and automating your MacBook. With a few simple commands, you can change the look and feel of your system, automate tasks, and improve your productivity. This guide will cover some of the most useful terminal commands for customizing your MacBook, including how to change the appearance of your terminal, install and manage software, and manage system settings. Whether you’re a seasoned command line user or a beginner, this guide will provide valuable tips and tricks for getting the most out of your MacBook.

Change the Login Screen Background:

The first command you can use to customize your MacBook is to change the login screen background. To do this, enter the following command in the terminal:

sudo nano /Library/Caches/com.apple.desktop.admin.png

Enable Dark Mode in the Terminal:

If you prefer the dark mode look, you can enable it in the terminal as well. To do this, enter the following command in the terminal:

 echo "export TERM=xterm-256color" >> ~/.bash_profile

Customize the Terminal with Oh-My-Zsh:

Oh-My-Zsh is a popular terminal customization framework that can add features like themes, plugins, and auto-suggestions to your terminal. To install Oh-My-Zsh, enter the following command in the terminal:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Show the Full Path in the Finder Title Bar:

The Finder title bar only displays the name of the current folder by default. To show the full path in the Finder title bar, enter the following command in the terminal:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

Add a Shortcut to Empty the Trash:

Emptying the trash can be a repetitive task. To add a keyboard shortcut to empty the trash, enter the following command in the terminal:

defaults write com.apple.finder NSUserKeyEquivalents -dict-add "Empty Trash" '\0'

Faster Dock Hiding:

To speed up the dock hiding on your MacBook, you can adjust the animation speed. This can be done by entering the following terminal command

This adjusts the animation speed to be much quicker and immediately restarts the dock for the changes to take effect. This simple change can make using your MacBook feel snappier and more efficient:

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

Faster Dock hiding undo:

 defaults write com.apple.dock autohide-delay -float 0.5; defaults write com.apple.dock autohide-time-modifier-int 0.5 ;killall Dock

Add Dock Spacer (paste for each spacer):

To add spacers to the dock on your MacBook, you can use the following terminal command

This adds a spacer to the end of the dock, allowing you to separate your applications and make the dock more organized. Simply repeat this command for each spacer you want to add:

defaults write com.apple.dock persistent-apps-array-add ‘{tile-data=O; tile-type=”spacer-tile”,;} && killall Dock Add Half-Height Dock Spacer (paste for each): defaults write com.apple.dock persistent-apps -array-add ‘{“tile-type”=”small-spacer-tile”,)’ && killall Dock

Disable Annoying Disk Warning (must restart Mac to take effect):

To disable the annoying disk warning on your MacBook, you can use the following terminal command.This changes the disk warning to a no-op, effectively disabling it. Note that you must restart your Mac for this change to take effect. After restarting, your disk warning will no longer appear and you can use your MacBook without any interruptions:

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple. DiskArbitration.diskarbitrationd.plist DADisableEjectNotification -bool YES && sudo kill diskarbitrationd

Re-Enable Annoying Disk Warning:

 sudo defaults delete /Library/Preferences/SystemConfiguration/com. apple.DiskArbitration.diskarbitrationd.plist DADisableEjectNotification && sudo pkill diskarbitrationd

Alternatively, download Ejectify: https://ejectify.app

Change Screenshot Default to JPG (replace with png to undo):

To change the default format of screenshots on your MacBook to JPG, you can use the following terminal command.This changes the default screenshot format to JPG, and all future screenshots will be saved as JPG files. To undo this change and switch back to PNG, simply replace “jpg” with “png” in the above command and run it again.:

defaults write com.apple.screencapture type

These are just a few terminal commands that can help you customize your MacBook. With a little bit of practice, you’ll be able to use terminal commands to personalize your computer and make it work better for you.

As always, make sure to back up your data before making any changes to your system!

Let me know if you want me to post more terminal commands to customise your Mac. Hope this would be helpful for those looking to enhance their experience with their Macs.

Click here to sign up for my newsletter

--

--

Akshay S B
Mac O’Clock

Building a Logistic Company. Here I write Self-Help, Tech and Design content membership-free✨Subscribe my newsletter https://akshaysb.substack.com