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:

GAM7 on Windows

GAM7 on macOS

GAM7 on Ubuntu Linux

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.

What You'll Need

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!

Pro Tip: Edit your gam.cfg

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!

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 Windows 11 Machine.

If you are trying to install GAM7 on another operating system, please refer to these articles:

GAM7 on Windows

GAM7 on macOS

GAMADV-XTD3 on Google Cloud Shell

GAM7 on ChromeOS

Welcome, Linux users! 

Check for curl: Try running curl --version. If it yells at you, install it

sudo apt update && sudo apt install curl

Run the GAM7 Installer: Copy and paste this command to fetch the latest version of GAM7

bash <(curl -s -S -L https://gam-shortn.appspot.com/gam-install)

mkdir ~/GAMConfig
mkdir ~/GAMWork


Check your shell: 

echo $0

If it says bash, you’re in the right place.
Edit your .bashrc file: We’ll use nano, a simple text editor.

nano ~/.bashrc


Add the Environment Variable: Scroll to the very bottom of the file and paste this line:

export GAMCFGDIR="~/GAMConfig"


Save and Exit: Press Ctrl + X. Press Y (for Yes). Press Enter. Reload the Shell: Make those changes stick by running:

source ~/.Basic


Run this command:

gam config drive_dir ~/GAMWork verify


GAM will generate a fresh gam.cfg file inside your ~/GAMConfig folder. You are now perfectly set up!

gam create project

Enter your Super Admin email. GAM will provide a link. Click it (or copy-paste it if you are SSH'd into a headless server). Create the Project:In the browser, click Create Project. Wait for Google to do its thing (it might take a minute). Configure the OAuth Client:Click the link GAM provides to go to the Google Cloud Console.

Go to APIs & Services > Credentials.Click Create Credentials > OAuth client ID.

Application Type: Desktop App.
Name: "GAM7 Linux" (or whatever you like).
Click Create.

Press c to continue (unless you have specific restrictions, enabling all defaults is best).

Click the link to open the Google Permissions screen.

Trust Yourself: You’ll see a warning: "Google hasn’t verified this app." 

That’s because you made the app!Click Advanced.

Click Go to GAM7 Linux (unsafe).

Click Allow.

Copy the authorization code and paste it back into your terminal.


It will fail. This is expected!

It fails because we haven't granted the rights in the Admin Console yet.

GAM will spit out a long link to the Admin Console and a list of API 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 provided by GAM in your terminal.

OAuth Scopes: Copy the entire comma-separated list of URLs from your terminal and paste them here.

Click Authorize.

Back in your terminal, tell GAM to try again. It should now pass with flying colors!

gam info domain


If you see your domain name, creation time and user count – congratulations! You have successfully installed GAM7 on Ubuntu Linux.

nano ~/GAMConfig/gam.cfg

Add your domain and customer ID:


domain = yourdomain.com
customer_id = C0xxxxxxx
timezone = local


Save and exit. Now, instead of typing 

gam update user michael@yourdomain.com

you can just type 

gam update user michael

A: You likely need to reload your shell profile. Run source ~/.bashrc or close and reopen your terminal window.

Q: I'm getting a "Time delta" error. 

A: GAM requires your Linux machine's system time to be within 1 second of Google's servers. Check your time settings (NTP) and sync your clock!

Q: Can I use this on other Linux distros like CentOS or Fedora? 

A: Absolutely. The install script works on most major distributions. You just might need to use yum or dnf instead of apt to install curl.

Q: Why do I need to "Trust" the app if I made it? 

A: Google treats any unverified app as "unsafe" by default. Since you are using this tool internally for your own organization, it is safe to trust it.

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 macOS machine.

If you are trying to install GAM on another operating system, please refer to these articles:

GAM7 on Windows 11

GAM7 on Ubuntu Linux

GAMADV-XTD3 on Google Cloud Shell

GAM7 on ChromeOS

Welcome back, Mac admins! Today we are looking at GAM7. Not GAM, not GAMADV-XTD3, just the all-powerful, unified GAM7 on macOS.

If you’ve been managing Google Workspace with the old tools, you might know that the standard GAM and the advanced GAMADV-XTD3 have merged into one super-tool. If you’re ready to upgrade or install it from scratch on your Mac to become a command-line wizard, you are in the right place.

I’m going to walk you through this step-by-step. We’ll tackle the installation, the configuration (the "pro" way), and the authorisation. Open up your Terminal, grab a coffee, and let’s get your GAM on!

What You'll Need

Before we fire up the Terminal, let's make sure you have your supplies:

  1. A Mac: Obviously! (Intel or Apple Silicon work fine).
  2. Google Workspace Super Admin Rights: You need the keys to the kingdom to set this up.
  3. Terminal Access: You can find this in your Applications > Utilities folder.
  4. A Text Editor: Nano works, but if you prefer Visual Studio Code or TextEdit, have those ready.

Step-by-Step Installation Guide

Step 1: The Magic Install Command

We aren’t going to manually download files and drag them around. We’re going to use the official install script.

1. Open your Terminal.

2. Copy and paste the following command (this is the standard GAM install command):

<(curl -s -S -L https://gam-shortn.appspot.com/gam-install)

3. Hit Enter.

Heads Up: If this is a fresh Mac, you might get a pop-up saying "Python 3 command requires the command line developer tools."

Once the tools are installed, run that install command again. It will extract GAM7 to your home directory (usually ~/bin/gam7).

Step 2: Setting Up Your Configuration Directory (The "Pro" Way)

The installer will ask if you want to set up a project now. Say "No" (N) for a second. Why? Because we want to set up a clean, professional folder structure first, just like the pros do.

By default, GAM hides config files in a hidden .gam folder. We want them visible and manageable.

Create a Config Folder: In your terminal

mkdir -p ~/GAMConfig

Tell macOS where to look: We need to edit your shell profile (usually .zshrc on modern Macs). You can use nano.

Add this line to the bottom of the file

export GAMCFGDIR="~/GAMConfig"

Save and close the file.

Reload your profile so the Mac knows about the change

source ~/.zshrc

Step 3: Setting Up Your Working Directory

Next, let’s make a "Working" directory. This is where you’ll keep your CSVs for bulk uploads and where GAM will save reports. It keeps your actual program files clean.

Run this command to make the folder

mkdir -p ~/GAMWork

Now, initialize GAM with this new path

gam config drive_dir ~/GAMWork verify

GAM will now generate a gam.cfg file inside your new ~/GAMConfig folder. You are now officially configured!

Step 4: Create Your Google Cloud Project

Now it’s time to introduce GAM to Google.

Run: 

gam create project

Enter your Super Admin email address.

GAM will open a browser tab. Sign in.

Create the Project: Click the "Create Project" button when prompted.

Create the Client:

Go to "APIs & Services" > "Credentials".

Click Create Credentials > OAuth client ID.

Select Desktop App .

Name it something cool like "GAM7 Mac".

Click Create.

Step 5: The Client ID & Secret (Don't Lose These!)

You will see a pop-up with your Client ID and Client Secret.

Important: Treat that Client Secret like a password. Don't share it!

Step 6: Authorization & Scopes

GAM will now ask for permission to manage your domain.

  1. It will show a list of APIs (Calendar, Drive, Gmail, etc.).
  2. Unless you have a specific reason not to, press c to continue with the default full access.
  3. A browser window will open. Select your admin account.
  4. The "Unverified App" Screen: You will see a scary warning saying "Google hasn't verified this app." This is normal—because you just created the app!
  5. Click Advanced > Go to GAM7 Mac (unsafe).
  6. Click Continue and Allow.
  7. Copy the authorization code provided and paste it back into Terminal.

Step 7: Service Account & Domain-Wide Delegation

This is the final boss battle. We need to give a Service Account permission to act on behalf of your users.

  1. In Terminal, GAM will ask if you want to authorize the Service Account. Say Yes.
  2. It will fail the first time and give you a link to the Admin Console.
  3. Open that link (it takes you to Security > Access and data control > API controls > Domain-wide delegation).
  4. Click Add new.
  5. Client ID: GAM will display the Client ID in your terminal. Copy and paste it.
  6. OAuth Scopes: GAM will print a massive comma-separated list of URLs in your terminal. Copy that entire block.
  7. Paste it into the "OAuth Scopes" field in the Admin Console.
  8. Click Authorize.

Step 8: Verify the Install

Back in your Terminal, tell GAM to check everything one last time. It might verify the time sync (your Mac needs to be within 1 second of Google's time servers!) and check the scopes.

Once it says "Pass," you are ready to roll. Test it with:

gam info domain

If you see your domain details pop up, congratulations! You have successfully installed GAM7 on macOS.


Tips, Tricks, and Troubleshooting


FAQ

Q: Can I install GAM7 if I already have the old GAM? 
A: Yes! The installer will detect it. However, creating the new GAMConfig folder structure (Step 2) helps keep the new installation clean and separate from legacy data.

Q: Do I need to use Terminal every time? 
A: Yes, GAM is a command-line tool. But don't worry, you can copy and paste commands from a text editor if you prefer drafting them there first.

Q: Why did the install "fail" on the Service Account step? 
A: That is expected! GAM tries to check for access before you grant it. It fails to show you exactly what is missing, which prompts you to go to the Admin Console and add the scopes.

Q: I'm getting a "command not found" error. 
A: Ensure you reloaded your profile using source ~/.zshrc or restart your Terminal completely after installing.


How was that? Easier than you thought, right? Happy GAM-ing!