Running Sudo commands without password

While working with Linux, we find that access to some files or performing sensitive operations requires users to have elevated privileges. The sudo command temporarily elevates user privileges allowing a user to execute sensitive commands or access files without restrictions.

Edit the /etc/sudoers file using visudo command

# backup /etc/sudoers file
sudo cp /etc/sudoers /root/sudoers.bak

# edit with visudo
sudo visudo

# all commands without password for wheel group
%wheel  ALL=(ALL)       NOPASSWD: ALL

# save and exit