Written by Paul Ogier on November 18, 2025

Installing GAM7 on Ubuntu Linux

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.

Related Posts