-
Notifications
You must be signed in to change notification settings - Fork 38
Add /eccs/chromeos/linux/
#2014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
syobonpastel
wants to merge
5
commits into
master
Choose a base branch
from
20260605_linux
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
602742d
Add documentation for setting up and using the Linux development envi…
syobonpastel ae0932c
Refactor code structure for improved readability and maintainability
syobonpastel 77d9388
fix
syobonpastel e369f87
minor fix
syobonpastel a8acd9f
fix
syobonpastel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+122 KB
src/pages/eccs/chromeos/linux/img/backup-06-restore-pick-file.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+251 KB
src/pages/eccs/chromeos/linux/img/backup-07-restore-confirm.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.1 KB
src/pages/eccs/chromeos/linux/img/setup-02-terminal-linux-settings.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+486 KB
src/pages/eccs/chromeos/linux/img/setup-03-settings-developer.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+86.6 KB
src/pages/eccs/chromeos/linux/img/share-from-chromeos-01-linux-files.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+178 KB
src/pages/eccs/chromeos/linux/img/share-from-chromeos-02-show-hidden.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+306 KB
src/pages/eccs/chromeos/linux/img/share-from-linux-01-share-folder.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+304 KB
src/pages/eccs/chromeos/linux/img/share-from-linux-02-manage-share.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+115 KB
src/pages/eccs/chromeos/linux/img/share-from-linux-03-shared-folders-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,188 @@ | ||
| --- | ||
| title: Linux 開発環境を利用する | ||
| breadcrumb: | ||
| title: Linux | ||
| --- | ||
|
|
||
| ## 概要 | ||
|
|
||
| ChromeOSでは「Linux 開発環境」というLinuxの仮想環境が利用できます.仮想環境の中身はDebianで,それ以外のディストリビューションは利用できません.root権限があるため,様々なアプリケーションを比較的自由に利用できます. | ||
|
|
||
| {:.medium} | ||
|
|
||
| なお,設定した環境のバージョンは執筆時(2026年4月時点)のものを記載しています.タイミングによりバージョンは変わる可能性があります. | ||
|
|
||
| ## 注意点 | ||
|
|
||
| - 構築した環境は各デバイス内に保存されます.デバイス全体のストレージ容量の減少等により消去されることがあるため,バックアップの取得が必要です. | ||
| - 授業での利用にあたっては,持ち込み端末を利用する学生がいることも考慮してください.Web上で利用できるGoogle Colab,WindowsのWSL,macOSなどもあわせてご検討ください. | ||
| - 通常のLinuxと完全に同一ではなく,以下のような制限事項があります. | ||
| - ハードウェア高速化を利用した動画処理(ハードウェアエンコード・デコードなど)はできません. | ||
| - カメラ映像の取得はできません. | ||
| - USBデバイス(Androidデバイス以外やセキュリティキーなど)はサポートされておらず,利用できないことが多いです. | ||
|
|
||
| ## 使い方 | ||
|
|
||
| ### 起動 | ||
|
|
||
| #### 初回設定 | ||
| {:#first-setup} | ||
|
|
||
| 1. メニューバーのTerminalアイコンを押してください. | ||
| {:.medium} | ||
| 2. TerminalのLinuxセクションの「設定」を押してください. | ||
| {:.medium} | ||
| 3. 開いた設定の「Linux 開発環境」セクションの「設定」を押してください. | ||
| {:.medium} | ||
| 4. 「次へ」を押してください. | ||
| {:.medium} | ||
| 5. Linuxのユーザー名とディスクサイズを決めて「インストール」を押してください. | ||
| - ユーザー名はデフォルトでECCSクラウドメールのローカルパートが設定されます. | ||
| - ディスクサイズはデフォルトで10GBが設定されますが,あとから設定で変更可能です. | ||
| {:.medium} | ||
| 6. インストールが終わるまでお待ちください(1分程度かかります).インストールが終わると,ターミナルが起動してLinux 開発環境が利用できるようになります. | ||
| <figure class="gallery">{:.medium}{:.medium}</figure> | ||
|
|
||
| #### 2回目以降 | ||
|
|
||
| 1. メニューバーのTerminalアイコンを押してTerminalを開いてください. | ||
| 2. 「penguin」を押してください.設定済みのLinux 開発環境が起動します. | ||
| {:.medium} | ||
|
|
||
| 同一のデバイスであれば,一度設定したLinux 開発環境を,設定なしですぐに再度利用できます.一方,別のデバイスを利用する場合や,同一のデバイスであっても開発環境を削除した場合は,再度設定が必要です.ただし,設定後に後述の[バックアップと復元](#backup-and-restore)の手順でいったん保存しておけば,環境を復元できます. | ||
|
|
||
| ### 終了 | ||
| {:#shutdown} | ||
|
|
||
| メニューバーのTerminalアイコンを右クリックして「Linux をシャットダウン」を押してください. | ||
|
|
||
| {:.medium} | ||
|
|
||
| 終了しただけで開発環境が消去されることはありませんが,他の利用者の利用によってデバイスのストレージ容量が少なくなると,開発環境が消去されることがあります. | ||
|
|
||
| なお,ターミナル上で`sudo shutdown -h now`を実行しても,Linux 開発環境は正しく終了されないため,上記の手順を推奨します. | ||
|
|
||
| ### 再起動 | ||
|
|
||
| 終了したあとに起動し直してください. | ||
|
|
||
| ターミナル上で`sudo reboot`を実行しても,Linux 開発環境は正しく再起動されないため,上記の手順を推奨します. | ||
|
|
||
| ### 削除 | ||
|
|
||
| Linux 開発環境は,デバイスのストレージ容量が不足するなどの理由で自動的に削除されることがあります.不要になった場合などは,次の手順で手動で削除することもできます. | ||
|
|
||
| 1. メニューバーのTerminalアイコンを押してください. | ||
| 2. Linuxセクションの「管理」を押してください. | ||
| {:.medium} | ||
| 3. 設定の一番下にある「Linux 開発環境を削除」の「削除」を押してください. | ||
| 4. 確認画面でもう一度「削除」を押してください. | ||
| {:.medium} | ||
|
|
||
| ### バックアップと復元 | ||
| {:#backup-and-restore} | ||
|
|
||
| Linux 開発環境は,それぞれGoogle ドライブなどにバックアップしておくことで,他のデバイスで復元したり,他の利用者に同一の環境を配布したりすることができます. | ||
|
|
||
| #### バックアップ | ||
|
|
||
| 環境のバックアップを取得できます.バックアップはGoogle ドライブ・OneDrive・ローカルに保存できます.初回設定直後の開発環境であってもバックアップは800MB程度あるので,保存先の容量に注意してください. | ||
|
|
||
| 1. メニューバーのTerminalアイコンを押してください. | ||
| 2. Linuxセクションの「管理」を押してください. | ||
| {:.medium} | ||
| 3. 「バックアップと復元」を押してください. | ||
| {:.medium} | ||
| 4. 「バックアップ」を押してください. | ||
| 5. 保存先を指定するウィンドウが開くので,保存先を選んで「保存」を押してください. | ||
| {:.medium} | ||
| 6. バックアップが完了するまでお待ちください.バックアップファイルの横にマークが出て,進捗状況がわかります. | ||
| {:.medium} | ||
|
|
||
| #### 復元 | ||
|
|
||
| 取得したバックアップから環境を復元できます.今ある環境は削除されてしまうことに注意してください.Linux 開発環境が設定されていないデバイスでは,先に[初回設定](#first-setup)が必要です. | ||
|
|
||
| 1. メニューバーのTerminalアイコンを押してください. | ||
| 2. Linuxセクションの「管理」を押してください. | ||
| 3. 「バックアップと復元」を押してください. | ||
| 4. 「復元」を押してください. | ||
| 5. バックアップファイルを指定するウィンドウが開くので,ファイルを選んで「開く」を押してください. | ||
| {:.medium} | ||
| 6. 確認画面でもう一度「復元」を押してください. | ||
| {:.medium} | ||
| 7. 復元が完了するまでお待ちください.画面右下に通知が表示され,復元状況がわかります. | ||
| - 復元中に既存のLinux 開発環境を触ると,復元に失敗することがあるので注意してください. | ||
|
|
||
| ### フォルダの共有 | ||
|
|
||
| ChromeOSとLinux 開発環境では,相互にフォルダを共有してデータをやりとりすることができます. | ||
|
|
||
| #### ChromeOSからLinuxのフォルダにアクセスする | ||
|
|
||
| ChromeOSのファイルアプリから,Linux 開発環境のホームディレクトリ(`/home/ユーザー名`)にアクセスできます.特に設定は不要ですが,Linux 開発環境を起動していない状態ではアクセスできません. | ||
|
|
||
| {:.medium} | ||
|
|
||
| `.`から始まる隠しファイルなどを表示したい場合は,右上の「⋮」を押して「非表示のファイルを表示」を有効にしてください. | ||
|
|
||
| {:.medium} | ||
|
|
||
| #### LinuxからChromeOSのフォルダにアクセスする | ||
|
|
||
| ファイルアプリでLinuxと共有する設定を行うと,Linux側からChromeOSのフォルダにアクセスできるようになります.共有できるのはローカルのフォルダに限らず,Google DriveやOneDriveのフォルダでもかまいません.手順は次のとおりです. | ||
|
|
||
| 1. ファイルアプリで,Linuxに共有したいフォルダを右クリックして「Linux と共有」を選んでください. | ||
| {:.medium} | ||
| 2. Linux上の`/mnt/chromeos`以下に該当フォルダがマウントされ,利用可能になります. | ||
| {:.medium} | ||
| 3. 共有を停止するには,「設定」アプリの「Linux 開発環境」>「共有フォルダを管理する」から,該当フォルダの「×」ボタンを押してください. | ||
| {:.medium} | ||
|
|
||
| ### GUIの利用 | ||
|
|
||
| GUIも利用できます.WaylandとXによる画面描画がサポートされていますが,一部のアプリケーションは正しく動かない可能性があります. | ||
|
|
||
| ### アプリケーションのインストール | ||
|
|
||
| #### コマンドラインを使う方法 | ||
|
|
||
| `sudo apt install`コマンドを利用すると,`.deb`ファイルをはじめ,Debianで配布されているパッケージをインストールできます. | ||
|
|
||
| たとえばVisual Studio Codeの場合,公式サイトから`.deb`ファイルをダウンロードしたうえで,次のようにインストールできます. | ||
|
|
||
| ```sh | ||
| sudo apt install ./code_1.114.0-1775036290_amd64.deb | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 具体的なバージョン入りのファイル名でいいのでしょうか?(この記事を読むような人のリテラシーであればこれが一例にすぎないことはわかると思いますが) |
||
| ``` | ||
|
|
||
| これに限らず,Linux向けのバイナリなどを直接ダウンロードしてLinux上に配置すれば,アプリケーションを動かすことができます.ただし,実行時に必要なライブラリを追加でインストールする必要があったり,アーキテクチャの違いによっては動作しなかったりすることがあります. | ||
|
|
||
| #### GUIを使う方法 | ||
|
|
||
| GNOMEのソフトウェアアプリおよびPackageKitをインストールしておけば,GUIを使って他のアプリをインストールできます. | ||
|
|
||
| 1. 最初に一度,次のコマンドを実行して,ソフトウェアアプリとPackageKitを入れてください. | ||
|
|
||
| ```sh | ||
| sudo apt install -y gnome-software gnome-packagekit && sudo apt update | ||
| ``` | ||
| 2. 上記のインストールが完了すると,「Linux アプリ」に「ソフトウェア」および「パッケージ」「パッケージアップデーター」が追加されます. | ||
| {:.medium} | ||
| 3. 「ソフトウェア」アプリを起動すると,次のような画面になります. | ||
| <figure class="gallery">{:.medium}{:.medium}</figure> | ||
| - カテゴリごとに,様々なアプリをインストールすることができます. | ||
|
|
||
| ### ネットワーク接続 | ||
|
|
||
| Linuxからは,ChromeOSを通じてインターネットに接続できます.また,Linux上で立ち上げた開発用のWebサーバには,ChromeOS側から`http://localhost:8000/`などとしてアクセスできます. | ||
|
|
||
| ## Linux 開発環境の起動に失敗するとき | ||
|
|
||
| 復元中にLinux 開発環境を起動しようとしたり,正常にシャットダウンできなかったりしたときに,次の起動が正常にできない場合があります.その場合は,[終了](#shutdown)の手順に従ってシャットダウンしてからもう一度起動すると,解決する場合があります. | ||
|
|
||
| ## 参考資料 | ||
|
|
||
| 仕組みや詳細な仕様などは公式ドキュメントをご覧ください. | ||
|
|
||
| - [ChromeOS での Linux | Google for Developers](https://developers.google.com/chromeos/app-development/develop?hl=ja) | ||
| - [アプリや拡張機能を追加する - Chromebook ヘルプ](https://support.google.com/chromebook/topic/3415446?hl=ja) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.