這是本文件的舊版!
Ubuntu 操作整理
更改 hostname
- Exp. 設定 hostname 為 iServStorM1
sudo su - vi /etc/hosts
127.0.0.1 localhost 127.0.1.1 iServStorM1 :
vi /etc/hostname
iServStorM1
hostname -F /etc/hostname
- 參考網址 -
Server 版安裝圖形操作介面
sudo apt-get install --no-install-recommends ubuntu-desktop
- 參考網址 -
清除系統檔案空間
- System Journal Logs Ref - https://ubuntuhandbook.org/index.php/2020/12/clear-systemd-journal-logs-ubuntu/
- 查看目前已使用空間
root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --disk-usage Archived and active journals take up 4.0G in the file system.
- 即時清除保留兩天
root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --rotate root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --vacuum-time=2days : root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --disk-usage Archived and active journals take up 16.0M in the file system.
- 設定最多使用空間 Exp. 500M
vi /etc/systemd/journald.conf
: [Journal] : SystemMaxUse=500M :
systemctl daemon-reload