Tag: macOS

Practical macOS tips and tutorials for both developers and everyday users. Learn how to solve common issues, improve productivity, and make the most of your Mac.

  • MacOS Shortcuts – Cheatsheet for New Users

    MacOS Shortcuts – Cheatsheet for New Users

    If you’re a new Mac user (like me!), knowing a few common shortcuts can save you tons of time. Here’s a simple cheatsheet of macOS shortcuts โ€” including some of the ones Iโ€™ve searched for myself.
    You might want to bookmark this โ€” I’ll keep adding more as I come across new and useful shortcuts.

    ๐Ÿ”„ Basic Editing MacOS Shortcuts

    ๐Ÿ‘จโ€๐Ÿ’ป Developer – Focused macOS Shortcuts

    ๐Ÿ’ป Productivity MacOS Shortcuts

    ๐Ÿ”ค Other Useful Shortcuts

    Since Iโ€™m still fairly new to macOS after switching from Ubuntu Linux, Iโ€™ve been collecting these shortcuts to help myself โ€” and hopefully to help you too.

    You might also find other posts where I share not just shortcuts, but tips for developers and guides on installing tools or setting things up on macOS. These arenโ€™t just for Mac beginners โ€” theyโ€™re for anyone adjusting to new workflows. Feel free to check them out here.

  • How to Do the Copyright Symbol on Mac

    How to Do the Copyright Symbol on Mac

    If you’re wondering how to type the copyright symbol on a Mac, the solution is quick and easy. Mac keyboards come with built-in shortcuts for special characters, including the copyright symbol.

    Why use the copyright symbol?

    The copyright symbol ยฉ shows that your work is protected by copyright law. You can put it in blog posts, documents, or any other type of creative work. It shows people that your work belongs to you.

    Some people also add the year and their name next to it, for example:

    ยฉ 2025 John Doe

    This makes it even clearer who owns the content and when it was created. However, the symbol by itself may not be enough to fully protect your rights in all situations โ€” itโ€™s best to include clear terms and conditions for your website or publications, and seek professional legal advice if you need comprehensive protection.

    Typing the Copyright Symbol on macOS

    To type the ยฉ symbol on a Mac, simply press:

    Option (โŒฅ) + G

    Thatโ€™s all you need to do! This shortcut works across most apps on macOS โ€” whether you’re writing in Pages, Word, Google Docs, or even in your browser.

    If you are new to Mac and do not know the Option key: it is next to the Command (โŒ˜) key. On most keyboards, there is one Option key on the left side and one on the right side.

    If the shortcut mentioned above doesn’t work, you can use the Character Viewer:

    • Press Control + Command + Space
    • Search for “copyright”
    • Double-click the symbol to insert it.

    Related Tips: Typing Other Special Symbols on Mac

    Mac has shortcut for many symbols. There are some you might also like:

    • Trademark (โ„ข) – Press Option (โŒฅ) + 2
    • Registered Trademark (ยฎ) โ€” Press Option (โŒฅ) + R
    • Degree (ยฐ) โ€” Press Shift + Option (โŒฅ) + 8
    • Ellipsis (โ€ฆ) โ€” Press Option (โŒฅ) + ;
    • Section (ยง) โ€” Press Option (โŒฅ) + 6

    These shortcuts work almost everywhere on macOS. If you forget them, you can either open the Character Viewer and search for the symbol you want or bookmark this post.

    Extra tips for Mac beginners

    When I first switched from Ubuntu Linux to macOS, I felt a bit lost. Many things were different. On Linux, I used different key combinations for special characters, and sometimes I had to copy and paste them. On Mac, once I learned the shortcuts, my work became faster. You might be in the same situation โ€” maybe not from Ubuntu, but perhaps you are coming from Windows? Or maybe you are just a newcomer to the computer world.

    Regardless, these simple, everyday shortcuts might also help you:

    • Command + C to copy
    • Command + V to paste
    • Command + Z to undo
    • Command + Shift + 4 to take a screenshot of a selected area

    I’m a new Mac user and have been having questions about shortcuts, processes, and other little details in macOS since I switched from Ubuntu Linux. I started adding these posts to help me remember โ€” and hopefully, they’ll help you too.

    Since moving to macOS, Iโ€™ve been collecting tips and shortcuts to make my daily work easier. I share them here so theyโ€™re easy to find โ€” and maybe theyโ€™ll help you too.

  • How to Close a Full Screen on Mac

    How to Close a Full Screen on Mac

    If you’re new to Mac, like I am, you might be wondering: How do I close full screen on Mac? Donโ€™t worry, itโ€™s very simple once you know how!

    Here are three quick and easy methods you can use to exit full-screen mode on your Mac:

    A. Use the Green Button

    Move your mouse to the top of the screen until you see the menu bar and the three window buttons (red, yellow, green) appear in the top-left corner of the window.

    Click the green button to exit full screen and return to normal window size. You can also click it again if you want to go back into full screen.

    How to Close Full Screen on Mac: Green icon on top left is for expanding/minimizing windows on mac.
    The green icon is used to expand or minimize windows on a Mac.

    Tip: In macOS, the green button is not just for full screen โ€” itโ€™s also used to resize or tile windows. If you hold down the Option key while clicking, you can maximize the window without entering full screen.

    B. Press and Hold Esc

    In some apps, you can simply press and hold the Esc key to exit full screen. This works in many media apps, like QuickTime or YouTube, when viewed in Safari.

    While this doesnโ€™t work in every app, itโ€™s worth trying. Often, when you move your mouse to the top of the screen, you might see a small message saying: โ€œTo exit full screen, press and hold Esc.โ€

    Hold Esc for about 3 seconds, and you should see the app switch back to windowed mode.

    C. Keyboard Shortcut

    For a faster method, press Control + Command + F. This shortcut works in most Mac apps and will toggle between full screen and windowed mode instantly.

    Tip: If youโ€™re using a MacBook with the Touch Bar, you might see a dedicated โ€œExit Full Screenโ€ button appear when youโ€™re in full screen. Tapping it is the same as using the keyboard shortcut.

    When Full Screen Wonโ€™t Exit

    There could be a case that your app may not respond to the methods mentioned above. In this case, try pressing Command + Tab to switch to another app, then close the full-screen one from the Dock.

    You can also right-click the app icon in the Dock and select Options > Exit Full Screen if available.

    If nothing works, press Command + Option + Esc to force quit the app, then reopen it in normal mode. This is rare, but itโ€™s good to know if a program freezes while in full screen.

    Looking for more beginner-friendly Mac tips? Check out our other quick guides for macOS beginners.

  • How to Install Postgres on MacOS

    How to Install Postgres on MacOS

    If you’re working on a Node.js project and run into errors like ECONNREFUSED ::1:5432, chances are PostgreSQL isn’t running โ€” or it isn’t even installed. Here’s a quick guide to install postgres on macOS using Homebrew, the most reliable and straightforward method.

    Before installing PostgreSQL, make sure you already have Homebrew installed on your Mac. Homebrew is the package manager weโ€™ll be using to install and manage PostgreSQL.

    Don’t have Homebrew yet? No worries, we got you covered. Check out our guide: How to Install Homebrew on macOS.

    Once youโ€™ve got Homebrew set up, youโ€™re ready to continue.

    Step 1: Install PostgreSQL via Homebrew

    With Homebrew installed, adding PostgreSQL is easy:

    brew install postgresql
    Bash

    If you want to install a specific version of postgres, e.g, version 17 type:

    brew install postgresql@17       
    Bash

    Step 2: Start the PostgreSQL Service

    Once installed, start PostgreSQL as a background service:

    brew services start postgresql
    Bash

    To confirm itโ€™s running:

    brew services list
    Bash

    You should see something like:

    Name        Status   User       File
    postgresql  started  your-name  Library/LaunchAgents/[email protected]
    Bash

    Step 4: Confirm the Installation

    Check that PostgreSQL is installed correctly:

    psql --version
    Bash

    psql is the interactive command-line tool when working with Postgres

    Expected output:

    psql (PostgreSQL) 17.5 (Homebrew)
    Bash

    In case you are getting a command not found: psql error you have to explicitly link it. For my example, in which i installed version 17, I just had to type

    brew link postgresql@17 --force
    Bash

    By typing psql --version you should now see the postgreSQL you just installed.


    Step 5: Connect to PostgreSQL

    You can now open a PostgreSQL shell:

    psql postgres
    Bash

    Or create your own database:

    createdb mydb
    psql mydb
    Bash

    Step 6 (Optional): Choosing a GUI

    If you prefer a graphical interface over the terminal, consider installing

    These tools make managing your databases even easier.

  • How to install Git on Mac – MacOS for beginners

    How to install Git on Mac – MacOS for beginners

    So, youโ€™re new to macOS and ready to set up Git? Great choice! Git is one of the essential tools for developers, and installing it should be one of the first steps in your journey. Donโ€™t worryโ€”itโ€™s easier than you think. Letโ€™s get started!

    If youโ€™ve never worked with Git before, think of it as a timeline for your files. It’s a tool used to keep track of every change you make, so you can jump backward in time if you break something or experiment freely without losing your original work.

    Itโ€™s not just for programmers โ€” writers, researchers, and designers also use Git to track versions of their work. Installing Git on your Mac now will save you a lot of headaches later.

    Although thereโ€™s a small learning curve at first, youโ€™ll quickly find that once youโ€™ve used Git for a while, you canโ€™t imagine working without it โ€” youโ€™ll wonder how you ever managed before.

    Check if Git is already installed

    If youโ€™re just setting up your Mac, itโ€™s unlikely that Git is already installed. macOS doesnโ€™t come with a fully functional Git by default. Instead, it includes a placeholder located at /usr/bin/git. This placeholder acts as a link to the actual Git version, which gets installed with Xcode or the Command Line Tools.

    To check, open your terminal and type:

    git --version

    If you see something like:

    No developer tools were found, requesting install

    it means that macOS detected that you tried to use a command-line developer tool – git in this case – but the Xcode Command Line Tools are not installed on your system.

    From here, you have two main choices for installing Git on your Mac โ€” Appleโ€™s Xcode Command Line Tools or the Homebrew package manager. Both will get the job done, but they have different strengths.

    • Xcode Command Line Tools is quick and easy if you just want to start using Git right away, but the version it installs is maintained by Apple and might not always be the latest.
    • Homebrew, on the other hand, gives you more control and makes it simple to update Git whenever a new release comes out. If you plan to keep working with Git regularly, I suggest going with Homebrew for its flexibility and ease of maintenance.

    Install Git on Mac using Xcode

    Xcode is one of the quickest ways to install Git on your system. Since Xcode Command Line tools include Git in the package, to use Git all you need to do is type the following command in your terminal

    xcode-select --install

    When the pop-up appears, click Install. Make sure youโ€™re connected to the internet.

    Once the installation finishes, confirm it by typing:

    git --version

    You should now see something like:

    git version 2.39.5 (Apple Git-154)

    Install Git on Mac using Homebrew

    Another popular way to install Git on macOS, apart from using Xcode Command Line Tools, is by using Homebrew.

    This method is often preferred by developers who want more control over the Git version or are already using Homebrew for managing other software.

    To install Git using Homebrew, run the following command

    brew install git

    Running this command will display some logs related to the Git installation, such as:

    ....
    ==> Installing git
    ==> Pouring git--2.47.1.arm64_sequoia.bottle.tar.gz
    ==> Caveats
    The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.
    Subversion interoperability (git-svn) is now in the `git-svn` formula.
    
    zsh completions and functions have been installed to:
      /opt/homebrew/share/zsh/site-functions
    ==> Summary
    ๐Ÿบ  /opt/homebrew/Cellar/git/2.47.1: 1,685 files, 54.4MB
    ==> Running `brew cleanup git`...
    ....

    Once the installation process is complete, you can verify that Git was installed successfully by typing:

    git --version

    You should see

    git version 2.39.5 (Apple Git-154)

    With Git successfully installed, you’re now ready to dive into your development journey and take full control of your projects!

    ๐Ÿ›  Extra Tip: When installing via Homebrew, you can easily update Git later by running:

    brew update && brew upgrade git
    Bash

    This ensures youโ€™re always on the latest stable release without waiting for Apple updates. It also makes switching between different Git versions simple, which is useful for testing or specific project needs.

    Verify Git configuration

    After installing Git, itโ€™s a good idea to configure your identity so your commits are linked to the right name and email address. Run the following commands in your terminal:

    git config --global user.name "Your Name"
    git config --global user.email "[email protected]"
    Bash

    You can check your saved settings with:

    git config --list
    Bash

    This will show your username, email, and other configuration details. These can be changed at any time if you switch accounts or need to adjust your settings.

    Next Steps with Git

    Installing Git is just the beginning. The next step is learning a few key commands that will make you productive right away. Start with:

    • git init โ€“ Create a new repository in the current folder.
    • git add <filename> โ€“ Stage files you want to include in your next commit.
    • git commit -m "message" โ€“ Save your staged changes with a short description.
    • git status โ€“ Check whatโ€™s been modified, staged, or committed.
    • git log โ€“ View a history of all commits in the repository.

    Once youโ€™re comfortable with these, try creating a branch with git branch <branchname> and switching to it using git checkout <branchname>. Branching is one of Gitโ€™s most powerful features, letting you work on new ideas without touching your main project until youโ€™re ready.

    As you explore these commands, remember that consistent practice is the fastest way to build confidence and skill with Git. And if you want to take things a step further, tools like Husky pre-commit hooks can help automate checks and streamline your workflow as you grow.


  • How to install Homebrew – MacOS for beginners

    How to install Homebrew – MacOS for beginners

    If you are making your first steps on macOS, you may have never heard of Homebrew before. Homebrew is a powerful package manager, similar to npm if youโ€™ve worked with it before. It allows you to easily install, update, and remove software packages directly from your terminal, making it an incredibly handy tool for developers. In this post, you’ll find a step-by-step guide to install Homebrew on MacOS.

    Why is it essential to install Homebrew?

    Homebrew is widely regarded as the most popular package manager for macOS. Itโ€™s the go-to choice for developers and power users because of its simplicity and active community support.

    Homebrew lets you easily get the tools and libraries you need for development or daily tasks, from developer tools like Git and Node.js to simple everyday utilities. It saves time by skipping the trouble of manual downloads and setup. Itโ€™s simple, fast, and perfect for customizing your Mac.

    If you havenโ€™t used a tool like Homebrew before, donโ€™t overlook it – it could completely transform the way you manage software on your Mac.

    Check if Homebrew is already installed

    Just to make sure you havenโ€™t already installed Homebrew in the past, letโ€™s check it out. Open your terminal and type:

    brew help

    If you have it installed, you should see something like

    Example usage:
      brew search TEXT|/REGEX/
      brew info [FORMULA|CASK...]
      brew install FORMULA|CASK...
      brew update
      brew upgrade [FORMULA|CASK...
      ....

    otherwise, you will get the following result

    command not found: brew

    How to install Homebrew

    Ready to install Homebrew? Hereโ€™s everything you need to know. Open your terminal (Cmd + Space and type Terminal“) and type

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
    

    Oh, you say! What is this command? Let me explain. This command asks bash (which is a command-line shell language commonly used in macOS and Linux) to execute a script.

    Hereโ€™s how it works:

    • /bin/bash: specifies the bash shell, ensuring the command is executed using bash, even if your default shell is something else (like zsh).
    • -c: This flag tells bash to execute the command provided in quotes.
    • $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh): This part fetches the Homebrew installation script directly from GitHub using curl (a tool for transferring data).

    In simple terms, this command downloads the Homebrew installer script from GitHub and immediately runs it using bash to set up Homebrew on your system.

    You will be asked for your super user password:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
    Checking for `sudo` access (which may request your password)...
    
    Password:
    

    After typing your password, youโ€™ll see a message prompting you to press ENTER to proceed with the installation. Simply press ENTER, and the installation will continue.

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
    Checking for `sudo` access (which may request your password)...
    
    Password:
    
    ==> This script will install:
    /opt/homebrew/bin/brew
    /opt/homebrew/share/doc/homebrew
    ....
    /opt/homebrew
    ==> The following new directories will be created:
    /opt/homebrew/bin
    /opt/homebrew/etc
    /opt/homebrew/include
    ....
    /opt/homebrew/Frameworks
    
    Press RETURN/ENTER to continue or any other key to abort:

    Wait for the installation process to completeโ€”it may take a few minutes. Once itโ€™s done, youโ€™ll see the message “Installation successful!”. However, to ensure everything was installed correctly, letโ€™s verify it by typing the following command in the terminal:

    brew help

    If it was successfully installed, you should see the following response.

    Example usage:
      brew search TEXT|/REGEX/
      brew info [FORMULA|CASK...]
      brew install FORMULA|CASK...
      ....

    Homebrew doesn’t work after installing it

    If youโ€™ve already followed all the steps described to install Homebrew but see a “command not found” error when running, e.g., brew help it typically means that the Homebrew binary is not properly added to your systemโ€™s PATH.

    To resolve the issue, revisit the logs from the Homebrew installation script. At the end of the script, youโ€™ll typically find specific instructions for finalizing the installation.

    Warning: /opt/homebrew/bin is not in your PATH.
      Instructions on how to configure your shell for Homebrew
      can be found in the 'Next steps' section below.
    ==> Installation successful!
    ...
    ...
    ...
    ==> Next steps:
    - Run these commands in your terminal to add Homebrew to your PATH:
        echo >> /Users/<your username>/.zprofile
        echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/<your username>/.zprofile
        eval "$(/opt/homebrew/bin/brew shellenv)"

    copy the last part of the Homebrew installation instructions โ€”starting from the command that begins with echo โ€” and paste it into your terminal. This command typically adds Homebrew to your system’s PATH.

    By now, you should have Homebrew installed on your system successfully. Congratulations! This is just the first small step on your exciting journey to mastering powerful tools and workflows as you grow your skills.If you’re exploring ways to automate parts of your development workflow next, you might find Git tools like Husky pre-commit hooks especially helpful.

  • How to Install npm on MacOS

    How to Install npm on MacOS

    Installing Node.js and npm (Node Package Manager) on your Mac is super simple. With these tools, you can manage Javascript packages, create powerful web applications, and dive deep into modern web development. Start by following these steps:

    Step 1: Verify that npm is installed

    Open your terminal and type

    node -v
    npm -v
    Bash
    • If you see version numbers (e.g., v16.13.0 for Node.js and 8.1.0 for npm), theyโ€™re already installed.
    • If you see errors or no versions, continue to the next step.

    Step 2: Install Node.js (includes npm)

    The easiest way to install Node.js and npm is by usingย Homebrew. If you donโ€™t have Homebrew installed,ย install it first.

    Then run:

    brew install node
    Bash

    Step 3: Verify the Installation

    After the installation completes, type the following command to check the versions and ensure everything is installed properly:

    node -v
    npm -v
    Bash

    You should see version numbers for both. ๐ŸŽ‰

    Step 4: Update npm (Optional)

    npm updates frequently, so ensure you have the latest version:

    npm install -g npm@latest
    Bash

    ๐ŸŽ‰ Youโ€™re all set! Now, you can use Node.js and npm to manage and build amazing projects. Happy coding! ๐Ÿ˜Š

    Why Use Node.js and npm?

    • Fast & Scalable: Node.js enables fast, scalable network applications with non-blocking I/O.
    • Massive Ecosystem: npm offers access to over 1 million open-source packages.
    • Cross-Platform: Develop once and deploy anywhere.

    These tools are essential for any web developer aiming to build modern, high-performance applications.