MacOS Tips
Contents
Were the free content on my website helpful for you?
Support the further free publication with a donation via PayPal.
MacOS
Dock icons with spacing
In the Dock bar, the app icons are displayed directly next to each other. With many icons, this can easily become confusing. However, with the two Terminal commands
defaults write com.apple.dock persistent-apps -array-add '{tile-type="spacer-tile";}' killall Dock
a spacer can be added to the Dock bar and then positioned with the mouse. To remove the spacer, simply drag it from the Dock to the desktop, just like any other app icon. If you want more spaces, just execute the commands again.

Finder: Defining any file as a template
Any file can be defined as a template. When you double-click a file, a new file with the same content is automatically created and opened instead. This prevents the "template" from being accidentally changed during editing.
To do this, enable the "Stationery pad" setting in the file information (context menu "Get Info" or using the keyboard shortcut ⌘ Cmd+I).
Open downloaded files (remove quarantine attribute)
Files downloaded from the internet, via e-mail, or received outside of the App Store are assigned a quarantine attribute. This prevents them from being executed or opened. For programs, this can be circumvented by opening them via the context menu. This does not work for other files.
The quarantine attribute can be removed using the following Terminal command:
sudo xattr -d com.apple.quarantine FILE
"FILE" is the full path to the file, which can also be dragged and dropped from the Finder into the Terminal window.
To display the value of the quarantine attribute, replace the "-d" parameter with "-p":
sudo xattr -p com.apple.quarantine FILE
To display all extended attributes for one or more files, the "@" parameter can be appended to the ls command, for example: "ls -l@
".
Notes: Asterisk and minus signs at the beginning of a line
If an asterisk or minus sign followed by a space is entered at the beginning of a line in Notes, a list entry is automatically generated. To be able to use these characters outside of a list, the input is entered twice in a row and then the format is changed to "Body" (body text). This can also be done with the keyboard shortcut ⇧ Shift+⌘ Cmd+B. For example, "* *
" becomes a list entry with the text "* ". After the format change, it returns to normal text. This works the same way with the minus sign.
Configuring screenshot captures
The images created during a screenshot are saved as PNG files on the desktop with the name "Screenshot" followed by the date and time. Terminal commands can be used to change the save location and file format.
The settings are changed using the "defaults" command. The "write", "read" and "delete" attributes can be used to change, read, or delete settings, thereby restoring the default value. This is followed by a "domain", which is usually an Internet domain spelled backwards, and a program name, e.g., "com.apple.screencapture". The name of the setting is specified after that. If a new value is to be set with "write", this is added at the end.
The file name for screenshots is set with the command
defaults write com.apple.screencapture name "Screen Capture"
This turns names like "Screenshot 2025-03-23 at 14.01.33.png" into "Screen Capture 2025-03-23 at 14.01.33.png".
The command
defaults read com.apple.screencapture name
prints the text "Screen Capture".
With the command
defaults delete com.apple.screencapture name
the user-defined value is removed and the default name is used again.
The file type can be changed with "type":
defaults write com.apple.screencapture type jpg
Supported file types are png (default), jpg, pdf, psd, gif, tga, tiff, bmp and heic.
The save location is specified using "location". The folder should exist. If it doesn't, the screenshot is saved to the desktop. For example:
defaults write com.apple.screencapture location ~/Desktop/screenshots
Adding keyboard shortcuts to applications
Most applications don't assign a hotkey (keyboard shortcut) for all menu items. Often, a keyboard shortcut is missing for one or another frequently used function. However, custom keyboard shortcuts can be assigned to all programs in the macOS System Preferences.
A good example is the "Notes" app, which has its own keyboard shortcuts for all formats except "Monostyled". This is a fixed-width font, particularly suitable for terminal commands and source code.
To create a keyboard shortcut for this menu item, open the system settings, select the "Keyboard" item and then the "Keyboard Shortcuts" button. In the window that appears, keyboard shortcuts can be assigned and changed for various predefined functions.
The "App Shortcuts" option allows you to assign keyboard shortcuts to menu items for all programs or a specific program. You can add a new item using the "+" button.

In the dialog that appears, you first specify whether the shortcut should apply to all programs or a specific program. Here, we select the "Notes" app from the list.
The menu title is "Monostyled" for an English user interface or the corresponding menu title in the set language.
Finally, press the keyboard shortcut in the corresponding text field to enter the text. ⌘ Command + ⇧ Shift + M is recommended. After confirming the dialogs with "Done" and restarting Notes, the new shortcut will appear in the Format menu and can be used in the program.

Open TextEdit with an empty document
Each time you start TextEdit, a dialog box appears asking you which document you want to open. If you want TextEdit to always start with a blank document, simply enter a terminal command (TextEdit should be closed):
defaults write com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false
After acknowledging a security warning, TextEdit always starts with a blank document. To restore the original behavior, execute the above command with only slight modifications:
defaults write com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool true
Keyboard shortcuts
Keyboard shortcuts for special characters
The key layout may vary depending on the keyboard type and manufacturer. Some of these characters may also be found as separate keys on the keyboard.
Character or Kkey | Keyboard Shortcut | Name / Description |
---|---|---|
[ | ⌥ Opt+5 | Square bracket left |
] | ⌥ Opt+6 | Square bracket right |
| | ⌥ Opt+7 | Pipe |
{ | ⌥ Opt+8 | Curly bracket left |
} | ⌥ Opt+9 | Curly bracket right |
\ | ⇧ Shift+⌥ Opt+7 | Backslash |
~ | ⌥ Opt+N, ␣ Space | Tilde (Option+N, followed by the space bar) |
… | ⌥ Opt+. Point | Horizontal ellipsis |
– | ⌥ Opt+- Minus | En dash |
∞ | ⌥ Opt+, Comma | Infinity symbol |
÷ | ⇧ Shift+⌥ Opt+. Point | Division |
© | ⌥ Opt+G | Copyright symbol |
® | ⌥ Opt+R | Registered symbol |
™ | ⇧ Shift+⌥ Opt+D | Trademark symbol |
Del | fn+⌫ Backspace | Delete text to the right of the cursor (like the Del key on PC keyboards) |
Del | ⌃ Ctrl+D | Delete text to the right of the cursor (like the Del key on PC keyboards) |
Find more special characters on the keyboard
To find more special characters on the keyboard, open the System Preferences, select "Keyboard" and under "Text Input" click the "Edit" button.

