Best practices for Linux include to never log into a system as root. Instead, use a normal account that is in the sudo(ers) group to run commands like these to patch the system:
sudo apt-get update
sudo apt-get upgrade
Errors like the one below will be shown if the account being used is not in the sudo(ers) group.
To fix this, the following commands will need to performed only once on the system:
su -
password: <enter the password>
adduser <user> sudo
exit
An example is shown below!
Now that the change has been made to the user account, logoff and login again to the system.
After logging into the system again, the sudo command will now work!