How To Install ctags on Fedora 34

ctags is A C programming language indexing and/or cross-reference tool

Introduction

In this tutorial we learn how to install ctags on Fedora 34.

What is ctags

Ctags generates an index (or tag) file of C language objects found in C source and header files. The index makes it easy for text editors or other utilities to locate the indexed items. Ctags can also generate a cross reference file which lists information about the various objects found in a set of C language files in human readable form. Exuberant Ctags improves on ctags because it can find all types of C language tags, including macro definitions, enumerated values (values inside enum{…}), function and method definitions, enum/struct/union tags, external function prototypes, typedef names and variable declarations. Exuberant Ctags is far less likely to be fooled by code containing #if preprocessor conditional constructs than ctags. Exuberant ctags supports output of Emacs style TAGS files and can be used to print out a list of selected objects found in source files. Install ctags if you are going to use your system for C programming.

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

Install ctags on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install ctags

Install ctags on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install ctags

How To Uninstall ctags on Fedora 34

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

sudo dnf remove ctags

ctags Package Contents on Fedora 34

/usr/bin/ctags
/usr/lib/.build-id
/usr/lib/.build-id/87
/usr/lib/.build-id/87/7506a82a6f15ff9cf32222ba874d38b96d230f
/usr/share/doc/ctags
/usr/share/doc/ctags/EXTENDING.html
/usr/share/doc/ctags/FAQ
/usr/share/doc/ctags/NEWS
/usr/share/doc/ctags/README
/usr/share/licenses/ctags
/usr/share/licenses/ctags/COPYING
/usr/share/man/man1/ctags.1.gz

References

Summary

In this tutorial we learn how to install ctags on Fedora 34 using yum and dnf.