Sysadmin Cheatsheet
v2026.04 • Last updated April 2026
OSI Model
# Layer Protocol / Tech Key Role
7 Application HTTP, FTP, DNS, SMTP, SNMP User-facing data exchange
6 Presentation SSL/TLS, JPEG, ASCII Encoding, encryption, compression
5 Session NetBIOS, RPC, PPTP Open/maintain/close sessions
4 Transport TCP, UDP Segmentation, ports, reliability
3 Network IP, ICMP, OSPF, BGP Logical addressing, routing
2 Data Link Ethernet, MAC, ARP, VLANs Physical addressing, framing
1 Physical Cables, hubs, bits, NICs Raw bit transmission
IPv4 Address Ranges
Range Type Notes
10.0.0.0/8Private Class A, large networks
172.16.0.0/12Private Class B (172.16-31.x)
192.168.0.0/16Private Class C, home/SOHO
127.0.0.0/8Loopback 127.0.0.1 = localhost
169.254.0.0/16APIPA Auto-assigned when DHCP fails
224.0.0.0/4Multicast One-to-many delivery
0.0.0.0Unspecified Two distinct uses: binding (0.0.0.0:80 = listen on all interfaces) vs routing (0.0.0.0/0 = default route / gateway of last resort)
DNS Record Types
Record Purpose Example
A IPv4 address example.com → 93.184.216.34
AAAA IPv6 address example.com → 2606:…
CNAME Canonical alias www → example.com
MX Mail server Priority + mail host
NS Nameservers Delegates zone authority
TXT Text data SPF, DKIM, site verification
SOA Zone authority Primary NS, serial, TTLs
PTR Reverse DNS IP → hostname lookup
SRV Service location _sip._tcp.example.com
TCP vs UDP
Property TCP UDP
Connection Connection-oriented (3-way handshake) Connectionless, no handshake
Reliability Guaranteed delivery, retransmits lost packets Best-effort, packets may be lost
Ordering Sequenced delivery guaranteed Out-of-order delivery possible
Speed Slower (overhead from acks, windowing) Faster, minimal overhead
Use cases HTTP/S, SSH, FTP, SMTP, RDP, databases DNS, DHCP, VoIP, video streams, NTP
Network Troubleshooting Workflow
Work through these steps in order - each layer rules out the one above it.
Step Command What You're Checking
1. Is the host up? ping -c 4 <target>Basic ICMP reachability - rules out total network failure
2. What path does traffic take? traceroute <target> / tracertHop-by-hop path - find where packets drop or latency spikes
3. Does DNS resolve? dig <hostname> / nslookupName resolution - wrong IP or NXDOMAIN means DNS problem
4. Is the port open? nc -zv <host> <port> / Test-NetConnectionTCP connectivity to specific port - rules out firewall or service down
5. Is the service listening? ss -tlnp / netstat -anoWhat's bound to which port locally - service may not be started
6. What does the traffic look like? tcpdump -i eth0 host <target>Actual packet capture - see resets, retransmits, TLS failures
7. What do the logs say? journalctl -u nginx -n 50 / tail -f /var/log/syslogApplication and system errors - often the exact answer
8. Is a firewall blocking it? iptables -L -n / ufw status / Get-NetFirewallRuleLocal firewall rules - check both source and destination
9. Is MTU causing fragmentation? ping -M do -s 1472 <target>Test for MTU/fragmentation issues on VPN or tunnel paths
10. Is the cert valid? openssl s_client -connect <host>:443TLS handshake, cert expiry, chain validity - for HTTPS issues
HTTP Status Codes
Code Meaning Common Cause
200OK Request succeeded
201Created POST succeeded, new resource created
204No Content Success, no body returned (DELETE, PUT)
301Moved Permanently URL changed forever - clients should update bookmarks
302Found (Temporary Redirect) Temporary redirect - client keeps using original URL
304Not Modified Cached version is still valid - no body sent
400Bad Request Malformed request syntax, invalid parameters
401Unauthorized Authentication required or failed
403Forbidden Authenticated but no permission - check ACLs, file permissions
404Not Found Resource doesn't exist at this URL
405Method Not Allowed Wrong HTTP verb (GET vs POST) for this endpoint
408Request Timeout Client too slow - network issue or overloaded server
429Too Many Requests Rate limit hit - back off and retry
500Internal Server Error Unhandled exception - check app logs
502Bad Gateway Upstream server returned invalid response - check backend/proxy
503Service Unavailable Server overloaded or down for maintenance
504Gateway Timeout Upstream server too slow - check backend latency and timeouts
CIDR Subnet Mask Hosts Block Size Example / Use
/8255.0.0.0 16,777,214 16M 10.0.0.0/8 - large org
/16255.255.0.0 65,534 64K 172.16.0.0/16 - campus
/20255.255.240.0 4,094 4K AWS default VPC subnets
/24255.255.255.0 254 256 192.168.1.0/24 - typical LAN
/25255.255.255.128 126 128 192.168.1.0/25 - split /24 in half
/26255.255.255.192 62 64 192.168.1.0/26 - quarter of a /24
/27255.255.255.224 30 32 192.168.1.0/27 - small dept segment
/28255.255.255.240 14 16 192.168.1.0/28 - server cluster
/29255.255.255.248 6 8 Point-to-point link
/30255.255.255.252 2 4 Router-to-router link
/31255.255.255.254 2 2 RFC 3021 p2p (no broadcast)
/32255.255.255.255 1 1 Single host route / loopback
Tip: Usable hosts = 2n - 2 (subtract network + broadcast). /31 is the exception (RFC 3021).
Well-Known Ports
Port(s) Protocol Service Notes
20 / 21 TCP FTP 20=data, 21=control. Use SFTP/FTPS instead
22 TCP SSH / SFTP / SCP Secure remote shell and file transfer
23 TCP Telnet Plaintext - disable, use SSH
25 TCP SMTP Mail relay between servers
53 TCP/UDP DNS UDP for queries, TCP for zone transfers/large
67 / 68 UDP DHCP 67=server, 68=client
80 TCP HTTP Unencrypted web - redirect to 443
88 TCP/UDP Kerberos Authentication in AD environments
110 TCP POP3 Email retrieval - use POP3S (995)
123 UDP NTP Time sync - critical for Kerberos/logs
143 TCP IMAP Email access - use IMAPS (993)
161 / 162 UDP SNMP 161=poll, 162=trap. Use v3 with auth
389 TCP/UDP LDAP Directory services - use LDAPS (636)
443 TCP HTTPS HTTP over TLS. Also used by some VPNs
445 TCP SMB Windows file shares - block at perimeter
465 / 587 TCP SMTPS / SMTP-TLS Encrypted mail submission
514 UDP Syslog Log forwarding - use TLS syslog (6514)
636 TCP LDAPS LDAP over TLS
993 TCP IMAPS IMAP over TLS
995 TCP POP3S POP3 over TLS
1433 TCP MS SQL Server Default SQL Server port
1521 TCP Oracle DB Oracle database listener
3306 TCP MySQL / MariaDB Common web app database port
3389 TCP RDP Remote Desktop - never expose to internet
5432 TCP PostgreSQL Default Postgres port
5900 TCP VNC Remote desktop - use only over VPN/tunnel
6379 TCP Redis Historically no auth by default - always bind to localhost and set requirepass before any exposure
8080 / 8443 TCP HTTP/S Alt Dev servers, proxies, alt web services
27017 TCP MongoDB Historically no auth by default - modern versions enforce localhost binding; always enable auth and restrict access before exposing
VPN Technologies
Type Protocol Port(s) Notes
IPSec / IKEv2 ESP / IKE UDP 500 / 4500 Fast, native on most OS, preferred for site-to-site
OpenVPN TLS UDP/TCP 1194 Flexible, open-source, common for remote access
WireGuard UDP 51820 Modern, minimal code, fastest throughput. Key-based auth (Curve25519) - no certificates or CA needed, unlike IPSec/OpenVPN
SSL VPN HTTPS TCP 443 Works through firewalls, browser or client-based
L2TP/IPSec L2TP + ESP UDP 1701 / 500 / 4500 Common legacy, double-encapsulation overhead; 4500 for NAT-T
PPTP GRE + TCP TCP 1723 Obsolete - broken crypto, avoid
Threat / Attack Reference
Category Attack Description
Phishing Phishing / Spear / Whaling Fraudulent emails targeting all users / specific individuals / executives
Phishing Vishing / Smishing Voice call or SMS-based social engineering
Web App SQL Injection Malicious SQL inserted into input fields to query or corrupt the DB
Web App XSS (Cross-Site Scripting) Injected scripts execute in victim's browser via a trusted site
Web App CSRF Forged request tricks authenticated user into unwanted action
Web App IDOR Accessing objects by changing an ID in the URL/request
Malware Ransomware Encrypts files, demands payment for key
Malware Rootkit Hides malware presence at OS/kernel level
Malware Keylogger Records keystrokes to capture credentials
Network MITM Attacker intercepts communication between two parties
Network ARP Spoofing Links attacker MAC to legitimate IP to intercept LAN traffic
Network DDoS / SYN Flood Overwhelm target with traffic / half-open TCP connections
Social Eng. Pretexting / Tailgating Fabricated scenario to obtain info / following into secure area
Insider Privilege Escalation Exploiting vuln or misconfiguration to gain higher access
Hardening Checklist
Action
DO Disable unused ports and services
DO Enable MFA / 2FA on all accounts
DO Apply least privilege (PoLP) everywhere
DO Patch OS promptly - critical/zero-day: hours to days; standard patches: within 30 days
DO Enable host-based firewall (UFW/iptables)
DO Use key-based SSH auth, disable password auth
DO Disable root SSH login (PermitRootLogin no)
DO Encrypt data at rest and in transit
DO Log and monitor all auth events
DON'T Use default credentials on any device
DON'T Run services as root unnecessarily
DON'T Expose RDP / management ports to internet
DON'T Disable SELinux/AppArmor without a plan
DON'T Store plaintext credentials in scripts/repos
Cryptography Algorithms
Algorithm Type Key Size / Notes
AES-256 Symmetric 256-bit. NIST standard, fastest for bulk data
ChaCha20 Symmetric Stream cipher, faster than AES on mobile
RSA Asymmetric 2048+ min (4096 recommended for long-term)
ECDSA / ECDH Asymmetric ECC - same security as RSA with shorter keys
Ed25519 Asymmetric Preferred for SSH keys, fast and secure
SHA-256 / SHA-3 Hash Use for integrity checks, digital signatures
bcrypt / Argon2 Password hash Argon2 is winner of Password Hashing Competition
TLS 1.3 / 1.2 Protocol TLS 1.3 preferred (faster, mandatory forward secrecy); TLS 1.2 still acceptable with modern ciphers. 1.0/1.1 deprecated - disable immediately
Authentication Methods
Method Use Case
Password + MFA/TOTP Baseline for all user accounts
SSH Key Pairs (Ed25519) Server access, CI/CD pipelines
PKI / X.509 Certificates TLS, client auth, code signing
OAuth 2.0 / OIDC Web app delegation, "Sign in with Google"
SAML 2.0 Enterprise SSO, IdP federation
Kerberos Active Directory authentication (tickets)
RADIUS Network access (WiFi 802.1X, VPN auth)
LDAP / Active Directory Centralized user/group directory
Command Description
top / htopcopy Real-time process monitor. htop is interactive
ps auxcopy All processes with user and CPU/mem usage
ps aux | grep nginxcopy Find process by name
kill -9 <PID>copy Force-kill process by PID (SIGKILL)
pkill -f nginxcopy Kill all processes matching name pattern
systemctl status sshdcopy Check service status (systemd)
systemctl restart nginxcopy Restart a systemd service
systemctl enable nginxcopy Enable service to start on boot
journalctl -u nginx -fcopy Follow systemd logs for a service
free -hcopy Memory usage in human-readable format
vmstat 1copy CPU/IO/memory stats every 1 second
uptimecopy System uptime and load averages (1/5/15 min)
systemd Deep Dive
Command Description
systemctl list-units --type=service --state=failedcopy Show all failed services - first thing to check after a reboot
systemctl list-units --type=service --state=runningcopy All currently running services
systemctl disable --now nginxcopy Stop a service and prevent it starting on boot in one command
systemctl mask nginxcopy Completely prevent a service from starting - stronger than disable, blocks manual start too
systemctl cat nginxcopy Show the full unit file for a service - see ExecStart, dependencies, restart policy
systemctl daemon-reloadcopy Reload unit files after editing - required before restarting a modified service
journalctl -u nginx -n 100 --no-pagercopy Last 100 log lines for a service without paging
journalctl -u nginx --since "1 hour ago"copy Service logs from the last hour - accepts natural language time
journalctl -p err -bcopy Only error-level (and above) messages from current boot
journalctl -b -1copy Logs from the previous boot - useful after a crash or unexpected reboot
journalctl --disk-usagecopy How much disk space journal logs are consuming
journalctl --vacuum-time=7dcopy Delete journal entries older than 7 days to free disk space
Linux - Networking & Firewall
Command Description
ip addr showcopy Show all network interfaces and IP addresses
ip route showcopy Display routing table
ss -tulnpcopy TCP/UDP listening ports with process names
netstat -tulnpcopy Listening ports (legacy, use ss on modern systems)
ping -c 4 8.8.8.8copy Test connectivity (4 packets)
traceroute 8.8.8.8copy Trace route hops to destination
nmap -sV -p 1-1000 <IP>copy Scan top 1000 ports with service version
dig example.com Acopy DNS lookup for A record
curl -I https://example.comcopy Fetch HTTP response headers only
Linux - Files, Permissions & Users
Command Description
chmod 755 filecopy rwxr-xr-x - owner full, group/other read+exec
chmod u+x script.shcopy Add execute permission for owner
chown user:group filecopy Change file owner and group
find / -perm -4000copy Find all SUID binaries (privilege escalation risk)
useradd -m -s /bin/bash ucopy Create user with home dir and bash shell
usermod -aG sudo usernamecopy Add user to sudo group
passwd usernamecopy Set or change user password
grep -r "error" /var/log/copy Recursively search logs for "error"
tail -f /var/log/syslogcopy Follow log file in real-time
df -hcopy Disk usage by filesystem in human-readable
du -sh /var/log/*copy Size of each item in /var/log
tar -czf out.tar.gz /dircopy Create gzipped tarball of directory
rsync -avz src/ dest/copy Sync files with verbose output and compression
Common Linux Config Files
File What it Controls
/etc/hostsStatic hostname-to-IP mappings - checked before DNS, useful for local overrides
/etc/resolv.confDNS server addresses and search domains - often managed by NetworkManager or systemd-resolved
/etc/fstabFilesystems mounted at boot - device, mount point, type, options, dump, fsck order
/etc/hostnameSystem hostname - change here then run hostnamectl set-hostname to apply
/etc/sudoersSudo access rules - always edit with visudo to prevent syntax errors locking you out
/etc/passwdUser accounts: username, UID, GID, home dir, shell - no passwords stored here
/etc/shadowHashed passwords and password policy per user - root-readable only
/etc/groupGroup definitions and membership lists
/etc/ssh/sshd_configSSH server config - PermitRootLogin, PasswordAuthentication, Port, AllowUsers
/etc/crontabSystem-wide cron schedule - user crons live in /var/spool/cron/crontabs/
/etc/cron.d/Drop-in cron files for packages and services - same format as /etc/crontab
/etc/environmentSystem-wide environment variables set at login - plain KEY=value format, no export needed
/etc/profile.d/Shell scripts sourced at login for all users - drop custom env vars and aliases here
/etc/logrotate.confLog rotation policy - frequency, retention count, compression settings
/etc/nsswitch.confName service switch - controls lookup order for hosts, users, groups (files vs DNS vs LDAP)
SSH Key Management
Command / File Description
ssh-keygen -t ed25519 -C "user@host"copy Generate Ed25519 key pair - preferred over RSA for new keys
ssh-keygen -t rsa -b 4096 -C "user@host"copy Generate 4096-bit RSA key pair - use when Ed25519 not supported
ssh-copy-id user@hostcopy Copy public key to remote host's authorized_keys in one step
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keyscopy Manually append public key to authorized_keys (manual alternative)
eval $(ssh-agent -s) && ssh-add ~/.ssh/id_ed25519copy Start ssh-agent and load a key - avoids repeated passphrase prompts
ssh-add -lcopy List keys currently loaded in ssh-agent
ssh -J bastion user@targetcopy ProxyJump - SSH through a bastion/jump host to reach internal servers
ssh -L 8080:internal:80 user@bastioncopy Local port forward - tunnel local 8080 through bastion to internal:80
~/.ssh/configPer-user SSH config - define Host aliases, IdentityFile, ProxyJump, Port per host
~/.ssh/authorized_keysPublic keys allowed to authenticate to this account - must be chmod 600
~/.ssh/known_hostsFingerprints of hosts you've connected to - mismatch = MITM warning
/etc/ssh/sshd_configServer-side SSH config - PermitRootLogin, PasswordAuthentication, AllowUsers
Package Management
Task apt (Debian/Ubuntu) dnf/yum (RHEL/CentOS) zypper (SUSE)
Install package apt install nginxdnf install nginxzypper install nginx
Remove package apt remove nginxdnf remove nginxzypper remove nginx
Remove + config apt purge nginxdnf remove nginxzypper remove --clean-deps nginx
Update all apt update && apt upgradednf upgradezypper update
Search package apt search nginxdnf search nginxzypper search nginx
Package info apt show nginxdnf info nginxzypper info nginx
List installed apt list --installeddnf list installedzypper packages --installed
Which pkg owns file dpkg -S /usr/bin/nginxrpm -qf /usr/sbin/nginxrpm -qf /usr/sbin/nginx
List pkg files dpkg -L nginxrpm -ql nginxrpm -ql nginx
Add repo add-apt-repository ppa:xdnf config-manager --add-repo URLzypper addrepo URL alias
Clean cache apt cleandnf clean allzypper clean
Linux Filesystem Hierarchy
Path What Lives Here
/Root of the entire filesystem tree - everything hangs off here
/binEssential user binaries (ls, cp, mv, bash) needed before /usr is mounted
/sbinEssential system binaries for root (fdisk, ifconfig, init, fsck)
/usrRead-only user data: most installed apps, libraries, and docs go here
/usr/binNon-essential user commands (gcc, python3, git, curl, vim)
/usr/localLocally compiled or admin-installed software - not managed by the package manager
/etcSystem-wide configuration files (/etc/ssh/sshd_config, /etc/hosts, /etc/cron.d)
/varVariable data that grows: logs (/var/log), mail, spool, databases, package cache
/var/logSystem and service logs (syslog, auth.log, dmesg, journald writes here)
/tmpTemporary files - cleared on reboot, world-writable, no exec in hardened configs
/homeUser home directories (/home/alice). Root's home is /root, not here
/rootHome directory for the root account
/devDevice files: disks (/dev/sda), terminals (/dev/tty), null (/dev/null)
/procVirtual FS exposing kernel and process info (/proc/cpuinfo, /proc/meminfo)
/sysVirtual FS for kernel devices and drivers - used by udev and hardware management
/bootKernel images, initramfs, and GRUB config - keep separate partition for safety
/libShared libraries needed by /bin and /sbin at boot
/optOptional third-party software installed as self-contained packages (e.g. /opt/splunk)
/mntTemporary mount point for manually mounted filesystems
/mediaAuto-mount point for removable media (USB drives, DVDs)
/srvService data served to the network (web root, FTP files)
/runRuntime data since last boot: PID files, sockets, lock files (tmpfs)
Windows Filesystem Hierarchy
Drive-letter based (C:, D:). NTFS is standard - supports permissions, ACLs, compression, and encryption.
Path What Lives Here
C:\Root of the drive - each volume has its own root under a drive letter
C:\WindowsOS root containing system binaries, configuration files, and critical subdirectories
C:\Windows\System3264-bit system executables, DLLs, and management tools (cmd.exe, notepad.exe, etc.)
C:\Windows\SysWOW6432-bit system binaries for backward compatibility on 64-bit Windows
C:\Windows\System32\driversKernel-mode drivers (.sys files) loaded at boot
C:\Windows\TempSystem-wide temporary files - safe to clear periodically
C:\Program FilesDefault install directory for 64-bit applications
C:\Program Files (x86)Default install directory for 32-bit applications on 64-bit Windows
C:\ProgramDataSystem-wide app data and config shared across all users (hidden by default)
C:\Users\PublicShared folder accessible to all local users
C:\Users\%USERNAME%Per-user profile root - contains all personal folders and app data
...\AppData\RoamingPer-user config that follows domain profiles (Outlook, VS Code settings, etc.)
...\AppData\LocalLocal-only app data: cache, application state, Temp subfolder
...\AppData\Local\TempUser-specific temp files - a common target for malware drops
...\Desktop / DownloadsStandard personal folders inside each user profile
Command Description
Get-Help Get-Process -Fullcopy Full documentation for any cmdlet - add -Examples for just examples, -Online to open browser docs
Get-Help *network*copy Wildcard search across all help topics - how you discover cmdlets you don't know yet
Update-Helpcopy Download latest help files - run once after a fresh install, requires internet
Get-Command -Verb Get -Noun *DNS*copy Find cmdlets by verb, noun, or wildcard - the right way to discover what's available
Get-Command -Module ActiveDirectorycopy List every cmdlet in a specific module
Get-Module -ListAvailablecopy All modules installed on the system, whether loaded or not
Import-Module ActiveDirectorycopy Load a module into the current session
Get-Process | Get-Membercopy Inspect every property and method on an object - essential for building pipelines
Get-Service | Select-Object -Property *copy Reveal all properties on an object, not just the default display columns
Get-Historycopy Command history for the current session with execution IDs
Invoke-History 42copy Re-run a command by its history ID
Get-PSReadLineOptioncopy View persistent history path - PSReadLine saves history across sessions by default
Set-ExecutionPolicy RemoteSigned -Scope CurrentUsercopy Allow local scripts to run; remote scripts must be signed. Safest policy for daily use
Get-ExecutionPolicy -Listcopy Show policy at every scope (MachinePolicy, UserPolicy, Process, CurrentUser, LocalMachine)
Command Description
Get-Processcopy List all running processes (PS)
Stop-Process -Name notepadcopy Kill process by name (PS)
Get-Service | Where Status -eq Runningcopy List only running services (PS)
systeminfocopy OS version, RAM, hotfixes, uptime
net user /domaincopy List domain users
net localgroup administratorscopy List local admins
Get-HotFix | Sort-Object InstalledOn -Descendingcopy Installed Windows Updates and KBs, newest first
Get-ExecutionPolicycopy Check current PowerShell script execution policy
Get-CimInstance Win32_OperatingSystem | select LastBootUpTimecopy When the system last rebooted
Get-WinEvent -LogName Security -MaxEvents 50copy Recent Security event log entries (PS)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 20copy Failed logon events only - faster and more precise than Where-Object filtering
Test-NetConnection -ComputerName dc01 -Port 443copy Test TCP connectivity to a host/port - modern replacement for telnet port tests
Invoke-Command -ComputerName srv01,srv02 -ScriptBlock { Get-Service spooler }copy Run commands on one or many remote machines simultaneously over WinRM
Enter-PSSession -ComputerName srv01copy Interactive remote PowerShell session - like SSH for Windows
Get-Printer -ComputerName printservercopy List all printers on a print server
Add-Printer -Name "HP-Floor2" -DriverName "HP Universal" -PortName "IP_10.0.1.50"copy Add a network printer from CLI - no GUI needed
Install-Module PSWindowsUpdate -Force; Get-WindowsUpdatecopy Check pending Windows Updates from PowerShell - requires PSWindowsUpdate module
Install-WindowsUpdate -AcceptAll -AutoRebootcopy Install all available updates and reboot if required (PSWindowsUpdate module)
Windows Networking
Command Description
ipconfig /allcopy Full adapter info including MAC address, DNS servers, DHCP lease, and gateway
netstat -anocopy All active TCP/UDP connections with associated PIDs (legacy but universal)
Get-NetTCPConnectioncopy Modern netstat equivalent - active TCP connections with state and owning process ID
Get-DnsClientCachecopy View locally cached DNS records - useful for diagnosing stale or poisoned entries
Get-NetRoutecopy Display the full routing table - equivalent to route print
Get-NetAdaptercopy List physical and virtual network adapters with link speed and status
(Invoke-RestMethod ipinfo.io/json).ipcopy Retrieve public egress IP address from PowerShell - no browser needed
Restart-Computer -ComputerName "PC01" -Forcecopy Remotely restart a machine by name - requires WinRM or admin share access
netsh
Command Description
netsh interface ip show configcopy Show IP, subnet, gateway, DNS for all adapters
netsh interface ip set address "Ethernet" static 192.168.1.10 255.255.255.0 192.168.1.1copy Set a static IP on an adapter
netsh interface ip set address "Ethernet" dhcpcopy Switch adapter back to DHCP
netsh interface ip set dns "Ethernet" static 8.8.8.8copy Set a static DNS server on an adapter
netsh advfirewall show allprofilescopy Show firewall state for Domain, Private, and Public profiles
netsh advfirewall set allprofiles state offcopy Disable Windows Firewall on all profiles (testing only)
netsh advfirewall firewall show rule name=allcopy List all firewall rules
netsh int tcp show globalcopy Show TCP global settings (chimney, RSS, autotune)
netsh winhttp show proxycopy Show system-level WinHTTP proxy settings
netsh wlan
Command Description
netsh wlan show interfacescopy Show wireless adapter status, SSID, signal, channel
netsh wlan show profilescopy List all saved WiFi profiles on the machine
netsh wlan show profile name="SSID" key=clearcopy Reveal saved WiFi password in plaintext (requires admin)
netsh wlan connect name="SSID"copy Connect to a saved WiFi profile by name
netsh wlan disconnectcopy Disconnect from current wireless network
netsh wlan export profile folder=C:\WiFi key=clearcopy Export all WiFi profiles with passwords to XML
pathping
Command Description
pathping <host>copy Combined ping + tracert - shows packet loss per hop over time
pathping -n 25 <host>copy Faster: 25 samples instead of default 100
pathping -w 500 <host>copy Set reply timeout to 500ms (default 3000ms)
pathping -4 <host>copy Force IPv4
Windows Storage & Services
Command Description
Get-Diskcopy List all physical disks with size, partition style (MBR/GPT), and health status
Get-Volumecopy Show all volumes with drive letter, filesystem, total size, and free space
Get-PhysicalDisk | select FriendlyName, HealthStatus, OperationalStatuscopy SMART-based health status per physical disk - spot failing drives early
Get-ChildItem C:\Path -Recurse | Measure-Object -Sum Lengthcopy Calculate total disk usage of a directory tree in bytes
Get-Service | Where Status -eq Runningcopy List only services currently in a Running state
Get-Service | where Status -eq 'StartPending'copy Find services stuck in Starting - indicates a hung or deadlocked service
Restart-Service -Name sshdcopy Restart a named service by its service name (not display name)
Get-CimInstance Win32_Service | select Name, PathName, StartModecopy Service binary path and start mode - useful for spotting malicious service installs
robocopy
Command Description
robocopy C:\Source D:\Dest /Ecopy Copy all files and subdirectories including empty folders
robocopy C:\Source D:\Dest /MIRcopy Mirror source to dest - deletes extras in dest
robocopy C:\Source D:\Dest /E /Z /MT:8 /LOG:C:\copy.logcopy Resume-capable copy, 8 threads, output to log file
robocopy C:\Source D:\Dest /COPYALL /Bcopy Copy all attributes, permissions, timestamps (backup mode)
robocopy C:\Source D:\Dest /E /XD "Temp" /XF "*.tmp"copy Exclude specific directories and file patterns
robocopy C:\Source D:\Dest /Lcopy Dry run - list what would be copied without copying
net use
Command Description
net usecopy List all currently mapped network drives
net use * \\server\sharecopy Map share to next available drive letter
net use Z: \\server\share /user:domain\user /persistent:yescopy Map drive Z with credentials, survives reboot
net use Z: /deletecopy Disconnect and remove a mapped drive
net use * /deletecopy Disconnect all mapped network drives
net use \\server\share /deletecopy Disconnect a specific UNC share
RAID Types
RAID Method Min Disks Fault Tolerance
RAID 0 Striping 2 None -any disk failure = total loss
RAID 1 Mirroring 2 1 disk failure tolerated
RAID 5 Stripe + parity 3 1 disk failure tolerated
RAID 6 Stripe + dual parity 4 2 disk failures tolerated
RAID 10 Stripe of mirrors 4 1 per mirror pair
Backup Strategy Types
Type What It Backs Up Speed Restore
Full All data every time Slowest Single set -fastest restore
Incremental Changes since last backup (any) Fastest Need all incrementals + last full
Differential Changes since last full only Medium Last full + latest differential
Snapshot Point-in-time copy (CoW) Instant Instant rollback, storage overhead
Active Directory
Command Description
Get-ADUser -Identity jsmith -Properties *copy Full user details: last logon, locked status, groups
Get-ADUser -Filter {Enabled -eq $true} -Properties LastLogonDate | Where {$_.LastLogonDate -lt (Get-Date).AddDays(-90)}copy Active accounts with no logon in 90+ days (stale audit)
Set-ADUser -Identity jsmith -Enabled $falsecopy Disable a user account
Unlock-ADAccount -Identity jsmithcopy Unlock a locked-out account
Set-ADAccountPassword -Identity jsmith -Reset -NewPassword (ConvertTo-SecureString "P@ssw0rd!" -AsPlainText -Force)copy Reset a user password from PowerShell
Get-ADGroupMember -Identity "Domain Admins" -Recursivecopy List group members including nested members
Add-ADGroupMember -Identity "VPN Users" -Members jsmithcopy Add a user to a group
Get-ADComputer -Filter * -Properties LastLogonDate | Sort LastLogonDatecopy All computers sorted by last logon -spot stale machine accounts
Test-ComputerSecureChannel -Repaircopy Fix broken domain trust without removing from domain
Reset-ComputerMachinePasswordcopy Fixes "trust relationship failed" - no domain rejoin needed
gpupdate /forcecopy Force immediate Group Policy refresh
gpresult /rcopy Show applied GPOs for current user and computer (RSoP)
dcdiag /test:replicationscopy Test AD replication health across domain controllers
repadmin /replsummarycopy Replication summary - spot failing DC partners quickly
FSMO Roles
Command Description
netdom query fsmocopy Show all 5 FSMO role holders in one output
Get-ADDomain | Select PDCEmulator,RIDMaster,InfrastructureMastercopy Domain-level FSMO roles via PowerShell
Get-ADForest | Select SchemaMaster,DomainNamingMastercopy Forest-level FSMO roles via PowerShell
Move-ADDirectoryServerOperationMasterRole -Identity "DC02" -OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMastercopy Transfer domain FSMO roles to DC02 (graceful)
Move-ADDirectoryServerOperationMasterRole -Identity "DC02" -OperationMasterRole SchemaMaster,DomainNamingMastercopy Transfer forest FSMO roles to DC02
Group Policy (gpupdate / gpresult)
Command Description
gpupdate /forcecopy Force refresh all computer and user policies now
gpupdate /force /bootcopy Force update and reboot if a policy requires it
gpupdate /target:computercopy Refresh computer policy only
gpupdate /target:usercopy Refresh user policy only
Invoke-GPUpdate -Computer "PC01" -RandomDelayInMinutes 0copy Remote GPUpdate via PowerShell (no delay)
gpresult /rcopy RSoP summary - applied GPOs for current user and computer
gpresult /h C:\gp-report.htmlcopy Full HTML report of applied policies - open in browser
gpresult /scope computer /vcopy Verbose computer policy details
gpresult /s PC01 /rcopy RSoP for a remote computer
DC Diagnostics (dcdiag / repadmin)
Command Description
dcdiagcopy Run all default DC health tests
dcdiag /test:replicationscopy Test AD replication between DCs
dcdiag /test:advertisingcopy Verify DC is advertising correctly in DNS and AD
dcdiag /test:netlogonscopy Check Netlogon service and SYSVOL share
dcdiag /test:dnscopy DNS registration and resolution health check
dcdiag /s:DC01 /vcopy Full verbose test against a specific DC
repadmin /showreplcopy Replication status per naming context and partner DC
repadmin /syncall /AdePcopy Force sync all DCs across all partitions
repadmin /queuecopy Show pending replication queue on local DC
repadmin /showvector /latency dc=contoso,dc=comcopy Replication latency per DC for a partition
Windows Server Licensing
Edition Target VM Rights Notes
Essentials ≤25 users, ≤50 devices 0 (host only) No CALs required; cannot run as a guest VM; one licence per org
Standard Most organisations 2 VMs per licence Stack licences to add more VMs (3 licences = 6 VMs on same host)
Datacenter Dense virtualisation Unlimited VMs Covers all VMs on the licensed physical host; higher up-front cost
Licensing Rule Detail
Core minimum Every physical server needs at least 16 core licences (8 per CPU minimum). Licences sold in 2-core packs.
Physical cores only Count physical cores, not logical (HT/SMT). A 2-socket 10-core/socket server = 20 cores = 20 core licences needed (but minimum is 16).
User CAL One CAL per user regardless of devices used. Cheaper when users have many devices.
Device CAL One CAL per device regardless of users. Cheaper for shared workstations / shift workers.
External Connector Covers unlimited external (non-employee) users accessing one server - replaces per-user external CALs.
RDS CAL Remote Desktop Services requires an RDS CAL in addition to the standard Server CAL. Both must be licensed per user or per device.
Software Assurance (SA) Annual subscription on top of perpetual licence. Grants version upgrade rights, Azure Hybrid Benefit, and licence mobility. Required to stay current without repurchasing.
Version Release End of Support Notes
Server 2012 R2 2013 Oct 2023 (ESU available) ESU via Azure Arc through 2026 - migrate off ASAP
Server 2016 2016 Jan 2027 First version with core-only licensing (no processor model)
Server 2019 2018 Jan 2029 Stable long-term choice; widely deployed
Server 2022 2021 Oct 2031 Adds secured-core, TLS 1.3 default, SMB compression
Server 2025 Nov 2024 Oct 2034 Hotpatching (no reboot), NVMe/RDMA improvements, SMB over QUIC built-in; same core licensing model as 2022
Source: r/sysadmin wiki · Supplement: Microsoft Docs for Server 2025
Linux Log Paths
Path / Command Contents
/var/log/auth.logcopy SSH logins, sudo, auth failures (Debian/Ubuntu)
/var/log/securecopy Same as auth.log on RHEL/CentOS
/var/log/syslogcopy General system messages and daemon output
/var/log/messagescopy Kernel + system messages (RHEL/CentOS)
/var/log/kern.logcopy Kernel ring buffer messages
/var/log/nginx/access.logcopy HTTP requests to Nginx web server
/var/log/nginx/error.logcopy Nginx errors and connection issues
/var/log/apache2/error.logcopy Apache web server errors
/var/log/croncopy Cron job execution history
journalctl -u nginxcopy Systemd journal for a specific service
journalctl -b -p errcopy All errors since last boot (systemd)
Windows Event IDs
Event ID Log Meaning
4624 Security Successful logon
4625 Security Failed logon attempt
4648 Security Logon with explicit credentials (runas)
4672 Security Special privileges assigned to new logon
4688 Security New process created (process tracking)
4720 Security User account created
4740 Security Account locked out
4776 Security DC validated credentials (NTLM)
7045 System New service installed on the system
1102 Security Audit log cleared - investigate immediately
Log Query Tools
Tool / Command Use
Event Viewer (eventvwr.msc)copy Windows GUI for all event logs
Get-WinEvent -LogName Securitycopy PowerShell security log access
grep "Failed" /var/log/auth.logcopy Filter failed SSH attempts
last -n 20copy Last 20 logins from /var/log/wtmp
lastbcopy Failed login attempts (/var/log/btmp)
Cron Job Syntax
Field Range Example Meaning
Minute 0-59 30At minute 30
Hour 0-23 14At 14:00 (2pm)
Day/Month 1-31 1On the 1st of month
Month 1-12 */3Every 3 months
Day/Week 0-7 1-5Mon-Fri (0=7=Sunday)
*any *Every value in field
*/nstep */15Every n units
,list 1,15,30At specific values
Cron Expression Schedule
0 2 * * *copy Every day at 02:00
*/5 * * * *copy Every 5 minutes
0 0 1 * *copy First day of every month, midnight
30 8 * * 1-5copy Weekdays at 08:30
0 */4 * * *copy Every 4 hours on the hour
@reboot /path/scriptcopy Run once at system startup
0 3 * * 0copy Weekly Sunday at 03:00
0 12 1 1 *copy Yearly - January 1st at noon
Monitoring Platforms
Tool Type Best For
Zabbix Open source, agent-based Full infrastructure monitoring - servers, network, VMs, SNMP. Self-hosted, no license cost
PRTG Commercial, agentless Windows-centric environments, easy setup, strong network/SNMP monitoring. Licensed by sensor count
Nagios / Icinga Open source, plugin-based Highly customisable, large plugin ecosystem. Icinga2 is the modern fork with better config and clustering
Grafana + Prometheus Open source, metrics stack Modern cloud-native monitoring - Prometheus scrapes metrics, Grafana visualises. Standard in Kubernetes environments
Datadog SaaS Full-stack observability - infrastructure, APM, logs, synthetics. Expensive but minimal setup overhead
Elastic Stack (ELK) Open source / SaaS Log aggregation and search at scale - Elasticsearch + Logstash + Kibana. Strong for SIEM use cases
Graylog Open source / commercial Centralised log management - easier to operate than ELK for log-focused use cases
Uptime Kuma Open source, self-hosted Lightweight uptime/status monitoring with a clean UI - good for small teams or personal use
OpenSSL Certificate Commands
Command Purpose
openssl x509 -in cert.pem -text -nooutcopy Inspect cert: expiry, SAN, issuer, subject
openssl req -new -key key.pem -out csr.pemcopy Generate CSR from existing private key
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365copy Self-signed cert with new 4096-bit RSA key
openssl verify -CAfile ca.pem cert.pemcopy Verify cert chain against a CA bundle
openssl s_client -connect host:443copy Test TLS handshake, view cert chain live
openssl pkcs12 -export -out bundle.pfxcopy Export cert + key to PFX/PKCS12 format
openssl dhparam -out dh.pem 2048copy Generate Diffie-Hellman params for TLS
certbot renew --dry-runcopy Test Let's Encrypt auto-renewal (Certbot)
certbot certonly --nginx -d example.comcopy Issue/renew cert for nginx domain
UFW / iptables Rules
Command Action
ufw enablecopy Activate UFW firewall
ufw status verbosecopy Show all rules with details
ufw allow 22/tcpcopy Allow SSH (TCP port 22)
ufw allow from 10.0.0.0/8copy Allow all traffic from subnet
ufw deny 23copy Block Telnet port
ufw delete allow 80/tcpcopy Remove a specific allow rule
iptables -L -n -vcopy List all iptables rules with packet counts
iptables -A INPUT -p tcp --dport 443 -j ACCEPTcopy Accept HTTPS inbound traffic
iptables -A INPUT -j DROPcopy Drop all other inbound (default deny)
iptables-save > /etc/iptables.rulescopy Persist iptables rules across reboots
Git
Core Workflow
Command Description
git initcopy Initialize new local repository
git remote add origin <url>copy Link local repo to remote
git statuscopy Show working tree and staging area status
git add .copy Stage all changes in current directory
git commit -m "message"copy Commit staged changes with message
git log --onelinecopy Compact one-line commit history
git push origin maincopy Push local commits to remote
Sync
Command Description
git fetchcopy Download remote changes without merging
git pullcopy Fetch and merge remote changes
git pull --rebasecopy Fetch and rebase onto remote (cleaner history)
Branching
Command Description
git branchcopy List local branches
git branch -avcopy List all branches with last commit
git switch -c new-branchcopy Create and switch to new branch
git switch maincopy Switch back to main branch
git merge feature-branchcopy Merge feature branch into current branch
git branch -d branch-namecopy Delete merged branch
Undo
Command Description
git restore <file>copy Discard working directory changes to file
git restore --staged <file>copy Unstage a file (keep working copy)
git revert <commit>copy Create new commit that undoes a past commit
git switch --detach <commit>copy Inspect repo at a past commit (read-only)
git switch maincopy Return from detached HEAD to main
Docker
Core Workflow
Command Description
docker run -d -p 8080:80 --name web nginxcopy Run detached container, map host:container port
docker pscopy List running containers
docker ps -acopy List all containers (running + stopped)
docker stop webcopy Gracefully stop container (SIGTERM)
docker rm webcopy Remove stopped container
docker exec -it web /bin/bashcopy Open interactive shell in running container
docker logs -f webcopy Stream live log output from container
Volumes & Ports
Command Description
docker run -p 8080:80 nginxcopy Map host port 8080 → container port 80
docker run -v /host:/container nginxcopy Bind-mount host directory into container
docker volume lscopy List all named volumes
docker volume create datacopy Create a named volume
docker volume prunecopy Remove all unused volumes
Docker Compose
Command Description
docker compose up -dcopy Start all services in docker-compose.yml (detached)
docker compose downcopy Stop and remove containers, networks
docker compose pscopy List status of compose services
docker compose logs -fcopy Stream logs from all compose services
Images
Command Description
docker imagescopy List locally stored images
docker pull nginxcopy Pull image from Docker Hub
docker build -t myapp:1 .copy Build image from Dockerfile in current dir
docker tag myapp:1 myrepo/myapp:latestcopy Tag image for registry push
docker push myrepo/myapp:latestcopy Push image to registry
docker rmi myapp:1copy Delete local image
docker image prunecopy Remove dangling (untagged) images
Troubleshooting
Command Description
docker logs -f containercopy Stream live logs
docker exec -it container shcopy Shell into running container (sh fallback)
docker inspect containercopy Full JSON metadata: network, mounts, env
docker statscopy Live CPU/memory/net/disk usage per container
docker system dfcopy Show disk usage by images, containers, volumes
docker system prunecopy Remove all stopped containers, unused images/networks
Core
Command Description
kubectl get podscopy List pods in current namespace
kubectl get nodescopy List all nodes and their status
kubectl get allcopy List all common resources in namespace
kubectl describe pod <pod>copy Detailed info: events, limits, conditions
kubectl logs <pod>copy Print logs from a pod
kubectl logs -f <pod>copy Stream live logs from a pod
kubectl exec -it <pod> -- /bin/shcopy Open interactive shell inside pod
Deployments
Command Description
kubectl apply -f app.yamlcopy Create or update resources from YAML
kubectl delete -f app.yamlcopy Delete resources defined in YAML
kubectl get deploymentscopy List deployments in current namespace
kubectl rollout status deployment/appcopy Watch rollout progress
kubectl rollout restart deployment/appcopy Trigger rolling restart (picks up new config/image)
Scaling
Command Description
kubectl scale deployment app --replicas=3copy Scale deployment to N replicas
Debugging
Command Description
kubectl get eventscopy Recent cluster events (failures, pulls, restarts)
kubectl describe pod <pod>copy Events + resource limits + container states
kubectl top podscopy Live CPU/memory usage per pod
Context
Command Description
kubectl config get-contextscopy List all kubeconfig contexts (clusters)
kubectl config use-context <context>copy Switch active cluster/context
DevOps Tool Landscape
Category Tools
Containers Docker, Podman, containerd
Orchestration Kubernetes, Docker Swarm, Nomad
CI/CD GitHub Actions, GitLab CI, Jenkins, CircleCI
IaC Terraform, Pulumi, CloudFormation, Bicep
Config Mgmt Ansible, Chef, Puppet, SaltStack
Monitoring Prometheus, Grafana, Datadog, New Relic
Logging ELK Stack, Loki, Splunk, CloudWatch
Secrets HashiCorp Vault, AWS Secrets Manager, SOPS
DNS Resolution - 8-Step Process
Step Who Acts What Happens
1 Browser / OS Check local DNS cache (TTL-based). If hit, done.
2 OS Check /etc/hosts (Linux) or C:\Windows\System32\drivers\etc\hosts
3 OS to Resolver Query sent to configured recursive resolver (ISP or 8.8.8.8)
4 Resolver to Root Resolver queries a root server (.) - 13 root server clusters
5 Resolver to TLD Root refers resolver to .com / .org / .io TLD server
6 Resolver to Auth NS TLD refers resolver to the authoritative nameserver for the domain
7 Auth NS responds Returns A/AAAA record (the actual IP address)
8 Resolver caches Stores result per TTL, returns to client. Client caches too.
Cable Types
Cable Max Speed Max Length Notes
Cat5 100 Mbps 100m Obsolete, avoid for new installs
Cat5e 1 Gbps 100m Minimum current standard
Cat6 10 Gbps 55m Common for new installs
Cat6A 10 Gbps 100m 10G at full 100m distance
Cat7 10 Gbps 100m Shielded, proprietary connectors
Fiber MM 10+ Gbps 2km Multimode, shorter runs, cheaper
Fiber SM 100+ Gbps 100km Single-mode, long distance, datacenter
T568B Std - Orange-wh, Orange, Green-wh, Blue… (standard)
T568A Std - Crossover: swap pairs 2 and 3 from T568B
WiFi 802.11 Standards
Standard Band Max Speed Notes
802.11b 2.4 GHz 11 Mbps Legacy, long range, slow
802.11g 2.4 GHz 54 Mbps Backward compat with b
802.11n 2.4/5 GHz 600 Mbps MIMO, dual band - WiFi 4
802.11ac 5 GHz 3.5 Gbps Wave 2, MU-MIMO - WiFi 5
802.11ax 2.4/5/6 GHz 9.6 Gbps OFDMA, BSS coloring - WiFi 6/6E
802.11be 2.4/5/6 GHz 46 Gbps Multi-link operation - WiFi 7
Cloud Service Models
Model You Manage Examples
IaaS OS, runtime, apps, data AWS EC2, Azure VMs, GCP Compute
PaaS App and data only Heroku, Azure App Service, App Engine
SaaS Nothing (just use it) Office 365, Salesforce, Gmail
FaaS Code only AWS Lambda, Azure Functions, Cloud Run
AWS Core Services
Service Category What it Does
EC2Compute Virtual machines - pay-as-you-go, reserved, or spot pricing
LambdaCompute Serverless functions - event-driven, pay-per-execution
ECS / EKSContainers ECS = managed containers; EKS = managed Kubernetes
S3Storage Object storage - 11-nines durability, unlimited scale
EBSStorage Block storage volumes attached to EC2 instances
EFSStorage Managed NFS for Linux - shared across multiple EC2s
RDSDatabase Managed SQL DB - MySQL, Postgres, SQL Server, Oracle, Aurora
DynamoDBDatabase Fully managed NoSQL - key-value and document model
VPCNetworking Isolated virtual network with subnets, route tables, NACLs, SGs
Route 53Networking DNS + health checks + routing policies (failover, latency, geo)
CloudFrontNetworking CDN with 400+ PoPs, caches S3/EC2 content globally
IAMSecurity Users, groups, roles, and policies for access control
CloudWatchMonitoring Metrics, logs, alarms, dashboards for all AWS services
CloudFormationIaC Infrastructure as Code using JSON/YAML templates
Azure Core Services
Service Category What it Does
Virtual Machines Compute IaaS VMs - VM Scale Sets for autoscaling, Availability Zones for HA
App Service Compute PaaS web hosting - no OS management, built-in autoscale, deployment slots
Azure Functions Compute Serverless event-driven code - pay-per-execution
ACI / AKS Containers ACI = serverless containers; AKS = managed Kubernetes cluster
Blob Storage Storage Object store - Hot/Cool/Archive tiers, lifecycle management
Azure Disk Storage Managed disks: Standard HDD, Standard SSD, Premium SSD
Azure Files Storage Managed SMB/NFS file shares - cloud and hybrid use
Azure SQL / Cosmos DB Database Managed SQL; Cosmos = multi-model NoSQL (DynamoDB equivalent)
VNet Networking Isolated virtual network with subnets, NSGs, route tables, peering
Azure DNS Networking Host DNS zones, manage records, private DNS zones for VNets
Azure CDN / Front Door Networking CDN delivery + global load balancing with WAF
Azure AD (Entra ID) Identity Cloud identity: users, groups, MFA, SSO, Conditional Access
Azure Monitor Monitoring Metrics, Log Analytics workspace, alerts, Application Insights
ARM Templates / Bicep IaC JSON/Bicep Infrastructure as Code for Azure resources
AWS vs Azure Service Mapping
AWS Azure Category
EC2Virtual Machines Compute
LambdaAzure Functions Serverless
ECS / EKSACI / AKS Containers
S3Blob Storage Object Store
EBSAzure Disk Block Storage
EFSAzure Files File Share
RDSAzure SQL Database Managed SQL
DynamoDBCosmos DB NoSQL DB
VPCVNet Networking
Security GroupsNSG (Network Security Group) Firewall
Route 53Azure DNS DNS
CloudFrontAzure CDN / Front Door CDN
IAMAzure AD + RBAC Identity
CloudWatchAzure Monitor Monitoring
CloudFormationARM Templates / Bicep IaC
Direct ConnectExpressRoute Private Link
AWS VPN GatewayAzure VPN Gateway VPN
AWS ConfigAzure Policy Compliance
Azure RBAC Built-in Roles
Role Read Grant Create/Del Scope
Owner ✓ ✓ ✓ Full control of all resources
Contributor ✓ ✓ All actions except access grants
Reader ✓ View only, no changes
User Access Admin ✓ ✓ Manage user access only
Global Admin (AAD) - - - All Azure AD resources
User Admin (AAD) - - - Users, groups, passwords
AWS vs Azure Pricing
Model AWS Azure
Pay-as-you-go On-Demand Pay-as-you-go
Reserved (1-3yr) Reserved Instances Reserved Instances
Spot / Preemptible Spot Instances Spot VMs (up to 90% off)
Savings Plans Compute Savings Plans Azure Savings Plan
Ingress Free Free
Egress Charged (per GB) Charged (per GB out)
Shared Responsibility Model
Layer On-Premises IaaS PaaS SaaS
Physical DC / Hardware YOU Provider Provider Provider
Hypervisor / Host OS YOU Provider Provider Provider
Guest OS / Runtime YOU YOU Provider Provider
Middleware / Application YOU YOU YOU (app) Provider
Data / Content YOU YOU YOU YOU
Network Configuration YOU Shared Shared Provider
Identities / Accounts YOU YOU YOU YOU
VNet / VPC Key Concepts
Concept AWS (VPC) Azure (VNet)
Address Space CIDR block (e.g. 10.0.0.0/16) CIDR block, can add multiple prefixes
Subnets Public (IGW route) / Private Any subnet - NSG controls inbound/outbound
Firewall (stateful) Security Groups (instance level) Network Security Groups (NSG)
Firewall (stateless) NACLs (subnet level) NSG has stateful rules, no separate NACL
Peering VPC Peering (same/cross-region) VNet Peering / Global VNet Peering
Private WAN Direct Connect ExpressRoute
VPN AWS VPN Gateway Azure VPN Gateway
NAT NAT Gateway (managed, per-AZ) NAT Gateway (managed)
DNS Route 53 / VPC DNS (169.254.169.253) Azure DNS / Private DNS Zones
Flow Logs VPC Flow Logs to S3/CloudWatch NSG Flow Logs to Storage/Log Analytics
HA vs Fault Tolerance vs Disaster Recovery
Concept Goal Downtime AWS Example Azure Example
High Availability Keep running despite single failures Minutes (auto-heal) Multi-AZ RDS, ALB across AZs Availability Zones, Azure Load Balancer
Fault Tolerance Zero downtime, no errors, continuous Near zero S3 (11-nines), DynamoDB, Global Tables Cosmos DB, Storage LRS/ZRS/GRS
Disaster Recovery Restore after regional catastrophe Hours (RTO goal) Pilot light, warm standby, multi-region Azure Site Recovery, geo-replication
RPO (Recovery Point Objective) = max acceptable data loss in time.
RTO (Recovery Time Objective) = max acceptable downtime after disaster.
Entra ID Core Concepts
Concept What it Is Key Notes
Tenant Your organisation's dedicated Entra ID instance Identified by a tenant ID (GUID) and domain (contoso.onmicrosoft.com)
User Person or shared account in the directory Can be cloud-only or synced from on-prem AD via Entra Connect
Service Principal Identity for an application or automated process Like a service account, but for apps - has its own permissions
App Registration How you register an app to use Entra ID auth Creates a service principal in your tenant - defines API permissions
Managed Identity Auto-managed service principal for Azure resources No credentials to manage - Azure handles rotation. Use this over service accounts for Azure workloads
Entra ID Roles vs Azure RBAC Two separate role systems Entra roles control directory objects (users, groups, apps). Azure RBAC controls Azure resources (VMs, storage). Global Admin != Owner
Conditional Access Policy engine for access decisions If user + location + device + app + risk = conditions then grant/block/MFA
PIM (Privileged Identity Management) Just-in-time privileged access Roles are assigned but not active - user must "activate" with justification and optional approval
Microsoft Graph PowerShell
Replaces the deprecated AzureAD and MSOnline modules. Install: Install-Module Microsoft.Graph -Scope CurrentUser
Command Description
Connect-MgGraph -Scopes "User.Read.All","Group.ReadWrite.All"copy Authenticate to Microsoft Graph - specify only the scopes you need
Get-MgUser -UserId jsmith@contoso.com -Property *copy Full user object including last sign-in, assigned licenses, account status
Get-MgUser -Filter "accountEnabled eq false"copy All disabled accounts in the tenant
Update-MgUser -UserId jsmith@contoso.com -AccountEnabled $falsecopy Disable a user account
Get-MgGroup -Filter "displayName eq 'VPN Users'"copy Find a group by display name
Get-MgGroupMember -GroupId <GroupId>copy List all members of a group
New-MgGroupMember -GroupId <GroupId> -DirectoryObjectId <UserId>copy Add a user to a group
Get-MgUserAuthenticationMethod -UserId jsmith@contoso.comcopy List registered MFA methods for a user
Get-MgAuditLogSignIn -Filter "userPrincipalName eq 'jsmith@contoso.com'" -Top 20copy Recent sign-in activity for a user including location, device, and result
Get-MgSubscribedSkucopy All M365 license SKUs in the tenant with consumed vs available counts
Entra Connect (AD Sync)
Run on the Entra Connect server. Requires the ADSync module (installed automatically with Entra Connect).
Command Description
Start-ADSyncSyncCycle -PolicyType Deltacopy Sync only changes since the last cycle - fast, use this for most manual syncs
Start-ADSyncSyncCycle -PolicyType Initialcopy Full sync of all objects - slower, use after major AD changes or connector reconfiguration
Get-ADSyncSchedulercopy Show sync schedule, next run time, and whether sync is enabled
Set-ADSyncScheduler -SyncCycleEnabled $falsecopy Pause automatic sync cycles - useful during maintenance or bulk AD changes
Get-ADSyncConnectorRunStatuscopy Check if a sync cycle is currently running before triggering a manual one
Export-ADSyncToolsHybridAadJoinReportcopy Report on Hybrid Azure AD Join status for domain-joined devices
Exchange Online Essentials
Install: Install-Module ExchangeOnlineManagement then Connect-ExchangeOnline
Command Description
Get-Mailbox -Identity jsmithcopy Mailbox details - type, quota, forwarding, aliases
Get-Mailbox -RecipientTypeDetails SharedMailboxcopy List all shared mailboxes in the org
Add-MailboxPermission -Identity shared@ -User jsmith -AccessRights FullAccesscopy Grant full access to a shared mailbox
Get-MessageTrace -SenderAddress user@contoso.com -StartDate (Get-Date).AddDays(-2)copy Trace sent mail - check delivery status, routing, spam filtering decisions
Set-Mailbox -Identity jsmith -ForwardingSmtpAddress "" -DeliverToMailboxAndForward $falsecopy Remove email forwarding - check all mailboxes for unauthorised forwarding
Get-Mailbox -ResultSize Unlimited | Where {$_.ForwardingSmtpAddress -ne $null}copy Audit all mailboxes with forwarding configured - security check
M365 Security Resources
Resource URL What it Covers
CISA SCUBA Project cisa.gov/scuba Secure configuration baselines for M365 and Teams - free assessment tooling included
Compromised Account Checklist learn.microsoft.com Microsoft's step-by-step guide for responding to a breached email account
O365 Security Best Practices lazyadmin.nl Practical hardening checklist: MFA, Secure Score, audit logging, anti-phishing policies
Intune / Endpoint Manager
Concept Description
Enrollment How devices join Intune - Autopilot (new devices), MDM enrollment (existing), or BYOD via Company Portal
Compliance Policy Rules a device must meet (encrypted, PIN, OS version) - non-compliant devices can be blocked by Conditional Access
Configuration Profile Push settings to devices - WiFi, VPN, certificates, restrictions, BitLocker enforcement
App Protection Policy MAM - protect org data in apps without full device enrolment (BYOD scenario)
Autopilot Zero-touch Windows provisioning - device ships to user, they sign in, Intune does the rest
Device Actions Remote wipe, sync, restart, BitLocker key rotation - available per device in Intune portal
Scope Tags RBAC for Intune - limit what admins can see and manage to their region or team
Communities & Learning
Resource URL / Location What it Covers
r/sysadmin · r/linux · r/linuxadmin · r/netsec reddit.com/r/sysadmin Community Q&A, incident threads, war stories, tooling discussions
Brutalist Report brutalist.report Daily tech & security headlines, aggregated and unformatted
Microsoft Learn learn.microsoft.com Free official docs, learning paths, and certifications for Azure, Windows, and M365
O'Reilly Topics oreilly.com/topics Broad technical learning - books, videos, courses
Ask Ubuntu askubuntu.com Ubuntu-focused Q&A, highly indexed by search engines
DigitalOcean Tutorials digitalocean.com Clear, practical guides for Linux, OSS, and infra topics
ServerFault serverfault.com Stack Exchange for professional sysadmins and network engineers
Core Tools
Tool URL / Source What it Does
MX Toolbox mxtoolbox.com DNS, mail, SPF / DMARC / DKIM checks in one place
Sysinternals Suite learn.microsoft.com Windows diagnostics & troubleshooting (Process Monitor, Autoruns, TCPView…)
PuTTY chiark.greenend.org.uk SSH, Telnet, serial - still essential for Cisco and console work
WinSCP winscp.net Fast file transfer over FTP / SFTP / SSH with GUI
Angry IP Scanner angryip.org Quick network sweeps - host discovery and port scan
WinDbg learn.microsoft.com Windows kernel and crash dump debugging
Wireshark wireshark.org Packet capture and deep protocol analysis
Rufus rufus.ie Write bootable USB images (ISO to USB) on Windows
Nmap nmap.org Network scanning, host discovery, OS fingerprinting, port enumeration
OpenSSL openssl.org TLS, certificate generation, cert inspection, and crypto utilities
Git git-scm.com Version control for scripts, configs, and infrastructure-as-code
M365 Maps m365maps.com Visual map of M365 service dependencies and license feature inclusions
cmd.ms cmd.ms Shortcut directory for Microsoft admin portals - cmd.ms/intune, cmd.ms/aad, etc.
KeePass keepass.info Open-source local password manager - encrypted vault, portable, no cloud required
Bitwarden bitwarden.com Open-source cloud password manager - self-hostable, browser extensions, team vaults
JAMF Pro jamf.com MDM for Apple endpoints - config profiles, policies, app deployment, and Autopilot-equivalent for macOS
Crontab Guru crontab.guru Cron expression editor and validator - instant visual feedback
cheat.sh cheat.sh Instant CLI cheatsheets from the terminal: curl cheat.sh/tar
End-of-Life Info endoflife.date Support and EoL timelines for OS, runtimes, databases, and tools
Diagnostics & Security
Tool URL What it Does
WhatIsMyIPAddress whatismyipaddress.com IP lookup with strong GeoIP resolution - useful for egress verification
Cloudflare Speed Test speed.cloudflare.com Clean download / upload / latency test - no ads, no Flash
VirusTotal virustotal.com Malware and URL scanning across 60+ antivirus engines simultaneously
ANY.RUN app.any.run Interactive sandbox for malware and phishing analysis - watch execution live
Shodan shodan.io Search engine for internet-exposed devices. Query: org:"YourOrg" or net:"IP/range"
crt.sh crt.sh Certificate Transparency log search - use %.domain.com to enumerate subdomains
SSL Labs ssllabs.com/ssltest In-depth TLS/HTTPS grade report. Aim for A+: TLS 1.3, no weak ciphers, HSTS enabled
ViewDNS viewdns.info DNS recon toolkit - Reverse IP Lookup reveals all sites sharing a server
No results found. Try a different search term.