Difference between revisions of "Inspec shell"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<code>[[inspec shell]]</code>
+
* <code>[[inspec]] shell</code>
  
 
  inspec shell
 
  inspec shell
 
  [[inspec help shell]] # This will describe inspec shell usage
 
  [[inspec help shell]] # This will describe inspec shell usage
  
 +
 +
inspec shell
 +
Welcome to the interactive InSpec Shell
 +
To find out how to use it, type: help
 +
 +
You are currently running on:
 +
 +
    Name:      ubuntu
 +
    Families:  debian, linux, unix, os
 +
    Release:  20.04
 +
    Arch:      x86_64
 +
 +
inspec>
 +
 +
 +
<pre>
 +
inspec> help
 +
You are currently running on:
 +
 +
    Name:      ubuntu
 +
    Families:  debian, linux, unix, os
 +
    Release:  20.04
 +
    Arch:      x86_64
 +
 +
Available commands:
 +
 +
    `[resource]` - run resource on target machine
 +
    `help resources` - show all available resources that can be used as commands
 +
    `help [resource]` - information about a specific resource
 +
    `help matchers` - show information about common matchers
 +
    `exit` - exit the InSpec shell
 +
 +
You can use resources in this environment to test the target machine. For example:
 +
 +
    command('uname -a').stdout
 +
    file('/proc/cpuinfo').content => "value"
 +
</pre>
  
  

Latest revision as of 13:58, 27 July 2021

inspec shell
inspec help shell # This will describe inspec shell usage


inspec shell
Welcome to the interactive InSpec Shell
To find out how to use it, type: help

You are currently running on:

    Name:      ubuntu
    Families:  debian, linux, unix, os
    Release:   20.04
    Arch:      x86_64

inspec>


inspec> help
You are currently running on:

    Name:      ubuntu
    Families:  debian, linux, unix, os
    Release:   20.04
    Arch:      x86_64

Available commands:

    `[resource]` - run resource on target machine
    `help resources` - show all available resources that can be used as commands
    `help [resource]` - information about a specific resource
    `help matchers` - show information about common matchers
    `exit` - exit the InSpec shell

You can use resources in this environment to test the target machine. For example:

    command('uname -a').stdout
    file('/proc/cpuinfo').content => "value"


See also[edit]

Advertising: