Skip to content

appleboy/macbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Macbook tips

English | 繁體中文 | 简体中文

Table of Contents

A curated collection of practical commands, tips, and tools for MacOS users.

This guide is designed for:

  • Power users and developers seeking shortcuts, automation, and enhanced productivity on macOS.
  • New users wanting to discover key utilities and improve their workflow.
  • Anyone looking for trustworthy recommendations on setup, configuration, and essential software.

How to use this guide:

  1. Use the Table of Contents above to browse sections quickly.
  2. Each command or tip includes context and purpose—read before you copy!
  3. External links and references provide deeper learning and troubleshooting help.
  4. Visuals illustrate step-by-step actions wherever possible.

Feel free to contribute improvements or suggest new tips to keep this document up-to-date for all Macbook users!

Screenshot of Apple MacBook M1 hardware Apple MacBook M1 – sleek design and performance for macOS users

Commands

Install Homebrew

Visit the Homebrew homepage for details — official installation instructions and documentation.

Purpose: Homebrew is an essential package manager for macOS, allowing you to install apps and developer tools from the command line.

How to install:

  1. Open your Terminal.
  2. Run the following command (requires permission to install software):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After installation, verify by running brew --version.


Install Bash Git Completion

Purpose: Enable tab completion for Git commands in Bash, improving workflow speed.

How to install:

  1. Make sure Homebrew is already installed.
  2. Run:
brew install git bash-completion

Enables both Git and Bash tab completion.

Further setup: To activate bash-completion when opening new terminals, add this line to your ~/.bash_profile or .extra config file:

[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion

create new folder in Desktop

mkdir ~/Desktop/screenshots/

Copy and paste this command to the terminal window:

defaults write com.apple.screencapture location ~/Desktop/screenshots/

Monospaced font with programming ligatures: FiraCode

Use brew and cask: Not officially supported, might install outdated version

brew tap homebrew/cask-fonts
brew install font-fira-code --cask

screenshot: see the != symbol

firacode

Setting the Mac hostname or computer name from the terminal

See the reference. change the primary hostname of your Mac:

scutil --set HostName <new host name>

Main font-bundle for sketch icon-font plugin

  • FontAwesome
  • Material Design Icons
  • Ion Icons
  • Simple Line Icons (@bohn002)
  • Ant Design Icons

See the detail

font

jq is a lightweight and flexible command-line JSON processor. Try it online.

jq_command

Recommended Applications & IDEs

A curated list of productivity, development, and utility apps for macOS:

Tips

Show all filename extensions in Finder

See the following screenshots:

Screenshot of Finder with filename extensions visible Finder window showing filename extensions enabled in macOS

How to change the ScreenShot Keyboard Shortcut

See WikiHow: Change Screenshot Shortcut for step-by-step customization instructions.

Screenshot of macOS keyboard shortcut settings for screenshots macOS settings dialog for changing screenshot keyboard shortcuts

Screenshot: Additional screenshot shortcut key options in macOS Other screenshot shortcut options available in macOS settings

Change the Shell in Mac OS X Terminal

More details in OSXDaily: Change Shell on Mac OS X.

open the terminal app and select the preferences

Mac Terminal Preferences window screenshot Selecting preferences in the macOS Terminal app

Screenshot: macOS Terminal app profile settings Changing Terminal profiles and shell options in preferences

Using a Windows PC Keyboard on Mac with Remapped Windows & ALT Keys

See OSXDaily: Remap Option/Command Keys — guidance on using Windows keyboards and adjusting mappings in macOS.

Mac system keyboard mapping dialog for Windows keyboard Mapping Windows and ALT keys to Command and Option in macOS system settings

  1. Select your windows keyboard.
  2. Click the dropdown next to OPTION Key and select Command
  3. Click the dropdown next to COMMAND Key and select Option

keyboard_02

Change default shell in terminal (iTerm2)

iterm2

chsh -s /bin/bash

See Use zsh as the default shell on your Mac

Tmux scrollback in terminal (iTerm2)

You can copy my .tmux.conf config file and update the profile of iTerm2 as following screenshot:

iterm2

Native Sierra-tabs on VSCode

See the issue comment

vscode 01

vscode 02

See Use tabs in windows on Mac

native tab

Change keyboard mapping for windows keyboard

See the solution.

keyboard

Change Hot keys in iTerm2

Go to iTerm Preferences → Profiles, select your profile, then the Keys tab. Click Presets... and choose Natural Text Editing. See tbe reference.

keyboard

Turn on three finger drag for your Mac trackpad

drag01 drag02

Change Spodlight shortcut key

spotlight

Jump between words in a bash command

In iTerm2, if you want to use Option + Right Arrow to jump between words in a bash command, you can set it up as follows:

  1. Open iTerm2.
  2. In the top menu, select iTerm2 -> Preferences.
  3. In the Preferences window, select the Profiles tab.
  4. On the left side, select the profile you are using (usually Default).
  5. Select the Keys sub-tab.
  6. Click the + button at the bottom right to add a new key binding.
  7. In the pop-up window, set it as follows:
    • Keyboard Shortcut: Press Option + Right Arrow.
    • Action: Select Send Escape Sequence.
    • Esc+: Enter f.

This way, when you press Option + Right Arrow, iTerm2 will send Esc+f, which in bash will move to the beginning of the next word.

Similarly, you can set Option + Left Arrow to jump to the beginning of the previous word:

  1. Repeat the above steps, click the + button to add a new key binding.
  2. In the pop-up window, set it as follows:
    • Keyboard Shortcut: Press Option + Left Arrow.
    • Action: Select Send Escape Sequence.
    • Esc+: Enter b.

This way, when you press Option + Left Arrow, iTerm2 will send Esc+b, which in bash will move to the beginning of the previous word.

After completing these settings, you should be able to use Option + Right Arrow and Option + Left Arrow to jump between words in bash commands in iTerm2.


Troubleshooting

If you encounter issues while following these tips or installing software:

  • Permissions errors: Try running commands with sudo if appropriate, or check your user’s access rights.
  • Missing dependencies: Ensure you have the latest version of macOS and Xcode command line tools (xcode-select --install).
  • Homebrew not found: Reinstall using the latest official guide and restart your terminal.
  • Command not found: Double-check spelling and package installation status (e.g., brew list).
  • For tool-specific issues, consult the linked official documentation in each section.

Feel free to open an issue or contact the project maintainer for additional help.


Contributing

Contributions and suggestions are welcome!

  • Fork this repository and submit a pull request with improvements.
  • Review open issues or propose new tips for Macbook users.
  • Ensure all new documentation is clear, concise, and uses consistent formatting.
  • All contributors will be credited in release notes and documentation history.

Thank you for helping improve this guide for everyone!

About

Some tips and command for my MacOS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published