--- GA: G-7GF24SD6DM --- # OS使用筆記Debian series:一些小小簡單筆記 不分類型的小小簡單筆記。 舉凡Debian、Ubuntu、Kali等等的相關設定,與設定檔案等。 ## 壹、Debian/Ubuntu:大版本(LTS)更新 ### Debian Debian對經驗者而言較簡單,修改套件來源版本就好。 ```shell= // 先更新現有系統套件,避免過於老舊直上毀損系統。 > sudo apt update > sudo apt dist-upgrade -y // 重啟一次,讓套件套用更新。 > sudo reboot ``` APT套件設定檔:`/etc/apt/sources.list` ```shell= // 此為示例輸出,僅依各版本為主。 > sudo cat /etc/apt/sources.list ``` ```text= # deb cdrom:[Debian GNU/Linux 12.7.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20240831-10:40]/ bookworm contrib main non-free-firmware deb http://opensource.nchc.org.tw/debian/ bookworm main non-free-firmware deb-src http://opensource.nchc.org.tw/debian/ bookworm main non-free-firmware deb http://security.debian.org/debian-security bookworm-security main non-free-firmware deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware # bookworm-updates, to get updates before a point release is made; # see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports deb http://opensource.nchc.org.tw/debian/ bookworm-updates main non-free-firmware deb-src http://opensource.nchc.org.tw/debian/ bookworm-updates main non-free-firmware ``` 挑一句來舉例修改: > deb http://opensource.nchc.org.tw/debian/ ***bookworm*** main non-free-firmware 修改成: > deb http://opensource.nchc.org.tw/debian/ ***trixie*** main non-free-firmware **修改說明** * 版本代號可看[維基百科發行版本列表](https://zh.wikipedia.org/zh-tw/Debian#%E5%8F%91%E8%A1%8C%E7%89%88%E6%9C%AC)所有版本,示例來說是12上13版,從`bookworm`切換至`trixie`。開發代號出自皮克斯電影《玩具總動員》。 * 其它後綴說明:`main`主分支。`non-free-firmware`含非自由軟體。 修改完成後,再次: ```shell= > sudo apt update > sudo apt dist-upgrade -y ``` 應該就會套用新版本上來。 更新完成後,可以查詢目前版本號: ```shell! sudo lsb_release -a ``` 輸出大概長這樣(此處未更新至`Trixie`):  ### Ubuntu 個人用Ubuntu機會不大,絕大部分還是使用Debian較多。 但還是簡單寫一下用過的更新方式。 老樣子先更新現有套件: ```shell= // 先更新現有系統套件,避免過於老舊直上毀損系統。 > sudo apt update > sudo apt dist-upgrade -y // 重啟一次,讓套件套用更新。 > sudo reboot ``` Ubuntu似乎簡單些,有現成的腳本程式能一鍵使用: ```shell= sudo do-release-upgrade -d ``` 會自動幫你找最新版本,也會有相關訊息跳出來說要更新/移除/替換哪些套件。 一鍵腳本 ## 貳、軟體自啟動/狀態等查詢與設定 此處要用到`systemctl`指令,若無可能要自行安裝。 ## 參、系統佔用狀態 鍵入: ```shell= top ```  ## 肆、7Zip使用 先安裝 ```shell= # apt install 7zip ``` ----- ### 文章授權 LICENSE Copyright 2024 ChanYuRick. [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) #### 說明~zh-TW~: * 讀者可以將文章內容程式原始碼轉做他用,包括但不限於商業用途、學術研究、個人與非營利使用等。 * 本文章基於CC4.0進行授權,應遵守相關條款進行引用。 #### Help~en-US~: * Readers are allowed to repurpose the source code provided in the article for other uses, including but not limited to commercial purposes, academic research, personal use, and non-profit use. * This article is licensed under CC4.0, and citations should comply with the relevant terms.
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up