I am looking for a terminal command to shutdown without having to write down my password and without installing any extra programs.
As when clicking the shutdown button, why it is not asking me for the password and a program like gnome-pie that shutdown without asking me for the password and without confirmation.
I want this command as I am a Java programmer and I want to make use of it.
Best Answer
You will need to add command alias for all related command as follows:
and after that you need to add a user specification as follows at the end of /etc/sudoers file
You will need root permissions to write to sudoers file.
This is from ubuntu community documentation at https://help.ubuntu.com/community/Sudoers#Shutting_Down_From_The_Console_Without_A_Password