The tar
command is included in the tar
package on RHEL, CentOS, and other distributions based on them. To install tar
on RHEL/CentOS 6, 7, or 8, you can use the yum
command as follows:
tar
package:sudo yum install tar
This will install the tar
command and its dependencies.
tar --version
This will print the version of tar
installed on your system, indicating that it is working correctly.