How Do You Find What Version of Chef That You Are Using on a Linux Server?

Question:  How Do You Find What Version of Chef That You Are Using On A Linux Server?  If you are not sure if Chef is installed or not on your Linux server, see this article.

Answers (one for Chef client and one for Chef server)
To find the version of Chef client that is installed, run this:

chef-client -v

If the response is "command not found" chef-client is not installed.  If chef-client is installed, the above command will result in a display of the version of chef-client.

To find the version of Chef server that is installed, this command may or may not work:
cat /usr/lib/ruby/vendor_ruby/chef-server/version.rb
# On RHEL 7.3 with Chef 12.11.1, it did not work for us.  But some people found it to work.

This command should work for a modern version of Chef server:
sudo find / -name version-manifest.txt | grep opscode | xargs cat * | grep -i chef-server

Leave a comment

Your email address will not be published. Required fields are marked *