How to install ncdu disk usage command

How to install ncdu disk usage command

Install ncdu disk usage command

1. install ncdu on MAC

To install ncdu on a Mac system, you can use Homebrew, which is a popular package manager for macOS. Here are the steps to install ncdu using Homebrew:

  1. Install Homebrew by running the following command in a terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Once Homebrew is installed, run the following command to install ncdu:
brew install ncdu

2. install ncdu on Linux distributions

To install ncdu on Linux, you can use the package manager of your Linux distribution. Here are the commands to install ncdu on some popular Linux distributions:

  1. Debian, Ubuntu, and derivatives:
sudo apt-get update
sudo apt-get install ncdu
  1. Red Hat, Fedora, and CentOS:
sudo dnf install ncdu    # Fedora 22 and later
sudo yum install ncdu    # CentOS, Red Hat, and older Fedora versions
  1. Arch Linux and derivatives:
sudo pacman -S ncdu

Once the installation is complete, you can run the ncdu command in a terminal to start the tool and analyze the disk usage on your system.

If you ever need to install the ncdu from source please refer to the linked article for a step-by-step procedure.

ncdu is not officially supported on Windows as it is a Linux/Unix-specific tool that relies on several underlying system utilities and libraries that are not available on Windows.

However, there are some alternatives to ncdu that are available for Windows, such as:

  1. WinDirStat: This is a popular disk usage analyzer for Windows that provides a graphical representation of disk usage using a tree map. It is similar to ncdu in terms of functionality and can be used to identify large files and directories on a Windows system.
  2. TreeSize: This is another disk usage analyzer tool for Windows that provides a hierarchical view of disk usage. It allows you to drill down into directories to see their sizes and provides options to sort and filter the displayed information.
  3. JDiskReport: This is a cross-platform disk usage analyzer tool that works on Windows, Linux, and macOS. It provides a graphical interface with various visualizations of disk usage, such as pie charts and bar graphs.

While these tools are not identical to ncdu, they offer similar functionality and can be used to analyze disk usage on Windows systems.

Leave a Reply