# Update package list and install basic dependencies
sudo apt-get update -y
sudo apt-get install -y curl git
# Remove any existing Chef Workstation installation
sudo rm -rf /opt/chef-workstation
# Download and install Chef Workstation
curl -L <https://omnitruck.chef.io/install.sh> | sudo bash -s -- -P chef-workstation
# Ensure Chef Workstation is in PATH
echo 'export PATH="/opt/chef-workstation/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/chef-workstation/embedded/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Verify installation
chef --version
# Check for any missing gems or dependencies
sudo /opt/chef-workstation/embedded/bin/gem install berkshelf knife
# Verify other Chef tools
knife --version
berks --version
chef-run --version
Basic Commands to Get Started:
ec2-user