This lesson is part of the "TAMING GAM7 - A practical guide to GAM7 and GAMADV-XTD3" course.
This lesson will guide you through setting up GAM7 on a Chromebook with ChromeOS.
If you are trying to install GAM7 on another operating system, please refer to these articles:
GAMADV-XTD3 on Google Cloud Shell
So, you want to run GAM7 on a Chromebook? You might be thinking, "Wait, isn't GAM a heavy-duty command-line tool? Can my lightweight Chromebook actually handle that?"
The answer is a resounding YES.
Thanks to the magic of the Linux Development Environment (often called "Crostini") inside ChromeOS, your Chromebook is secretly a powerful Debian Linux machine in disguise. Whether you're an admin on the go or just love the simplicity of ChromeOS, this guide will turn your device into a Google Workspace management powerhouse.
The quality of life on ChromeOS has improved massively, so let’s dive in and get GAM7 installed, configured, and running like a dream.
A Chromebook with Linux Support: Most modern Chromebooks (since 2019) support this.
Google Workspace Super Admin Credentials: Standard requirement.
About 10GB of Free Space: For the Linux container.
Step 1: Turn on Linux (The Secret Weapon)
First, we need to unlock the Linux capabilities of your Chromebook.
Click on the time in the bottom-right corner and open Settings (the gear icon).
On the left menu, scroll down to Advanced > Developers.
You’ll see Linux development environment. Click Turn On.
Follow the setup wizard:
Username: Pick something short (e.g., admin or your name).
Disk Size: The recommended 10GB is usually plenty for GAM.
Click Install.
Grab a coffee while ChromeOS downloads and installs the Linux container. Once it’s done, a black Terminal window will pop up. This is your new home!
Step 2: Prepare the Environment
Before we install GAM, we need to update the Linux system and grab a couple of tools. ChromeOS gives us a "naked" version of Linux, so we need to dress it up a bit.
In your new Terminal window, type the following commands one by one:
sudo apt update
sudo apt install xz-utils nano
(Note: xz-utils is needed to unzip the GAM files, and nano is a text editor we'll use later.)
Step 3: Install GAM7
Now, let’s pull down the official GAM7 installer. This connects to the GAM GitHub repository and grabs the latest version for you.
Copy and paste this command into your terminal:
bash <(curl -s -S -L https://gam-shortn.appspot.com/gam-install)
The script will run and eventually ask if you want to set up a project now. Say NO (N) for now. We want to do the "Pro" configuration first to keep your files organized.
Step 4: The "Pro" Configuration (Directory Setup)
By default, GAM hides its config files. On ChromeOS, navigating hidden Linux folders can be annoying. Let’s make visible folders so you can easily drop CSV files in and get reports out.
Create your folders:
mkdir ~/GAMConfig
mkdir ~/GAMWork
Tell Linux where to look: We need to edit your shell configuration file (.bashrc).
nano ~/.bashrc
Add the Environment Variable: Scroll to the very bottom of the file (use the arrow keys) and paste this line:
export GAMCFGDIR="~/GAMConfig"
Critical Note: Linux is case-sensitive. Make sure you capitalize GAMConfig exactly as you created the folder!
Save and Exit:
Press Ctrl + X.
Press Y (for Yes).
Press Enter.
Reload the settings:
source ~/.bashrc
Step 5: Initialize GAM
Now we connect GAM to those folders we just made.
gam config drive_dir ~/GAMWork verify
If you did everything right, GAM will report that it has created a gam.cfg file in /home/yourname/GAMConfig.
Step 6: Creating the Google Cloud Project
Now for the big moment – connecting your Chromebook to Google.
gam create project
Enter your Super Admin email address.
GAM will generate a link. Ctrl + Click (or copy-paste) that link to open it in your Chrome browser.
Create the Project:
In the Google Cloud window that opens, click Create Project.
Wait for the notification that the project is created.
Configure the Client:
Go back to the terminal, copy the next link GAM gives you, and open it.
This takes you to the "Create OAuth client ID" screen.
Application Type: Desktop App.
Name: "GAM7 ChromeOS".
Click Create.
You will see a Client ID and Client Secret.
Copy Client ID -> Paste into Terminal.
Copy Client Secret -> Paste into Terminal.
Step 7: Authorization & Trust
GAM needs permission to manage your workspace.
Press c in the terminal to continue with the default API scopes (recommended).
A new browser tab will open. Select your Admin account.
The Scary Warning: You’ll see "Google hasn't verified this app."
Click Advanced.
Click Go to GAM7 ChromeOS (unsafe).
Click Allow.
Copy the code provided and paste it back into your terminal.
Step 8: Service Account Delegation
Final step! We need to authorize the Service Account so GAM can act on behalf of your users (e.g., changing Michael Scott's signature).
GAM will ask to authorize the Service Account. Say Yes.
It will fail. (Don't panic, this is normal!).
GAM will give you a link to the Admin Console and a long list of scopes.
Go to the Admin Console (Security > Access and data control > API controls > Domain-wide delegation).
Click Add new.
Client ID: Paste the Client ID GAM shows in the terminal.
OAuth Scopes: Copy the long comma-separated list from the terminal and paste it here.
Click Authorize.
Back in the terminal, press Enter to retry. It should now pass!
Step 9: Verify the Install
Let’s make sure it works. Run:
gam info domain
If you see your domain details, creation date, and user count, you have successfully turned your Chromebook into an admin console!
You can save yourself a lot of typing by setting defaults.
Edit your config file:
nano ~/GAMConfig/gam.cfg
Add your customer ID and domain under the [DEFAULT] section:
domain = yourdomain.com
customer_id = C0xxxxxx
Save (Ctrl+X, Y, Enter).
Now you don't have to type your domain every time you run a command!
FAQ
Q: How do I access my CSV files on ChromeOS?
A: Open the Files app on your Chromebook. You will see a folder on the left called Linux files. Inside there, you will see your GAMWork folder. You can drag and drop files between there and your Google Drive or Downloads!
Q: My terminal says "command not found" for GAM.
A: You might need to restart the terminal or run source ~/.bashrc one more time to make sure the alias is loaded.
Q: Can I run this on a school Chromebook?
A: Only if your school administrator has enabled "Linux Development Environment" for your user. If that option is grayed out in Settings, you are blocked.
Q: Is GAM slower on a Chromebook?
A: Not noticeably for standard tasks. Since GAM is just sending text commands to Google's APIs, even a modest Chromebook handles it perfectly fine.
You did it! You are now running enterprise-grade management tools on a laptop that boots in 6 seconds. Enjoy your new power!