Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to install command-line tools on a Mac

May 23, 2022
Varsha Sharma
Related topics:
Developer ToolsLinux
Related products:
Developer Tools

Share:

    macOS imposes strict limitations on the places from which you can download commands. Many of the Linux-related tools you want to use come from sites other than the App Store, so you have to change your preferences in macOS to use the commands. In this article, I show how to install a command that is not from the App Store, using the popular Helm client as an example.

    Download a binary onto your Mac

    Download the binary for the client you need. For example, Helm offers a variety of binaries at its GitHub repository.

    Unpack the binary and add it to your PATH. I prefer to add commands in the /usr/local/bin directory. Here's how to install the current version of Helm:

    $ tar xf helm-v3.9.0-rc.1-darwin-amd64.tar 
    $ cd darwin-amd64/
    $ sudo mv helm /usr/local/bin
    

    At this point, the warning in Figure 1 appears if you try to execute the helm command.

    helm list
    macOS error: the computer refuses to open a tool downloaded from an unrecognized location.
    Figure 1: macOS displays an error and refuses to open a tool downloaded from an unrecognized location.

    You get the same error if you try to open the application from the Finder. The problems arise because macOS keeps track of the sources for applications and is wary of applications that don't come from the App Store. You can expand the range of sources that your computer will accept, however.

    Changing preferences for downloads

    You can change your range of sources for applications in the System Preferences application, which is usually in your Dock on your desktop. The option you want is on the Security & Privacy pane, which by default allows downloads only from Apple's App Store. You have to click the lock icon at the bottom left of the page, enter your admin password, and then change the option to App Store and identified developers.

    If App Store and identified developers is already checked but helm did not run, select Allow anyway (Figure 2).

    The Allow Anyway button allows you to enable an application blocked by Apple.
    Figure 2. The Allow Anyway button allows you to enable an application blocked by Apple.
    Figure 2: The Allow Anyway button allows you to enable an application blocked by Apple.

    After you change the security setting, installation starts:

    Helm stores cache, configuration, and data based on the following configuration order:
    
    - If a HELM_*_HOME environment variable is set, it will be used
    - Otherwise, on systems supporting the XDG base directory specification, the XDG variables will be used
    - When no other location is set a default location will be used based on the operating system
    
    By default, the default directories depend on the Operating System. The defaults are listed below:
    
    | Operating System | Cache Path                | Configuration Path             | Data Path               |
    |------------------|---------------------------|--------------------------------|-------------------------|
    | Linux            | $HOME/.cache/helm         | $HOME/.config/helm             | $HOME/.local/share/helm |
    | macOS            | $HOME/Library/Caches/helm | $HOME/Library/Preferences/helm | $HOME/Library/helm      |
    | Windows          | %TEMP%\helm               | %APPDATA%\helm                 | %APPDATA%\helm          |
    
    Usage:
      helm [command]
    
    Available Commands:
      completion  generate autocompletion scripts for the specified shell
      create      create a new chart with the given name
    ....
    ....
    saving session....completed
    
    [Process completed]

    Once installation has completed, run the helm command again:

    $ helm version
     version.BuildInfo{Version:"v3.8.2", GitCommit:"6e3701edea09e5d55a8ca2aae03a68917630e91b", GitTreeState:"clean", GoVersion:"go1.17.5"}

    This output shows that Helm has been installed successfully. A similar process should allow you to install other command-line tools on macOS, such as the oc client for RedHat OpenShift.

    Last updated: February 5, 2024

    Recent Posts

    • What qualifies for Red Hat Developer Subscription for Teams?

    • How to run OpenAI's gpt-oss models locally with RamaLama

    • Using DNS over TLS in OpenShift to secure communications

    • Scaling DeepSeek and Sparse MoE models in vLLM with llm-d

    • Multicluster authentication with Ansible Automation Platform

    What’s up next?

    intermediate-linux cheat sheet cover

    This Linux cheat sheet introduces developers and system administrators to the Linux commands they should know.  You'll learn about text utilities, disk tools, network connectivity tools, user and user group management, and more.

    Download the free cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue