MacOSX
Mac keyboard shortcuts
General
| Action | Shortcut |
|---|---|
| Shutdown | Ctrl+Alt/Option+Cmd+Power |
| Backslash \ | Alt+Shift+7 |
| Right click with a trackpad | Ctrl+click button |
| Pipe | | Alt + 7 |
| Force quit applications | Command+Option+Esc |
| Shift | Alt ⌥ | Shift+Alt ⌥ | |
| 5 | % | [ | fi |
| 6 | & | ] | ^ |
| 7 | / | | | \ |
| 8 | ( | { | ~ |
| 9 | ) | } |
https://www.amsys.co.uk/save-time-using-top-ten-os-x-keyboard-shortcuts/
https://support.apple.com/en-us/HT201236
“Task manager” = “Activity Monitor”
Terminal
| Action | Shortcut |
|---|---|
| Ctrl + A | Jump to start of the line |
| Ctrl + E | Jump to end of the line |
https://scriptingosx.com/2017/03/navigating-the-terminal-prompt/
Get Mac OS X version
user@mac ~ % sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H15
Get hardware version
system_profiler SPHardwareDataType
Install software
ethvbtbsrg
Misc
Repeat the same task over and over (yes yes, I know…)
bash -c 'while [ 0 ]; do date;done'
bash -c 'while [ 0 ]; do rsync -av /Volumes/myfiles/ /Volumes/projects/myfolder/ ;done'
Keyboard mappings using a PC keyboard on a Macintosh
https://support.microsoft.com/en-us/help/970299/keyboard-mappings-using-a-pc-keyboard-on-a-macintosh
Diagnostics
https://support.apple.com/en-us/HT202731
Boot an M1 mac on another drive
Turn the Mac back on with a long press of the power button, holding until the screen shows startup options.
Permanently set startup disk at boot time
Boot your machine with the Option key down to invoke the Startup Manager, then hold down the Control key prior to clicking on a volume to boot.
If this trick is supported on your Mac, you’ll notice that upward-pointing arrow—the one that points to the selected disk—will change into a circular arrow instead, indicating that the chosen disk will not only be used to start your Mac this time, but that it will also become the default boot disk.
https://www.macworld.com/article/192818/startupboot.html
How To Logout Another MacOS User
- Launch Activity Monitor from Spotlight (Command+Spacebar) or through /Applications/Utilities/
- From the “View” menu choose “All Processes”
- Use the search box in the upper right corner of Activity Monitor to search for “loginwindow” – be sure to use exact syntax
- Select the ‘loginwindow’ process belonging to the user account you wish to log out
- Click the (X) Quit Process button and verify that you want to quit the loginwindow process for that user, acknowledging that it will log out the related user account
- Enter the admin password if requested, otherwise just choose “Force Quit” and continue, exit out of Activity Monitor when finished
Credits: https://osxdaily.com/2015/08/17/log-out-other-user-without-logging-in-mac-os-x/
Random stuff
VM from MacOSX (I dont’t remember what this exactly does :/)
Shift+Option Alt-Gr
Compatibility Matrix: https://eshop.macsales.com/guides/Mac_OS_X_Compatibility