寫在前面的話:
- 版權聲明:本文爲博主原創文章,轉載請註明出處!
- 博主是一個小菜鳥,並且非常玻璃心!如果文中有什麼問題,請友好地指出來,博主查證後會進行更正,啾咪~~
- 每篇文章都是博主現階段的理解,如果理解的更深入的話,博主會不定時更新文章。
- 本文最後更新時間:2020.6.22
正文開始
嘗試在 Chromebook 上安裝 Linux 發行版,目前找到三種方法:
- 改 BIOS,通過普通方法安裝 Linux
- 通過 crostini 安裝 Linux
Crostini 是 Chromium OS 中的一個官方項目,可以直接在 Chromebook 上運行 Linux,運行的 Linux 應該是獨立且完整的系統,但這是測試版本,只有部分機臺有該測試功能。 - 通過 crouton 安裝 Linux
Chrome OS 是基於 Linux 內核的,而 crouton 安裝 Linux 是基於chroot
的,用crouton安裝的 Linux 是精簡版本的,只裝了最基礎的系統,所以裝出來的系統只有英文,中文會顯示亂碼,需要單獨安裝中文語言環境。
英文好的可以看官方文檔,這裏有翻譯的中文文檔,嫌麻煩的可以直接往下看。
安裝流程
注意:
需要科學上網!!
1. 啓用開發者模式
2. 下載 crouton
點擊這裏下載crouton
腳本,下載下來的腳本里應該在默認的Downloads
文件夾裏。
3. 打開 shell
按下Ctrl+Alt+T
打開crosh
,輸入shell
,按下回車。
4. 安裝腳本
sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
這一步是將下載下來的腳本安裝到/usr/local/bin
這個可執行目錄裏面。
安裝完成之後,可以通過sudo crouton
查看幫助,如果出現下列報錯,可以通過-P
掛代理重試,即sudo crouton -P [代理ip]
:
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Failed to download crouton installer.
Check your internet connection or proxy settings (-P) and try again.
5. 安裝 Linux
通過以下命令安裝 Linux,下完命令之後需要等待一段時間:
sudo crouton -r buster -t xfce -m http://mirrors.163.com/debian/
中間會提示讓設置user
和password
,設置後,若出現如下內容時,就表明安裝成功:
Here's some tips:
Audio from the chroot will now be forwarded to CRAS (Chromium OS audio server),
through an ALSA plugin.
Future Chromium OS upgrades may break compatibility with the installed version
of CRAS. Should this happen, simply update your chroot.
You can flip through your running chroot desktops and Chromium OS by hitting
Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward.
You can start Xfce via the startxfce4 host command: sudo startxfce4
Unmounting /mnt/stateful_partition/crouton/chroots/buster...
Done! You can enter the chroot using enter-chroot.
如果安裝出錯,可以解決了錯誤之後,執行以下代碼繼續安裝:
sudo crouton -r buster -u
crouton 參數
-
-r
:可以指定想要使用的發行版和版本代號
crouton -r list
可以查看支持的發行版和版本代號(英文)
例如:-r buster
即指定安裝 buster -
-t
:指定要安裝的軟件包
crouton -t list
獲取全部可以安裝的包名
例如:-t xfce
用來安裝 xfce 桌面環境 -
-m
:更改鏡像源 -
-P
:開啓/關閉Chroot環境的代理,僅支持http/https -
-p
:可指定chroot的安裝位置 -
-k
:指定儲存密鑰的路徑 -
-u
:添加安裝目標 -
-e
:創建一個加密的chroot環境,或者加密一個未加密的chroot環境 -
-n
:指定Chroot環境的名字,可以創建多個chroot環境
6. 啓動 Linux
運行sudo enter-chroot startxfce4
或者sudo startxfce4
啓動xfce
Ctrl+Alt+Shift+Back(<-)
和Ctrl+Alt+Shift+Forward(->)
用來切換Chromebook和Linux
通過註銷(logout)
Xfce 退出 chroot
其他
安裝中文環境
sudo apt-get install xfonts-intl-chinese; # international fonts for X - Chinese, X系統中文國際字體
sudo apt-get install fonts-arphic-bkai00mp; # "AR PL KaitiM Big5" Chinese TrueType font by Arphic Technology
sudo apt-get install fonts-arphic-bsmi00lp; # "AR PL Mingti2L Big5" Chinese TrueType font by Arphic Technology
sudo apt-get install fonts-arphic-gbsn00lp; # "AR PL SungtiL GB" Chinese TrueType font by Arphic Technology