From a7359187fad2b53653605f25d1dc90ba882a33d5 Mon Sep 17 00:00:00 2001 From: zz <223355> Date: Thu, 20 Jun 2024 22:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...33\347\250\213\347\256\241\347\220\206.md" | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 "20\346\234\261\347\216\211\346\225\217/20240619-\350\277\233\347\250\213\347\256\241\347\220\206.md" diff --git "a/20\346\234\261\347\216\211\346\225\217/20240619-\350\277\233\347\250\213\347\256\241\347\220\206.md" "b/20\346\234\261\347\216\211\346\225\217/20240619-\350\277\233\347\250\213\347\256\241\347\220\206.md" new file mode 100644 index 0000000..abbbca7 --- /dev/null +++ "b/20\346\234\261\347\216\211\346\225\217/20240619-\350\277\233\347\250\213\347\256\241\347\220\206.md" @@ -0,0 +1,35 @@ +进程管理 + +1. systemctl和service + + - 启动服务 : systemctl start 服务名 service 服务名 start + + - 停止服务 : systemctl stop 服务名 service 服务名 stop + + - 重启服务 : systemctl restart 服务名 service 服务名 restart + + - 查看服务 : systemctl status 服务名 service 服务名 status + + - 重新加载配置文件 : systemctl reload 服务名 + +2. ps 列出当前正在运行的进程 + + ``` + ps -aux:显示所有用户的所有进程 + ps -ef :以完整格式显示所有进程 ( |grep 关键字) + ``` + +3. kill 终止指定进程 + + ``` + kill 进程号 + kill -9 pid(进程号) 强制终止进程 + + pstree(以树结构显示进程,要下载安装包psmisc) + ``` + +4. bg 将进程放到后台执行 + + fg 将进程放到前台执行 + +5. top 实时监控进程 \ No newline at end of file -- Gitee