Language lab · Intermediate → Advanced
🏢 On-premises infrastructure
Concept → trace → write code → run tests → explain why → improve → mini-project. Start in the browser if you like; set up your own computer when you are ready.
📖 Topics with real code (12)
Every verified output below was produced by running the code with guided (run on your own machine or account) on 6 Nov 2026. Open a topic to edit the code and run it on your own computer.
🌱 Beginner (3)
Server room basics
On-premises means the servers are in your own building: racks, UPS power, cooling and network switches. You own the hardware, the patching and the backups.
# A typical small on-prem stack (no commands: the checklist an administrator follows) # 1. Rack: servers, top-of-rack switch, firewall, UPS, PDU # 2. Power: dual supplies on separate circuits, UPS runtime ≥ 10 minutes, generator for long outages # 3. Cooling: keep inlet air 18–27 °C (ASHRAE), hot and cold aisles # 4. Labels and a diagram for every cable and port
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
IP addressing and subnets
Private ranges (10.x, 172.16–31.x, 192.168.x) are used inside the building. A /24 subnet has 254 usable addresses. Plan separate subnets (VLANs) for servers, staff and guests.
# Example plan for a school # VLAN 10 Servers 10.0.10.0/24 gateway 10.0.10.1 # VLAN 20 Staff 10.0.20.0/24 gateway 10.0.20.1 # VLAN 30 Students 10.0.30.0/23 (510 hosts) # VLAN 99 Guests 10.0.99.0/24 internet only ipcalc 10.0.30.0/23
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
DNS and DHCP
DHCP hands out addresses automatically; DNS turns names into addresses. On Windows Server these are roles; on Linux, dnsmasq or ISC Kea and BIND are common.
Install-WindowsFeature DHCP, DNS -IncludeManagementTools Add-DhcpServerv4Scope -Name 'Staff' -StartRange 10.0.20.50 -EndRange 10.0.20.250 -SubnetMask 255.255.255.0 Add-DnsServerResourceRecordA -ZoneName 'school.local' -Name 'files' -IPv4Address 10.0.10.20 nslookup files.school.local
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
🌿 Intermediate (5)
Active Directory
AD keeps users, computers and groups in one directory, applies Group Policy and lets people sign in anywhere on the network.
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools Install-ADDSForest -DomainName 'school.local' -InstallDns New-ADOrganizationalUnit -Name 'Students' -Path 'DC=school,DC=local' New-ADUser -Name 'Asha R' -SamAccountName asha -Path 'OU=Students,DC=school,DC=local' -Enabled $true -AccountPassword (Read-Host -AsSecureString) Get-ADUser -Filter * -SearchBase 'OU=Students,DC=school,DC=local' | Measure-Object
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
Virtualisation (Hyper-V, Proxmox, VMware)
A hypervisor runs many virtual machines on one physical server. Snapshots allow quick rollback; templates create new VMs in minutes.
New-VM -Name 'web01' -MemoryStartupBytes 4GB -Generation 2 -NewVHDPath 'D:\VMs\web01.vhdx' -NewVHDSizeBytes 60GB -SwitchName 'LAN' Checkpoint-VM -Name 'web01' -SnapshotName 'before-update' qm create 101 --name web01 --memory 4096 --cores 2 --net0 virtio,bridge=vmbr0 # Proxmox qm snapshot 101 before-update
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
Storage: RAID and NAS
RAID combines disks for speed or safety: RAID 1 mirrors, RAID 5/6 adds parity, RAID 10 mirrors and stripes. RAID is not a backup. A NAS shares storage over SMB or NFS.
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc cat /proc/mdstat mkfs.ext4 /dev/md0 && mount /dev/md0 /srv/share # RAID 5 with 4 × 4 TB disks gives 12 TB usable and survives one disk failure
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
Backups: the 3-2-1 rule
Keep 3 copies of data, on 2 different media, with 1 off-site (or in the cloud). Test restores regularly: an untested backup is only a hope.
restic -r /mnt/nas/backups init restic -r /mnt/nas/backups backup /srv/share --tag nightly restic -r /mnt/nas/backups snapshots restic -r /mnt/nas/backups restore latest --target /tmp/restore-test
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
Patching and updates
Unpatched servers are the most common way in for attackers. Test updates on one machine, then roll out in a maintenance window, with a rollback plan.
sudo apt update && apt list --upgradable sudo unattended-upgrade --dry-run Install-Module PSWindowsUpdate; Get-WindowsUpdate; Install-WindowsUpdate -AcceptAll -AutoReboot:$false
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
🌳 Advanced (4)
Monitoring and alerting
Collect metrics (CPU, disk, temperature) and logs centrally, and alert before users notice. Prometheus + Grafana or Zabbix are popular open-source choices.
# node_exporter on each Linux server, then in prometheus.yml:
# - job_name: servers
# static_configs: [{ targets: ['web01:9100', 'db01:9100'] }]
# alert when a disk will fill within 24 h:
# predict_linear(node_filesystem_avail_bytes[6h], 24*3600) < 0
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
Firewalls and VPN
A perimeter firewall (pfSense, OPNsense, vendor appliances) filters traffic between VLANs and the internet. Remote staff connect over a VPN such as WireGuard.
wg genkey | tee privatekey | wg pubkey > publickey # /etc/wireguard/wg0.conf on the gateway: # [Interface] Address = 10.99.0.1/24, ListenPort = 51820, PrivateKey = <server key> # [Peer] PublicKey = <laptop key>, AllowedIPs = 10.99.0.2/32 sudo wg-quick up wg0 && sudo wg show
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
Hybrid: connecting on-prem to cloud
Hybrid setups link the building to a cloud network with a site-to-site VPN or a private circuit (ExpressRoute, Direct Connect), and sync identities (Entra Connect).
az network vnet-gateway create -g rg-hybrid -n vpngw --vnet vnet-hub --public-ip-address pip-vpngw --gateway-type Vpn --sku VpnGw1 az network local-gateway create -g rg-hybrid -n school-office --gateway-ip-address 203.0.113.10 --local-address-prefixes 10.0.0.0/16 az network vpn-connection create -g rg-hybrid -n office-to-azure --vnet-gateway1 vpngw --local-gateway2 school-office --shared-key '<long secret>'
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
Disaster recovery planning
Decide how much data you can lose (RPO) and how long you can be down (RTO) for each system, then choose backups, replicas or a second site to meet them.
# System RPO RTO Method # Results DB 15 min 1 h log shipping to a standby server + nightly off-site backup # File share 24 h 8 h nightly backup (3-2-1) # Website 1 h 30 min cloud copy behind DNS failover # Run a DR drill twice a year and write down what went wrong.
🖥️ Run this on your lab servers or virtual machines. The output depends on your machine, so no sample output is shown.
💻 Terminal on my computer
Like a cloud shell, but on your own laptop: install compilers and run real commands from this page through the free GayaGnan agent. It asks you before connecting, installing or running anything.
🛠️ Set up and verify
- Install
Windows Server evaluation or Hyper-V on Windows 11 Pro
UTM virtual machines
Proxmox VE or KVM
- Editor: Visual Studio Code with Remote - SSH, PowerShell.
- Create
check.shecho "Hello, GayaGnan!"
- Run it and check the version
check.sh hostname
- Health check: paste what your terminal printed.
Install one language at a time. These commands only install or print versions; nothing here deletes files. Versions change: check the official page and note the version you installed.
🧭 The 14-lab path
- 00 · Setup and verify — install the runtime and editor, run hello world, print the version, fix PATH
- 01 · Syntax and trace — follow each line and the value of every variable
- 02 · Logic — conditionals and decision trees
- 03 · Loops — trace tables and loop challenges
- 04 · Functions — break problems down and test each piece
- 05 · Data structures — lists, maps, stacks, queues and trees you can see
- 06 · Debugging — bug cases with a hint ladder
- 07 · Algorithms — search, sort and Big-O comparison
- 08 · Files and data — read and write fixture files
- 09 · API or database — talk to a mock API or a sandbox database
- 10 · Testing — write tests and read failing assertions
- 11 · Security — secure coding and dependency hygiene for this language
- 12 · Project — one portfolio mini-project
- 13 · Assessment — quiz, coding test, rubric and an explain-your-answer prompt
📚 Modules
- server room
- IP plan and VLANs
- DNS and DHCP
- Active Directory
- virtualisation
- RAID and NAS
- 3-2-1 backups
- patching
- monitoring
- firewall and VPN
- hybrid cloud
- disaster recovery
🏗️ Mini-projects
- School network design
- Backup and restore drill
- Hybrid VPN lab
Projects use synthetic data only.