Your web hosting partners since 2004.
Buy now »

How can I install ncdu on RedHat/CentOS?

These steps guide you through the process of downloading, compiling, and installing ncdu from the source code.

Here is a summary of the steps:

  1. Download ncdu source code:

    wget https://dev.yorhel.nl/download/ncdu-1.15.1.tar.gz
    
  2. Extract the tarball:

    tar -xzvf ncdu-1.15.1.tar.gz
    
  3. Navigate to the extracted folder:

    cd ncdu-1.15.1
    
  4. Configure the build:

    ./configure --prefix=/usr
    

    If there's an error related to the absence of ncurses.h, install the ncurses development package:

    yum install ncurses-devel ncurses
    

    Then run the configure step again.

  5. Build the source code:

    make
    
  6. Install ncdu:

    sudo make install
    
  7. Optional: Clean up:

    rm ncdu-1.15.1.tar.gz
    rm -r ncdu-1.15.1
    

These steps should successfully install ncdu on your Linux system. If you have any issues or encounter errors during the installation process, carefully review the error messages for guidance on resolving dependencies or other issues.

Last updated: 2020-05-01

« Go Back

Order now »

all is perfect ;-)