From 842eca2a73baad6972f7bb20561454df5ffb04c3 Mon Sep 17 00:00:00 2001 From: deipss Date: Mon, 25 Mar 2024 20:55:28 +0800 Subject: [PATCH] ubunt8 --- docs/command/ubuntu.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/command/ubuntu.md b/docs/command/ubuntu.md index fe08fd9..789df36 100644 --- a/docs/command/ubuntu.md +++ b/docs/command/ubuntu.md @@ -12,8 +12,9 @@ lsb_release -a lscpu ``` -# 2. ubuntu start on reboot +# 2. ubuntu systemctl ```shell +# start with reboot systemctl enable nginx.service systemctl enable supervisord @@ -22,6 +23,27 @@ systemctl disable supervisord systemctl is-enabled nginx systemctl is-enabled supervisord +# show all +systemctl list-unit-files --type service -all + +# start +systemctl start +systemctl stop +systemctl restart +systemctl status + + +``` + +# ubuntu services + +```shell +service --status-all +service start +service stop +service restart +service status + ``` # 3. ubuntu install jdk @@ -39,7 +61,7 @@ export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH ``` -## 3.1. ubuntu网络防火端设置信息 +# 3.1. ubuntu网络防火端设置信息 ```shell sudo ufw allow 22/tcp @@ -55,6 +77,9 @@ sudo ufw delete allow 21/tcp sudo ufw delete allow 23/tcp sudo ufw delete allow 80/tcp ``` + + + # 4. 系统环境