You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/laptops-and-desktops/chrome-os-lxc/_index.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,44 +1,42 @@
1
1
---
2
-
title: Install Ubuntu on ChromeOS Crostini as an LXC Container
3
-
4
-
draft: true
5
-
cascade:
6
-
draft: true
2
+
title: Install Ubuntu on ChromeOS Crostini as an LXC container
7
3
8
4
minutes_to_complete: 60
9
5
10
6
who_is_this_for: This Learning Path is for software developers who want to install Ubuntu and other Linux distributions on their Arm-based Chromebook with ChromeOS file sharing and GUI support.
11
7
12
8
learning_objectives:
13
-
- Create an Ubuntu 24.04 container on ChromeOS Crostini using the Termina shell and LXC.
14
-
- Set up ChromeOS integration for file sharing and GUI applications.
15
-
- Manage LXC containers on ChromeOS.
9
+
- Create and run an Ubuntu 24.04 container on ChromeOS Crostini using LXC and Termina shell
10
+
- Set up ChromeOS integration for file sharing and GUI applications
11
+
- Manage LXC containers on ChromeOS
12
+
- Enable file sharing between ChromeOS and Ubuntu containers
13
+
- Run Linux GUI applications on your Chromebook with Sommelier integration
16
14
17
15
prerequisites:
18
16
- A ChromeOS device with the Linux development environment enabled. The Lenovo Chromebook Plus 14 is recommended.
title: "Create an Ubuntu 24.04 container on ChromeOS"
3
3
weight: 2
4
4
layout: "learningpathall"
5
5
---
6
6
7
-
The [Lenovo Chromebook Plus 14](https://www.bestbuy.com/site/lenovo-chromebook-plus-14-oled-2k-touchscreen-laptop-mediatek-kompanio-ultra-16gb-memory-256gb-ufs-seashell/6630493.p?skuId=6630493&intl=nosplash) is is powered by the MediaTek Kompanio Ultra processor, featuring an Arm-based MediaTek Kompanio Ultra processor, offers software developers a powerful and energy-efficient platform for Linux development. Its compatibility with containerized environments and support for ChromeOS Linux (Crostini) make it an excellent choice for coding, testing, and running modern development workflows on the go.
7
+
## Overview
8
8
9
-
This Learning Path will walk you through setting up an Ubuntu 24.04 container on your Arm-based Chromebook using ChromeOS's built-in Linux development environment. You'll learn how to create and manage containers, install essential development tools, and integrate your Ubuntu environment with ChromeOS features like file sharing and GUI application support. By the end, you'll have a flexible and powerful Arm Linux development environment.
9
+
The [Lenovo Chromebook Plus 14](https://www.bestbuy.com/site/lenovo-chromebook-plus-14-oled-2k-touchscreen-laptop-mediatek-kompanio-ultra-16gb-memory-256gb-ufs-seashell/6630493.p?skuId=6630493&intl=nosplash) is powered by the Arm-based MediaTek Kompanio Ultra processor. It provides a powerful and energy-efficient platform for Linux development, with strong compatibility for containerized environments and ChromeOS Linux (Crostini). This makes it an excellent choice for coding, testing, and running modern development workflows on the go.
10
+
11
+
This Learning Path walks you through setting up an Ubuntu 24.04 container on your Arm-based Chromebook using ChromeOS's built-in Linux development environment. You'll learn how to create and manage containers, install essential development tools, and integrate your Ubuntu environment with ChromeOS features like file sharing and GUI application support. By the end, you'll have a flexible and powerful Arm Linux development environment.
10
12
11
13
## Access the ChromeOS terminal
12
14
13
15
The first step to creating an Ubuntu container on ChromeOS is to open the ChromeOS shell.
14
16
15
-
Open the Chrome browser and press **Ctrl + Alt + T** to open crosh, the ChromeOS shell, crosh.
17
+
Open the Chrome browser and press **Ctrl + Alt + T** to open crosh, the ChromeOS shell.
The name of the Debian container is penguin. When you enable the Linux subsystem on ChromeOS the Debian container named penguin is created, but you can create additional containers with different Linux distributions and different names.
47
+
The name of the Debian container is `penguin`. When you enable the Linux subsystem on ChromeOS, the Debian container is created automatically, but you can create additional containers with different Linux distributions and different names.
46
48
47
-
## Create a Ubuntu 24.04 container
49
+
## Create an Ubuntu 24.04 container
48
50
49
-
This command creates and starts a new Ubuntu 24.04 container named `u1`.
51
+
This command creates and starts a new Ubuntu 24.04 container named `u1`:
50
52
51
53
```bash
52
54
lxc launch ubuntu:24.04 u1
53
55
```
54
56
55
-
The output is:
57
+
Expected output:
56
58
57
59
```output
58
60
Creating u1
59
61
Starting u1
60
62
```
61
63
62
-
Check the status of the new container and confirm the status is RUNNING.
64
+
Check the status of the new container and confirm the status is `RUNNING`:
Once inside the Ubuntu container, you need to perform some initial setup tasks.
90
+
Once inside the Ubuntu container, perform initial setup tasks.
89
91
90
-
Update the package lists and upgrade installed packages to the latest versions.
92
+
Update package lists and upgrade installed packages:
91
93
92
94
```bash
93
95
apt update && apt upgrade -y
94
96
```
95
97
96
-
Install essential packages for development and system management. You can select your favorite software packages, these are examples.
98
+
Install essential packages for development and system management.
99
+
100
+
{{% notice Note %}}
101
+
You can select your favorite software packages, these are examples.
102
+
{{% /notice %}}
103
+
97
104
98
105
```bash
99
106
apt install -y net-tools gcc
100
107
```
101
108
102
-
Creating a non-root user is a crucial security best practice and ensures that applications don't have unnecessary administrative privileges. The username `ubuntu` is already available in the container. You are free to use `ubuntu` as your non-root user or create a new user.
109
+
Creating a non-root user is a crucial security best practice and ensures that applications don't have unnecessary administrative privileges. The username `ubuntu` is already available, but you can create another user.
103
110
104
111
{{% notice Note %}}
105
-
The following commands use `user1` as a new username. You can replace it with your actual desired username in all subsequent steps.
112
+
The following commands use `user1` as the username. Replace it with your own choice in subsequent steps.
106
113
{{% /notice %}}
107
114
108
-
Create a new user account. Skip if you want to use the `ubuntu` user.
115
+
Create a new user account (skip if you want to use the `ubuntu` user):
109
116
110
117
```bash
111
118
adduser user1
@@ -123,10 +130,12 @@ Switch to your new user account to continue the setup.
123
130
su - user1
124
131
```
125
132
126
-
If you didn't creat a new user switch to `ubuntu`as the non-root user.
133
+
If you didn’t create a new user, switch to the default `ubuntu` user:
127
134
128
135
```bash
129
136
su - ubuntu
130
137
```
131
138
139
+
## Next steps
140
+
132
141
Continue to learn how to integrate the new Ubuntu container with ChromeOS features like file sharing.
## File sharing between ChromeOS and Linux containers
8
8
9
9
Chromebooks with Linux offer convenient file sharing capabilities between the main ChromeOS environment and the Linux subsystem.
10
10
11
-
Key Features:
11
+
Key features:
12
12
13
-
- Selective Folder Sharing: ChromeOS allows you to share specific folders (not individual files) from the native files app with the Linux container. This is done by right-clicking a folder and selecting "Share with Linux." Once shared, these directories become accessible to Linux apps and the command line within the Linux environment.
14
-
15
-
- Two-Way Access: Files and folders created within the Linux container appear in the "Linux files" section of the ChromeOS Files app, enabling seamless movement of data between environments.
16
-
17
-
- Sandboxed Security: The Linux environment is sandboxed for security, meaning it doesn't have access to the full ChromeOS file system by default. Only the folders explicitly shared by the you are visible in Linux, ensuring protected data separation.
18
-
19
-
- Easy Integration: Shared folders can be navigated from Linux at paths such as /mnt/chromeos/MyFiles/. Applications and command-line tools within Linux can read and write to these shared folders.
20
-
21
-
- Management Tools: You can manage and revoke shared folder access through the ChromeOS Files app, allowing for flexible control over what is accessible to Linux.
13
+
-**Selective folder sharing**: ChromeOS allows you to share specific folders (not individual files) from the native Files app with the Linux container. This is done by right-clicking a folder and selecting **Share with Linux**. Once shared, these directories become accessible to Linux apps and the command line within the Linux environment.
14
+
-**Two-way access**: Files and folders created within the Linux container appear in the **Linux files** section of the ChromeOS Files app, enabling seamless movement of data between environments.
15
+
-**Sandboxed security**: The Linux environment is sandboxed for security, meaning it doesn't have access to the full ChromeOS file system by default. Only the folders explicitly shared by you are visible in Linux, ensuring protected data separation.
16
+
-**Easy integration**: Shared folders can be navigated from Linux at paths such as `/mnt/chromeos/MyFiles/`. Applications and command-line tools within Linux can read and write to these shared folders.
17
+
-**Management tools**: You can manage and revoke shared folder access through the ChromeOS Files app, allowing for flexible control over what is accessible to Linux.
22
18
23
19
These features make it simple to move files between ChromeOS and Linux applications while maintaining security and user control.
24
20
25
-
## Configure File System Integration
21
+
## Configure ChromeOS file system integration
26
22
27
23
### Share ChromeOS directories
28
24
29
-
To access your ChromeOS files from within the Ubuntu container, you need to configure shared directories.
25
+
To access your ChromeOS files from within the Ubuntu container, you need to configure shared directories.
30
26
31
-
You can share directories using the ChromeOS File application. Rightclick on any directory and select **Share with Linux**.
27
+
You can share directories using the ChromeOS Files application. Right-click on any directory and select **Share with Linux**.
32
28
33
-
If you share a ChromeOS directory it appears in `/mnt/chromeos/MyFiles/` in your Ubuntu container. For example, share your Downloads directory in ChromeOS and it is visible in Ubuntu.
29
+
If you share a ChromeOS directory, it appears in `/mnt/chromeos/MyFiles/` in your Ubuntu container. For example, share your Downloads directory in ChromeOS and it is visible in Ubuntu:
34
30
35
31
```bash
36
32
ls /mnt/chromeos/MyFiles/Downloads/
37
33
```
38
34
39
35
### Share Google Drive directories
40
36
41
-
You can also share Google Drive directories using the ChromeOS Files application. Use the same rightclick and select **Share with Linux**.
37
+
You can also share Google Drive directories using the ChromeOS Files application. Use the same right-click and select **Share with Linux**.
42
38
43
-
If you share a Google Drive folder it appears in `/mnt/chromeos/GoogleDrive/MyDrive/` in your Ubuntu container. For example, share your `AndroidAssets` directory in Google Drive it is visible in Ubuntu.
39
+
If you share a Google Drive folder, it appears in `/mnt/chromeos/GoogleDrive/MyDrive/` in your Ubuntu container. For example, share your `AndroidAssets` directory in Google Drive and it is visible in Ubuntu:
44
40
45
41
```bash
46
42
ls /mnt/chromeos/GoogleDrive/MyDrive/AndroidAssets
47
43
```
48
44
49
-
Your shared folders appear in the **Linux Settings** under **Manage shared folders** as shown below:
45
+
Your shared folders appear in the **Linux settings** under **Manage shared folders** as shown below:
0 commit comments