Skip to content

Install tar Package

An XCCDF Rule

Description

The tar package can be installed with the following command:
$ sudo dnf install tar

Rationale

The GNU tar program saves many files together into one archive and can restore individual files (or all of the files) from the archive. tar includes multivolume support, automatic archive compression/decompression, the the ability to perform incremental and full backups. If

ID
xccdf_org.ssgproject.content_rule_package_tar_installed
Severity
Medium
Updated

Remediation Templates

A Puppet Snippet

include install_tar
class install_tar {
  package { 'tar':
    ensure => 'installed',
  }
}

An Ansible Snippet

- name: Ensure tar is installed
  package:
    name: tar
    state: present
  tags:
  - enable_strategy

script:kickstart

package install tar

OS Build Blueprint

[[packages]]
name = "tar"
version = "*"

script:bootc

dnf install tar

Anaconda Pre-Install Instructions

package --add=tar

A Shell Script

if ! rpm -q --quiet "tar" ; then
    dnf install -y "tar"
fi