Cloud Shell (AWS & GCP)
Cloud shells give you a full Linux terminal in your web browser — no installation, no configuration. They are perfect for:
- Learning Linux when you cannot install software locally
- Running cloud CLI commands (aws, gcloud, az) without configuring your machine
- Quick experiments and one-off tasks
- Using Linux from any device (tablet, library computer, etc.)
AWS CloudShell
AWS CloudShell is a free browser-based terminal pre-configured with the AWS CLI.
Getting Started
- Sign in to the AWS Console
- Click the CloudShell icon in the top navigation bar (terminal icon)
- Or go to: https://console.aws.amazon.com/cloudshell/
AWS CloudShell opens an Amazon Linux 2023 terminal with your AWS credentials automatically loaded.
What’s Pre-installed
# AWS CLI (with your credentials automatically available)
aws --version
# aws-cli/2.x.x Python/3.x Amazon Linux
# Your identity is automatically configured
aws sts get-caller-identity
# {
# "UserId": "AIDA...",
# "Account": "123456789012",
# "Arn": "arn:aws:iam::123456789012:user/your-username"
# }
# Common tools
python3 --version # Python 3.9+
node --version # Node.js 18+
git --version # git 2.x
jq --version # jq 1.6
Installing Additional Tools
# Install packages with dnf (Amazon Linux 2023 uses dnf)
sudo dnf install -y htop tree nmap
# Install Python packages
pip3 install boto3 requests
# Install Node packages globally
npm install -g serve
# Download binaries directly
curl -LO https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/basics/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
kubectl version --client
Storage and Persistence
# CloudShell gives you 1 GB of persistent storage in your home directory
df -h ~
# Filesystem Size Used Avail Use% Mounted on
# overlay 1.0G 312M 712M 31% /home/cloudshell-user
# Files in ~ persist between sessions
# Files outside ~ are lost when the session ends
# Practical: store scripts and configs in ~/
mkdir -p ~/scripts ~/configs
echo '#!/usr/bin/env bash
echo "Hello from CloudShell"' > ~/scripts/hello.sh
chmod +x ~/scripts/hello.sh
Limitations
| Limitation | Detail |
|---|---|
| Idle timeout | Session disconnects after ~20 minutes idle |
| Storage | 1 GB persistent home directory |
| Network | Outbound only; cannot receive incoming connections |
| Region | CloudShell session is region-specific |
| No root | sudo works but some system changes don’t persist |
| Compute | Limited CPU/RAM (shared environment) |
Google Cloud Shell
Google Cloud Shell is the most generous free cloud terminal available — 5 GB persistent home directory and a real VM.
Getting Started
- Sign in to https://console.cloud.google.com/
- Click the Activate Cloud Shell icon (terminal icon in the top-right)
- Or go directly to: https://shell.cloud.google.com/
Google Cloud Shell runs on a Debian Linux VM with your Google Cloud credentials pre-configured.
What’s Pre-installed
# Check the environment
uname -a
# Linux cs-... Debian GNU/Linux
# Google Cloud SDK (gcloud)
gcloud --version
# Google Cloud SDK 465.0.0
# Your identity is automatically configured
gcloud auth list
# ACTIVE ACCOUNT
# * your-email@gmail.com
# Development tools
python3 --version # Python 3.11+
node --version # Node.js 20+
java --version # OpenJDK 11
go version # Go 1.21+
docker --version # Docker (Cloud Shell only)
kubectl version # kubectl
terraform --version # Terraform
git --version # git
Boost Mode
For compute-intensive tasks, enable Boost Mode:
- Click the three-dot menu in Cloud Shell → Enable Boost Mode
- Provides a higher-spec VM (more CPU/RAM)
- Standard: 1 vCPU, 1.7 GB RAM
- Boost: 6 vCPU, 45 GB RAM (limited time)
5 GB Persistent Home Directory
# Your home directory persists indefinitely
df -h ~
# Filesystem Size Used Avail Use% Mounted on
# /dev/sda1 5.0G 1.2G 3.8G 24% /home/your-username
# Clone a GitHub repo — it persists between sessions
git clone https://github.com/your-org/your-project.git ~/projects/myproject
# Install tools in ~ — they persist
mkdir -p ~/bin
curl -LO https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
mv yq_linux_amd64 ~/bin/yq
chmod +x ~/bin/yq
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Web Preview
Cloud Shell lets you preview web applications:
# Start a web server on port 8080
python3 -m http.server 8080
# In Cloud Shell, click "Web Preview" → "Preview on port 8080"
# A browser window opens showing your server's response
# Accessible from anywhere — great for demos
Limitations
| Limitation | Detail |
|---|---|
| Idle timeout | VM spins down after 1 hour idle |
| Free hours | 50 hours/week of Boost Mode; Standard is always free |
| Storage | 5 GB persistent (data deleted if inactive 120 days) |
| No persistent VMs | VM is ephemeral (home dir persists, VM does not) |
Azure Cloud Shell
Azure Cloud Shell provides both Bash and PowerShell in your browser.
Getting Started
- Sign in to https://portal.azure.com/
- Click the Cloud Shell icon in the top navigation bar
- Or go to: https://shell.azure.com/
The first time, you’ll be prompted to create a storage account (required for file persistence).
# Choose Bash when prompted (not PowerShell)
# Azure CLI is pre-configured with your identity
az account show
# {
# "name": "My Subscription",
# "user": { "name": "you@example.com" }
# }
# Tools available
az --version
kubectl version --client
terraform --version
git --version
python3 --version
Storage
Azure Cloud Shell uses a mounted Azure File Share for persistence:
# Your persistent storage
df -h ~
# 5 GB Azure Files storage mounted at ~/
# Billed as standard Azure storage (very cheap — ~$0.10/GB/month)
# Files persist indefinitely between sessions
Comparing the Three Cloud Shells
| Feature | AWS CloudShell | Google Cloud Shell | Azure Cloud Shell |
|---|---|---|---|
| Cost | Free | Free | Free (storage ~$0.05/mo) |
| Persistent storage | 1 GB | 5 GB | 5 GB (Azure Files) |
| OS | Amazon Linux 2023 | Debian Linux | Ubuntu/Debian |
| Idle timeout | 20 min | 60 min | 20 min |
| Pre-installed CLIs | aws | gcloud, kubectl, terraform | az, kubectl, terraform |
| Docker | No | Yes (limited) | No |
| Web preview | No | Yes | Yes |
| Boost/Ephemeral VM | No | Yes (6 vCPU) | No |
| Best for | AWS practice | Learning Linux + GCP | Azure practice |
Practical Workflow: Learning Linux in the Cloud
# Recommended: Use Google Cloud Shell for learning Linux
# 1. Open https://shell.cloud.google.com
# 2. Create a dedicated learning folder
mkdir -p ~/linux-learning/scripts
cd ~/linux-learning
# 3. Create and run your first shell script
cat > ~/linux-learning/hello.sh << 'EOF'
#!/usr/bin/env bash
echo "Welcome to Linux!"
echo "Today is: $(date)"
echo "You are: $(whoami)"
echo "Your home is: $HOME"
echo "Your shell is: $SHELL"
EOF
chmod +x ~/linux-learning/hello.sh
./hello.sh
# Welcome to Linux!
# Today is: Tue Apr 1 10:30:00 UTC 2025
# You are: your-username
# Your home is: /home/your-username
# Your shell is: /bin/bash
# 4. Your script is saved — close the browser, reopen, it's still there
Key Takeaways
- AWS CloudShell: free, 1 GB storage, pre-configured with aws CLI, 20-minute idle timeout
- Google Cloud Shell: free, 5 GB storage, best for learning Linux, 1-hour idle timeout, web preview
- Azure Cloud Shell: free (tiny storage cost), 5 GB storage, pre-configured with az CLI
- All three run genuine Linux — the commands you learn work on any Linux server
- Google Cloud Shell is the best choice for pure Linux learning (most storage, longest timeout, most pre-installed tools)
| ← Back to macOS Terminal Setup | Next → First Login and Prompt |