How To Install indent on CentOS 7

In this tutorial we learn how to install indent on CentOS 7. indent is A GNU program for formatting C code

Introduction

In this tutorial we learn how to install indent on CentOS 7.

What is indent

Indent is a GNU program for beautifying C code, so that it is easier to read. Indent can also convert from one C writing style to a different one. Indent understands correct C syntax and tries to handle incorrect C syntax. Install the indent package if you are developing applications in C and you want a program to format your code.

We can use yum or dnf to install indent on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install indent.

Install indent on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install indent using yum by running the following command:

sudo yum -y install indent

Install indent on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install indent using dnf by running the following command:

sudo dnf -y install indent

How To Uninstall indent on CentOS 7

To uninstall only the indent package we can use the following command:

sudo dnf remove indent

References

Summary

In this tutorial we learn how to install indent on CentOS 7 using yum and dnf.