Commands on Terminal

Please help me. I am a new user for Mac and I entered some commands on the Terminal and I don't know how to take it back to what it was. This are the commands.


𝗔𝗱𝗱 𝗗𝗼𝗰𝗸 𝗦𝗽𝗮𝗰𝗲𝗿 (paste for each spacer): defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' && killall Dock

𝗔𝗱𝗱 𝗛𝗮𝗹𝗳-𝗛𝗲𝗶𝗴𝗵𝘁 𝗗𝗼𝗰𝗸 𝗦𝗽𝗮𝗰𝗲𝗿 (paste for each): defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}' && killall Dock


This is where I get the commands. https://youtu.be/psPgSN1bPLY


I think I hit it four times due to lack of knowledge about the Terminal's uses and functions.

MacBook Air 13″, macOS 13.3

Posted on Apr 17, 2023 5:45 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 17, 2023 5:59 PM

To reset all the settings for com.apple.dock you can do the following:


defaults delete com.apple.dock && killall Dock


Be careful entering commands you do not understand. There are built-in manual pages and typing "man defaults" will explain the options of the command.


The com.apple.dock.plist is kept in ~/Library/Preferences and the defaults command knows where to find it. So the command was saying to write new keys and options to the XML Plist configuration file named com.apple.dock.plist. Since you are creating an array it's likely easier to remove everything configured on the Dock. Then you can redo the settings you wish to implement.


Another option would be to delete the ~/Library/Preferences/com.apple.dock.plist file and then issue the "killall Dock" command to restart the Dock. It will regenerate the default settings and recreate the plist file.

1 reply
Question marked as Top-ranking reply

Apr 17, 2023 5:59 PM in response to KevIn0592

To reset all the settings for com.apple.dock you can do the following:


defaults delete com.apple.dock && killall Dock


Be careful entering commands you do not understand. There are built-in manual pages and typing "man defaults" will explain the options of the command.


The com.apple.dock.plist is kept in ~/Library/Preferences and the defaults command knows where to find it. So the command was saying to write new keys and options to the XML Plist configuration file named com.apple.dock.plist. Since you are creating an array it's likely easier to remove everything configured on the Dock. Then you can redo the settings you wish to implement.


Another option would be to delete the ~/Library/Preferences/com.apple.dock.plist file and then issue the "killall Dock" command to restart the Dock. It will regenerate the default settings and recreate the plist file.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Commands on Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.