what codes does sudo command do in Linux?

sometime, to make your change of configuration file be effective to web application, we have to restart the tomcat again then reload the memory cache.

of course,if you are senior engineer with rich experience on the environmental infos , you will know how to do the simple work.

but if you are a junior engineer, your manager will not assign the mandatory previleges which you need to execute some scripts in linux,

so you need sudo command to help you. your manager will tell you which sudo services is apt to help you for your need.

for example,  if I want to operate the tomcat websever, I need the execute these following commands:

sudo service 3dp start|stop|restart|status

sudo service 3dd start|stop|restart|status
sudo service fes start|stop|restart|status
sudo service tomee0 start|stop|restart|status
sudo service tomee4 start|stop|restart|status
sudo service httpd start|stop|restart|status

 

what codes does the sudo do when you execute it?

actually, sudo command is only a tool with which you can get some specific previleges to execute the specific command,

you can understand above commands as this pattern : service script scriptparameter

and for the scripts of service, you can find them in /etc/init.d/

and the detail of tomee4 is :

 

posted @ 2018-03-20 11:23  danieldai  阅读(188)  评论(0)    收藏  举报