ubuntu 必用工具

apt install curl

[永久關閉不必要的服務]
apt-get install -y sysv-rc-conf
2.執行
$sudo sysv-rc-conf
apt-get install -y ntpdate ntpntpdate time.stdtime.gov.tw

排序目錄大小
du -sh * | sort -rn
du -s * | sort -rn | head -10

服務啟動的另外一種方式
systemctl start nginx
systemctl start nginx.service
systemctl stop nginx
systemctl reload nginx
systemctl restart nginx
systemctl status nginx

要將一個服務啟動為系統啟動時的自啟動服務,現在只要執行以下命令:
systemctl enable nginx.service (.service可省略如下)
systemctl enable nginx

要禁用自啟動,只要disable即可。
systemctl disable nginx.service
systemctl disable nginx

使用is-enabled來檢查服務是否已經啟動了自啟動
systemctl is-enabled nginx
# enabled/disabled

is-active檢查一個服務是否啟動:
systemctl is-active nginx