The command which you have to enter is two parts, sudo and then the command followed by it which will be granted root (main admin) acess.
sudo caches the password for a default of 5minutes. So if you have entered the password recently before it will not ask you again.
You did not specify which OS you have / which command you executed so there is not that much more to say.
Some commands if executed just do not return any feedback.
Like the killall, but you might be able to add verbosity, like with -v
sudo killall -v -HUP mDNSResponder
which results here in the returned text:
kill -HUP 94
as the process id is 94.
If you want to see more you can also look into /var/log/system.log
system.log:Jul 9 18:35:33 mac.local mDNSResponder[94]: SIGHUP: Purge cache
though all that might be dependent on the os version you run and the command you execute, ...