Linux进程的启动重启关闭

启动进程

┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$pgrep -la maxs
976 /usr/bin/maxscale
┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$echo $(cat /proc/976/cmdline)
/usr/bin/maxscale
┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$ll /proc/976/exe
lrwxrwxrwx 1 maxscale maxscale 0 10月 19 16:32 /proc/976/exe -> /usr/bin/maxscale
┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$/usr/bin/maxscale

重启进程

┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$pgrep -la maxs
┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$kill -1 976

关闭进程

┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$pgrep -la maxs
976 /usr/bin/maxscale
┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$kill 976 ^C
┌──[root@vms152.liruilongs.github.io]-[/proc/976]
└─$kill -9 976 ^C
posted @ 2022-10-21 10:53  山河已无恙  阅读(284)  评论(0编辑  收藏  举报