To solve User is not in the sudoers file. This incident will be reported In a very simple way, when you run the sudo command or another command, you should do the following:
1. Run the command whoami and your username will appear.
2. Write the command Their, here enter the password of Super user when installing Linux > Also enter Nano or Vim whichever you prefer to use.
3. Enter the following path nano/ect/sudoers and a new window will appear in which you must write the user followed by ALL=(ALL:ALL) ALL
4. Save the changes with CTRL+X. Select YEAH to modify the changes and ENTER to save.
5. dating EXIT and run a new sudo command. You will see that it works.