顯示具有 Apple 標籤的文章。 顯示所有文章
顯示具有 Apple 標籤的文章。 顯示所有文章

2023年8月26日 星期六

What I Learned Today (08/26/2023): Guide to Mastering Command Line and Shortcuts on Mac

Guide to Mastering Command Line and Shortcuts on Mac

Unlock the true potential of your Mac by mastering its command line interface and various keyboard shortcuts. Here's how.

Table of Contents

Check Mac Version

To check your Mac version, open the Terminal and type:

sw_vers -productVersion

Change Hostname

Change your Mac's HostName with the following commands:

  • Change HostName: sudo scutil --set HostName [nameyouwant]
  • Change temporary hostname: sudo hostname [mbpr]

Managing Applications

  • Start an application (e.g., TeamViewer): open -g -a /Applications/TeamViewer.app
  • Gracefully quit an application: osascript -e 'quit app "TeamViewer.app"'
  • Open multiple instances of VLC: /Applications/VLC.app/Contents/MacOS/VLC

User Management

For details on hiding, refer to Apple Support.

  • Disable a user: pwpolicy -u username disableuser
  • Enable a user: pwpolicy -u username enableuser
  • Hide a user from login screen: sudo dscl . create /Users/username IsHidden 1
  • Show a hidden user: sudo dscl . create /Users/username IsHidden 0

Browser Tricks

  • Add 'www' and '.com' to a URL: Press Control + Enter.
  • Reopen closed tab: ⌘ + Shift + T
  • Highlight URL bar: ⌘ + L
  • Open Incognito Mode: ⌘ + Shift + N
  • Clear cache and refresh: ⌘ + SHIFT + R

VLC Tips

  • Sync audio forward or backward: Press J or K.
  • Sync subtitles: Press H or G.

Miscellaneous Shortcuts

  • Lock screen: CMD+Ctrl+Q
  • Show dock: CMD+option+D
  • Maximize keyboard shortcut: Follow the guide in System Preferences > Keyboard settings.

Uninstalling Apps

  • 1. Go to LaunchPad.
  • 2. Drag the icon into your dock.
  • 3. Right-click on the icon and select Options > Show in Finder.
  • 4. Delete file.
  • 5. Right-click on the icon in the dock again and select Options > Remove from Dock.

Update Mac Using Terminal

  • Check for updates: softwareupdate -l
  • Install specific update: sudo softwareupdate -i 'macOS Catalina 10.15.4 Update- ' (note the space at the end)

2023年8月20日 星期日

What I Learned Today (08/20/2023): Mac Keyboard Shortcuts Guide 🍎

 

  • Command Key: 蘋果鍵 🍏
  • Option Key: alt鍵
  • Control Key: ctrl鍵
  • Eject Key: 光碟退出鍵 ⏏️
  • Down Arrow Key: 上下左右的下鍵 ⬇️

Switching Between Programs & Windows 🔄

  • Command + Tab: Switch between different programs (forward) ➡️
  • Command + Shift + Tab: Switch between different programs (backward) ⬅️
  • Command + ` : Switch between different windows of the same program (forward) ➡️
  • Command + ~ : Switch between different windows of the same program (backward) ⬅️

Editing & File Management ✏️

  • Command + C: Copy 📋
  • Command + V: Paste 📄
  • Command + X: Cut ✂️
  • Command + N: Open new window 🖼️
  • Command + W: Close tab ❌
  • Command + Option + W: Close all tabs, but don't close the program ❌❌
  • Command + Q: Close entire program ❌🗑️
  • Command + A: Select all 📑
  • Command + F: Find 🔍
  • Command + O: Open file 📂
  • Command + S: Save file 💾
  • Command + M: Minimize 🗕
  • Command + H: Hide current program (switch back with Command + Tab) 🔍
  • Command + Option + H: Hide all windows except the current program 🔍🔍
  • Command + E: Eject on external device ⏏️
  • Command + D: Make a backup 🔄
  • Command + ↓ : Execute/run ⚙️
  • Command + Shift + A: Open applications folder in Finder 🗂️
  • Control + Eject Key: Shutdown inquiry window 🚫💻
  • Command + Option + Esc: Force quit program 🚫❌
  • Command + Option + Eject Key: Sleep 💤
  • Command + Option + Ctrl + Eject Key: Shutdown 🚫💻
  • Command + Ctrl + Power Key: Force restart ⚡
  • Command + Shift + 3: Full-screen screenshot 📷
  • Command + Shift + 4: Screenshot (select range) 📸
  • Command + Shift + 4 + Space Key: Screenshot (select application) 📸🖼️

During Boot-Up 🥾

  • Option: Choose boot disk 🎛️
  • T: Turn your Mac into an external hard drive (use Firewire to connect to another computer) 💿
  • C: Boot from CD 📀
  • Shift: Safe mode boot 🛑
  • Command + S: Single-user mode 👤

Mouse Controls 🖱️

  • Right Click: ctrl + Left Click = Right Click 🖱️
  • Two-finger touch on touch panel + Left Click: Right Click 🖱️🖱️

Happy computing! 🎉 Feel free to bookmark this page for future reference. Please let me know if there is anything that need update!