Linux in the Cloud
The three largest public clouds — AWS, Google Cloud, and Microsoft Azure — all default to Linux for their compute offerings. Understanding Linux is essential for anyone working with cloud infrastructure.
Default VM Images Are Linux
When you create a virtual machine on any major cloud platform, the default options are Linux:
Amazon Web Services (EC2)
# Creating an EC2 instance from the CLI — default AMI is Amazon Linux 2023
aws ec2 run-instances \
--image-id ami-0c101f26f147fa7fd \ # Amazon Linux 2023
--instance-type t3.micro \
--key-name my-key-pair
# Connecting via SSH
ssh -i my-key.pem ec2-user@<public-ip>
ec2-user@ip-10-0-1-5:~$ uname -a
Linux ip-10-0-1-5 6.1.82-99.168.amzn2023.x86_64 ... Amazon Linux
Popular EC2 Linux images:
- Amazon Linux 2023 — AWS’s own RHEL-compatible distro
- Ubuntu 22.04 / 24.04 LTS — most popular choice
- Debian 12 — stable, widely used
- RHEL / Rocky Linux — enterprise workloads
Google Cloud (Compute Engine)
# Create a GCP VM — default is Debian Linux
gcloud compute instances create my-vm \
--image-family=debian-12 \
--image-project=debian-cloud \
--machine-type=e2-micro
# SSH access via gcloud
gcloud compute ssh my-vm
user@my-vm:~$ cat /etc/debian_version
12.5
Microsoft Azure
# Create an Azure VM — Ubuntu is the most common Linux choice
az vm create \
--resource-group myRG \
--name myVM \
--image Ubuntu2204 \
--admin-username azureuser \
--generate-ssh-keys
# SSH in
ssh azureuser@<public-ip>
azureuser@myVM:~$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Cloud Shell Environments
Each major cloud provider offers a browser-based Linux shell — no local setup required:
| Platform | Cloud Shell | Included Tools |
|---|---|---|
| AWS CloudShell | Available in browser | AWS CLI, Python, Node.js, git |
| Google Cloud Shell | Always-on, 5 GB persistent | gcloud, kubectl, Terraform, git |
| Azure Cloud Shell | Bash or PowerShell | Azure CLI, kubectl, Terraform |
Cloud Shell gives you a real Linux terminal in your browser:
# Google Cloud Shell — accessed from console.cloud.google.com
Welcome to Cloud Shell! Type "help" to get started.
youremail@cloudshell:~ (my-project)$ uname -a
Linux cs-1234 5.10.0 ... Debian GNU/Linux 11
# Run kubectl, gcloud, terraform — everything pre-installed
kubectl get nodes
gcloud projects list
terraform --version
This is extremely useful for learning Linux in the cloud — no local install needed.
Serverless Runtimes Run on Linux
Serverless functions (AWS Lambda, Google Cloud Functions, Azure Functions) execute your code inside Linux-based micro-VMs or containers:
AWS Lambda Runtime Environments
# This Python Lambda function runs on Amazon Linux 2
import os
def handler(event, context):
# The runtime is Linux — you can use Linux syscalls
print(os.uname())
# posix.uname_result(sysname='Linux', nodename='...', ...)
return {"statusCode": 200, "body": "Hello from Linux!"}
Lambda runtime environments:
- Python 3.12 → Amazon Linux 2023
- Node.js 20 → Amazon Linux 2023
- Java 21 → Amazon Linux 2023
- Go 1.21 → Amazon Linux 2023
Understanding Linux file paths, permissions, and environment variables matters even in serverless — your function reads config from /tmp, needs specific file permissions, and uses Linux environment variables.
Managed Kubernetes Node Pools Are Linux
Managed Kubernetes services (EKS, GKE, AKS) provision Linux worker nodes by default:
# EKS node group — Amazon Linux 2 by default
aws eks describe-nodegroup \
--cluster-name my-cluster \
--nodegroup-name standard-workers \
--query 'nodegroup.amiType'
# "AL2_x86_64" ← Amazon Linux 2
# GKE node pool — Container-Optimized OS (ChromiumOS/Linux based)
gcloud container node-pools describe default-pool \
--cluster my-cluster \
--format="value(config.imageType)"
# COS_CONTAINERD ← Container-Optimized OS (Linux)
# AKS node pool — Ubuntu Linux
az aks nodepool show \
--resource-group myRG \
--cluster-name myAKS \
--name nodepool1 \
--query 'osType'
# "Linux"
All three major managed Kubernetes services default to Linux worker nodes. Windows node pools are available but optional and much less common.
Why Cloud = Linux
| Reason | Explanation |
|---|---|
| Cost | No licensing fees — saving millions at scale |
| Performance | Linux kernel is highly optimised for server workloads |
| Container support | Containers ARE Linux — native kernel support |
| Automation | Shell scripting, cron, systemd — all Linux-native |
| Security | Mature permission model, SELinux/AppArmor, auditd |
| Ecosystem | Every cloud tool is built and tested on Linux first |
Key Takeaways
- AWS, GCP, and Azure all default to Linux VMs when creating compute instances
- Every major cloud offers a browser-based Linux terminal (Cloud Shell) — great for learning
- Serverless runtimes (Lambda, Cloud Functions) run your code on Linux
- Managed Kubernetes (EKS, GKE, AKS) worker nodes default to Linux
- Linux is the dominant OS in cloud computing, not Windows
| ← Back to Linux in DevOps | Next → Automation Use Cases |