In most cases, after you install Linux, you might find that some users cannot run sudo commands. These means that your users do not have root privileges.
It is very easy to change this. All you have to do is add the particular user(s) to the sudoers file.
Open terminal and type su – to go into root.
run visudo to open the sudoers file.
Scroll down until you see this:
root ALL=(ALL) ALL
Press the insert button to go into insert mode.
Exactly below this, write another line:
username ALL=(ALL) ALL
change the username with your actual username.
Tip: while writing the above line, use TAB to space.
After you’re done changing the file, press Esc to exit from insert mode.
Then type :wq! and hit enter to save your changes.
Your user can now run commands as root.