最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

Linux Command Related with Process

Linux crifan 1753浏览 0评论

Linux Command Related with Process

Following tables most commonly used command(s) with process:

For this purposeUse this CommandExamples*
To see currently running processps$ ps
To stop any process by PID i.e. to kill processkill    {PID}$ kill 1012
To stop processes by name i.e. to kill processkillall   {Process-name}$ killall httpd
To get information about all running processps -ag$ ps -ag
To stop all process except your shellkill 0$ kill 0
For background processing (With &, use to put particular command and program in background)linux-command &$ ls / -R | wc -l &
To display the owner of the processes along with the processesps aux$ ps aux
To see if a particular process is running or not. For this purpose you have to use ps command in combination with the grep command

ps ax | grep process-U-want-to see

For e.g. you want to see whether Apache web server process is running or not then give command

$ ps ax | grep httpd

To see currently running processes and other information like memory and CPU usage with real time updates.top
See the output of top command.

$ top

Note that to exit from top command press q.

To display a tree of processespstree$ pstree

* To run some of this command you need to be root or equivalnt user.

NOTE that you can only kill process which are created by yourself. A Administrator can almost kill 95-98% process. But some process can not be killed, such as VDU Process.

转载请注明:在路上 » Linux Command Related with Process

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
81 queries in 0.245 seconds, using 22.12MB memory