If you’re facing in running this command sosreport on your machine and you get the error command not found it can be as there will not be SOS package installed on system and the command ‘sosreport’ is not in the $PATH of the user.
Step 1: If SOS package is not installed use this command to install yum install sos -y
Now you will have to find where this command is located by command which sosreport
Now verify the above path is not in the $PATH of the user. If you get no output means path is not available.
NOTE: Run the above command as the user getting the “command not found” error.
Now you will have to edit $HOME/.bash_profile to set the environment variable.
Add these line mentioned below
Save and exit.
Now load the source the new bash profile
source $HOME /.bashrc_profile