Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 3.1 KB

File metadata and controls

55 lines (38 loc) · 3.1 KB
title Include
description Find out how to install the nuget.exe CLI tool on Windows, macOS, and Linux. Get step-by-step instructions and information about various versions.
author JonDouglas
ms.author jodou
ms.date 04/13/2026
ms.topic include

Always install the latest version of the tool that supports your configuration.

If the nuget.exe CLI tool is already installed, you can update the tool to the latest version by using the command nuget update -self.

  1. Download nuget.exe:

  2. When prompted, save the file to a folder of your choice. The nuget.exe file is downloaded directly. The downloaded file isn't an installer, so there's no need to run the file directly from the browser.

  3. To use the CLI tool from any folder, add the folder that contains the nuget.exe file to your PATH environment variable.

Behaviors can vary slightly based on your operating system distribution.

Note

Visual Studio for Mac was retired on August 31, 2024, in accordance with the Microsoft Modern Lifecycle Policy. You can continue to work with Visual Studio for Mac, but there are several other options for developers on macOS, such as the C# Dev Kit extension for VS Code.

For more information about support timelines and alternatives, see Visual Studio for Mac retired August 31, 2024.

  1. Install Mono version 4.4.2 or later.

  2. At a shell prompt, run the following command:

    # Download the latest stable version of `nuget.exe` to /usr/local/bin.
    sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
  3. Create an alias by adding the following code to the file that your operating system uses to store Bash aliases or configuration information. Typically, the ~/.bash_aliases or ~/.bash_profile file is used for this purpose.

    # Create an alias for `nuget`.
    alias nuget="mono /usr/local/bin/nuget.exe"
  4. Reload the shell. Test the installation by entering the command nuget with no parameters. The command should print NuGet CLI help information to the screen.