Skip to content
SAF Advanced InSpec Profile Developer CourseSAF Advanced InSpec Profile Developer Course
MITRE InSpec Advanced Profile Developer Course
Course
Resources
Installation
  • Course

    • 1. Course Overview
      • 2. Review the Fundamentals
        • 3. Practice the Fundamentals
          • 4. Tools for Automation
            • 5. Automate Security Testing
              • 6. Explore InSpec Resources
                • 7. Local vs Built-in Resources
                  • 8. Create a Custom Resource - The Git Example
                    • 9. Create a Custom Resource - The Docker Example
                      • 10. Writing Plural Resources
                        • 11. Dissecting Resources
                          • 12. Exercise - Develop your own resources
                            • 13. Add Your Resource to InSpec
                              • 14. Custom Resource Examples from InSpec

                              Installing InSpec on Linux

                              June 7, 2022Less than 1 minute

                              On This Page
                              • Option 1 (Package installer)
                              • Option 2 (Terminal install)
                              • After Install

                              # Install InSpec on Linux

                              # Option 1 (Package installer)

                              The InSpec package is available for MacOS, RedHat, Ubuntu and Windows. Download the latest package at InSpec Downloadsopen in new window or install InSpec via script:

                              # RedHat, Ubuntu, and macOS
                              $ curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
                              

                              # Option 2 (Terminal install)

                              Another option is to install InSpec via a command line:

                              # 1. Install Ruby

                              When installing from source, gem dependencies may require ruby build tools to be installed.

                              For CentOS/RedHat/Fedora:
                              $ yum -y install ruby ruby-devel make gcc gcc-c++

                              For Debian/Ubuntu:
                              $ apt-get -y install ruby ruby-dev gcc g++ make

                              # 2. Installing InSpec

                              Now we’re on to the good stuff. Let’s install InSpec:

                              To install inspec from rubygems:
                              $ gem install inspec

                              # 3. Installing additional gems

                              Install the following gems:

                              $ gem install bundler
                              $ gem install test-kitchen
                              

                              # After Install

                              Once InSpec is installed, run inspec version to verify that the installation was successful.

                              Edit this pageopen in new window
                              Last update: 6/7/2022, 7:18:57 PM
                              Contributors: Emily Rodriguez
                              Prev
                              Installing InSpec On Your Machine
                              Apache-2.0 | Copyright © 2022 - The MITRE Corporation
                              Copyright © 2022 Aaron Lippold