In the window that appears on the left, select the desired keyboard layout. A graphical keyboard overview with the corresponding keys is then displayed on the right. These keys change when the ⇧ Shift, ⌥ Opt, or both keys simultaneously, are held down.

General keyboard shortcuts for MacOS
Keyboard Shortcut | Function |
---|---|
Apps and app windows | |
⌘ Cmd+␣ Space | Opens Spotlight search |
⌃ Ctrl+← Cursor left | Switches to the left desktop |
⌃ Ctrl+→ Cursor right | Switches to the right desktop |
⌘ Cmd+⇥ Tab | Switch between open apps |
⌘ Cmd+` Grave ⌘ Cmd+´ Acute | Switch between windows of the same app (The last key varies depending on the keyboard) |
⌘ Cmd+H | Hide current app |
⌘ Cmd+N | Open a new window or file |
⌘ Cmd+W | Close current window |
⌘ Cmd+Q | Close current app |
⌥ Opt+⌘ Cmd+Q | Force quit the current app |
⌃ Ctrl+⌘ Cmd+Q | Activate the lock screen |
Copy and paste | |
⌘ Cmd+A | Selects everything (e.g. the text in a text field, all files in a directory, etc.) |
⌘ Cmd+C | Copies the selection to the clipboard |
⌘ Cmd+V | Inserts the contents of the clipboard at the cursor position |
⇧ Shift+⌥ Opt+⌘ Cmd+V | Pastes the text from the clipboard without formatting |
⌥ Opt+⌘ Cmd+V | Finder: Moves previously copied files in the Finder to the current directory |
⌥ Opt+⌘ Cmd+C | Finder: Copies the full file paths of the selected files and directories in Finder for use as command parameters in the Terminal. Required (single) quotes are already included. |
Screenshots | |
⇧ Shift+⌘ Cmd+3 | Takes a screenshot of the entire screen |
⇧ Shift+⌘ Cmd+4 | Creates a screenshot of an area |
⇧ Shift+⌘ Cmd+4, ␣ Space | Creates a screenshot of a program window |
⇧ Shift+⌘ Cmd+5 | Opens the screenshot tool (the last selected mode is active) |
Other keyboard shortcuts | |
⌃ Ctrl+C | Terminates the currently running program in the terminal |
⌃ Ctrl+D | Ends input via the standard input channel (stdin) in the terminal |
Other
Apple keyboard symbols with HTML entities
Character | HTML Entity | HTML Entity (hexadecimal) | HTML Entity (named) | Name / Description |
---|---|---|---|---|
⌘ | ⌘ | ⌘ | Command / Cmd | |
⌃ | ⌃ | ⌃ | Control / Ctrl | |
⌥ | ⌥ | ⌥ | Option / Opt | |
⇧ | ⇧ | ⇧ | Shift | |
⇪ | ⇪ | ⇪ | Caps Lock | |
⏏ | ⏏ | ⏏ | Eject | |
↵ | ↵ | ↵ | ↵ | Return / Enter |
↩ | ↩ | ↩ | Return / Enter | |
↵ | ⏎ | ⏎ | Return / Enter | |
⌫ | ⌫ | ⌫ | Backspace | |
␣ | ␣ | ␣ | Space | |
→ | → | → | → | Cursor Right |
← | ← | ← | ← | Cursor Left |
↑ | ↑ | ↑ | ↑ | Cursor Up |
↓ | ↓ | ↓ | ↓ | Cursor Down |
⏵ | ⏵ | ⏵ | Cursor Right | |
⏴ | ⏴ | ⏴ | Cursor Left | |
⏶ | ⏶ | ⏶ | Cursor Up | |
⏷ | ⏷ | ⏷ | Cursor Down | |
⇥ | ⇥ | ⇥ | Tab / Tabulator |
Useful Terminal Commands
- df -h
- Displays free disk space.
- ifconfig -a
- Displays the network card parameters.
- networkquality
- Displays the network speed for uploads and downloads. A specific interface can be specified with the "-I" option.
- pbcopy
- Copies the data from the standard input channel to the clipboard ("pasteboard"), e.g. "ls | pbcopy" to copy the output of ls.
- pbpaste
- Outputs the contents of the clipboard to the standard output channel, e.g. "pbpaste | wc -l
- say "TEXT"
- Outputs the TEXT as speech.
- security find-generic-password -a "NETWORK" -w
- Displays the Wi-Fi password for the specified NETWORK. Administrator credentials are required.
- system_profiler
- Outputs system information. Due to the volume of information, it should be redirected to a file.
- system_profiler -detailLevel mini
- Displays shorter system information without identifying/personal information.
- system_profiler -listDataTypes
- Displays a list of all available data types.
- system_profiler TYPE
- Displays only the system information for the specified data TYPE. Multiple data types can be specified, separated by spaces, e.g., "system_profiler SPSoftwareDataType SPNetworkDataType" for software and network information.
Were the free content on my website helpful for you?
Support the further free publication with a donation via PayPal.