Advanced
Searching inHow-to guides
How to search
  • Type the task in your own words (find port, open firewall, disk full) or paste an error message in quotes.
  • Choose "Quick answer" to see only the commands, or an area to stay in one field.
  • "two words" finds the exact phrase.
  • Plain words find names, texts and examples.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search
Try:

How-to guides

Short, exact answers to the tasks you do every day in IT, DevOps and DevSecOps work — find a port, install SSH, open the firewall, read logs, fix a Pod. Each how-to gives the quick answer first, then the steps on RHEL and Ubuntu, a check, the common problems, and links to the full guides and command pages on this site.

  • 250 ready how-tos
  • 300 planned, goal 1,000
  • 12 areas

How every how-to works

  1. 1Quick answerThe commands first
  2. 2Step by stepRHEL and Ubuntu explained
  3. 3Check itProve that it worked
  4. 4Fix problemsThe errors you will see
  5. 5Go furtherFull guides

Ready how-tos

The top 10

Ranks 11–20

Ranks 21–30

Ranks 31–40

Ranks 41–50

Ranks 51–60

Ranks 61–70

Ranks 71–80

Ranks 81–90

Ranks 91–100

Ranks 101–110

Ranks 111–120

Ranks 121–130

Ranks 131–140

Ranks 141–150

Ranks 151–160

Ranks 161–170

Ranks 171–180

Ranks 181–190

Ranks 191–200

Ranks 201–210

Ranks 211–220

Ranks 221–230

Ranks 231–240

Ranks 241–250

The plan — the most used how-tos

Ranked by how often the task comes up in real work. The list grows to 1,000. A ready how-to has a link; the chips open the command page and the full install guide.

#How to …AreaLinks
1Find which process uses a portNetwork
2Install and enable the SSH serverSystem
3Log in with SSH keys instead of passwordsSecurity
4Open a port in the firewallNetwork
5Check disk space and find what fills the diskSystem
6Read and follow the logs of a serviceSystem
7Start, stop, restart and enable a serviceSystem
8Create a user with sudo rightsSecurity
9Test if a remote port is openNetwork
10Find files by name, size, date or contentSystem
11Check memory and CPU usageSystem
12Kill a process that hangsSystem
13Change file permissions and ownerSecurity
14Create and extract tar.gz archivesSystem
15Set a static IP addressNetwork
16Check the DNS records of a domainNetwork
17Copy files between serversSystem
18Schedule a job with cronSystem
19Create a systemd timerSystem
20Check when a TLS certificate expiresSecurity
21Get a free TLS certificate with Let's EncryptWeb
22Set up Nginx as a reverse proxyWeb
23Install Docker on LinuxContainers
24Run a container and publish a portContainers
25See the logs of a containerContainers
26Free disk space used by DockerContainers
27Write a small and safe DockerfileContainers
28Run an app with Docker ComposeContainers
29Push an image to a private registryContainers
30Scan a container image for vulnerabilitiesSecurity
31Find why a Kubernetes Pod does not startKubernetes
32Get the logs of a crashed PodKubernetes
33Open a shell in a running PodKubernetes
34Port-forward to a Kubernetes serviceKubernetes
35Roll back a Kubernetes deploymentKubernetes
36Scale a deployment up and downKubernetes
37Create a Kubernetes Secret safelyKubernetes
38Switch between clusters and namespacesKubernetes
39Install an app with HelmKubernetes
40Back up and restore etcdKubernetes
41Undo the last Git commitGit and CI/CD
42Resolve a Git merge conflictGit and CI/CD
43Remove a secret from Git historySecurity
44Sign Git commitsSecurity
45Create a CI pipeline in GitHub ActionsGit and CI/CD
46Run GitLab CI jobs on your own runnerGit and CI/CD
47Install a package on many servers with AnsibleIaC and automation
48Store Terraform state in S3 with lockingIaC and automation
49Import an existing resource into TerraformIaC and automation
50Plan and apply Terraform safelyIaC and automation
51Log in to AWS with SSO from the terminalCloud
52Copy files to and from S3Cloud
53Find public S3 bucketsSecurity
54Connect to an EC2 instance without SSH keysCloud
55Log in to Azure and choose a subscriptionCloud
56Get the kubeconfig of EKS, AKS or GKECloud
57Create a PostgreSQL user and databaseData
58Back up and restore PostgreSQLData
59Back up and restore MySQLData
60See who is connected to a databaseData
61Reset a lost MySQL root passwordData
62Check Redis memory and keysData
63Monitor a Linux server with PrometheusMonitoring
64Build a Grafana dashboardMonitoring
65Send alerts to Slack or emailMonitoring
66Find slow requests in Nginx logsMonitoring
67List open network connectionsNetwork
68Trace the network path to a hostNetwork
69Capture network traffic with tcpdumpNetwork
70Add a network routeNetwork
71Change the hostnameSystem
72Set the time zone and sync the clockSystem
73Extend an LVM volume and its file systemSystem
74Add swap spaceSystem
75Mount a disk at boot with fstabSystem
76Find and fix SELinux denialsSecurity
77Harden the SSH serverSecurity
78Block brute-force logins with Fail2banSecurity
79Patch a server with security updatesSecurity
80Find files with risky permissionsSecurity
81See who logged in and whenSecurity
82Generate a strong password or secretSecurity
83Encrypt a file with GPG or ageSecurity
84Create a self-signed certificateSecurity
85Test an HTTP endpoint with curlWeb
86Check the TLS settings of a websiteWeb
87Redirect HTTP to HTTPS in NginxWeb
88Back up a server with resticSystem
89Sync folders with rsyncSystem
90Compare two files or foldersSystem
91Search text in many filesSystem
92Replace text in many filesSystem
93Read JSON in the shell with jqLanguages and build
94Write a safe Bash scriptLanguages and build
95Create a Python virtual environmentLanguages and build
96Run one command on many serversIaC and automation
97Find out why a server is slowSystem
98Find slow services at bootSystem
99Reset a lost root password on RHELSecurity
100Restart a service automatically when it crashesSystem
101Keep a session running with tmuxSystem
102Rotate log files with logrotateSystem
103Keep the journal after reboot and limit its sizeSystem
104Create a systemd service for your appSystem
105Give a service its environment variablesSystem
106Limit CPU and memory of a serviceSystem
107Check the health of a diskSystem
108Share a folder with NFSNetwork
109Mount a Windows or Samba shareNetwork
110Connect two servers with a WireGuard VPNNetwork
111Allow a port only from one IP addressSecurity
112Use a jump host (bastion) with SSHSecurity
113Manage many servers in the SSH config fileSystem
114Open an SSH tunnel to a databaseNetwork
115Lock or disable a user accountSecurity
116Set password rules and expirySecurity
117Watch file changes with auditdSecurity
118Check file integrity with AIDESecurity
119Audit a server with LynisSecurity
120Scan a website with OWASP ZAPSecurity
121Find secrets in a repository with GitleaksSecurity
122Find bugs in code with SemgrepSecurity
123Create an SBOM for an imageSecurity
124Sign and verify an image with CosignSecurity
125Enforce a Kubernetes policy with KyvernoKubernetes
126Detect a shell in a container with FalcoSecurity
127Apply Pod Security Standards to a namespaceKubernetes
128Write a Kubernetes NetworkPolicyKubernetes
129Give a user read-only access with RBACKubernetes
130Set resource requests and limitsKubernetes
131Add liveness and readiness probesKubernetes
132Expose an app with an Ingress and TLSKubernetes
133Use a ConfigMap for app settingsKubernetes
134Run a scheduled job with a CronJobKubernetes
135Drain a node for maintenanceKubernetes
136Upgrade a kubeadm clusterKubernetes
137See CPU and memory of Pods and nodesKubernetes
138Create a local cluster with kindKubernetes
139Deploy an app with Argo CD from GitGit and CI/CD
140Use Kustomize overlays per environmentKubernetes
141Build images for ARM and x86 with buildxContainers
142Run containers without root with PodmanContainers
143Run a container as a systemd serviceContainers
144Limit CPU and memory of a containerContainers
145Debug the network between containersContainers
146Back up and restore a Docker volumeContainers
147Copy images between registries with SkopeoContainers
148Cache dependencies in CIGit and CI/CD
149Use secrets safely in GitHub ActionsGit and CI/CD
150Deploy to Azure from GitHub Actions with OIDCCloud
151Build and push an image in CIGit and CI/CD
152Test on many versions with a CI matrixGit and CI/CD
153Make a release with a Git tagGit and CI/CD
154Work with branches and pull requestsGit and CI/CD
155Rebase a branch on mainGit and CI/CD
156Find the commit that broke somethingGit and CI/CD
157Park unfinished work with git stashGit and CI/CD
158Write a Terraform moduleIaC and automation
159Use Terraform variables per environmentIaC and automation
160Keep secrets out of TerraformIaC and automation
161Find drift between Terraform and the cloudIaC and automation
162Separate environments in TerraformIaC and automation
163Write an Ansible roleIaC and automation
164Encrypt secrets with Ansible VaultIaC and automation
165Use facts and conditions in AnsibleIaC and automation
166Build a VM image with PackerIaC and automation
167Set up a new VM with cloud-initIaC and automation
168Create a safe S3 bucket with TerraformCloud
169Get an alert before the AWS bill growsCloud
170See who did what in AWS with CloudTrailSecurity
171Rotate AWS access keysSecurity
172Create an Azure VM with the CLICloud
173Find costly resources in AzureCloud
174Lock an Azure resource groupCloud
175Create a private Azure storage accountCloud
176Query Azure logs with KQLMonitoring
177Search logs with Loki and LogQLMonitoring
178Ship logs with Fluent BitMonitoring
179Trace requests with OpenTelemetryMonitoring
180Monitor a website from outsideMonitoring
181Load test an API with k6Monitoring
182Define an SLO and an error budgetMonitoring
183Write a runbook for on-callMonitoring
184Monitor TLS certificates with PrometheusMonitoring
185Tune PostgreSQL memory settingsData
186Find slow PostgreSQL queriesData
187Set up PostgreSQL replicationData
188Find slow MySQL queriesData
189Restore PostgreSQL to a point in timeData
190Connect apps to Redis securelyData
191Create and test a Kafka topicData
192Check a RabbitMQ queueData
193Balance traffic with HAProxyWeb
194Add security headers in NginxWeb
195Rate-limit requests in NginxWeb
196Cache static files in NginxWeb
197Host two websites on one serverWeb
198Route containers with Traefik labelsWeb
199Debug DNS inside KubernetesKubernetes
200Write a post-incident reviewMonitoring
201Back up Kubernetes with VeleroKubernetes
202Store files in MinIO with the S3 APIData
203Find a memory leak in a processSystem
204See which files a process has openSystem
205Set up a highly available IP with keepalivedNetwork
206Send server mail through a relay with PostfixNetwork
207Read secrets from HashiCorp VaultSecurity
208Encrypt Kubernetes secrets in Git with SOPSSecurity
209Set up SSO login with KeycloakSecurity
210Scan Terraform code with CheckovSecurity
211Scan a server for compliance with OpenSCAPSecurity
212Share a folder with a group using ACLsSecurity
213Write sudo rules safelySecurity
214Find which package owns a fileSystem
215Partition and format a new diskSystem
216Repair a file system after a crashSystem
217Grow an XFS file system onlineSystem
218Protect a file with chattrSecurity
219Change kernel settings with sysctlSystem
220Load a kernel module at bootSystem
221Choose a performance profile with tunedSystem
222Clean temporary files with systemd-tmpfilesSystem
223Create a local package repositorySystem
224Register a RHEL server and enable repositoriesSystem
225Run a command once at a set timeSystem
226Change the priority of a processSystem
227Find big files and folders fastSystem
228Mount network folders on demand with autofsNetwork
229Write firewall rules with nftablesNetwork
230Set up a firewall with UFWNetwork
231Create a bridge or VLAN with nmcliNetwork
232Run your own DNS zone with BINDNetwork
233Set up an OpenVPN server for remote usersNetwork
234Find open ports on your servers with NmapSecurity
235Detect network attacks with SuricataSecurity
236Collect security events with WazuhSecurity
237Find vulnerable dependencies with GrypeSecurity
238Check code quality with SonarQubeGit and CI/CD
239Run a package proxy with NexusGit and CI/CD
240Build a pipeline with JenkinsGit and CI/CD
241Run GitHub Actions locally with actGit and CI/CD
242Reuse workflows in GitHub ActionsGit and CI/CD
243Deploy from Git with FluxGit and CI/CD
244Run a Tekton pipelineGit and CI/CD
245Promote a release from staging to productionGit and CI/CD
246Do a blue-green deployment in KubernetesKubernetes
247Do a canary release in KubernetesKubernetes
248Autoscale Pods with the HPAKubernetes
249Give a Pod persistent storageKubernetes
250Run a database as a StatefulSetKubernetes
251Spread Pods across nodes and zonesKubernetes
252Use taints and tolerationsKubernetes
253Find busy Pods quickly with k9sKubernetes
254Follow logs of many Pods with sternKubernetes
255Debug a node with kubectl debugKubernetes
256Check a cluster against CIS with kube-benchSecurity
257Turn on mTLS between services with IstioKubernetes
258Install the NGINX Ingress controllerKubernetes
259Run a small cluster with k3sKubernetes
260Create an EKS cluster with eksctlCloud
261Build a VPC with TerraformIaC and automation
262Test Terraform code before applyIaC and automation
263Move from Terraform to OpenTofuIaC and automation
264Keep Terraform DRY with TerragruntIaC and automation
265Write infrastructure in Python with PulumiIaC and automation
266Create cloud resources from Kubernetes with CrossplaneIaC and automation
267Test Ansible roles with MoleculeIaC and automation
268Use a dynamic inventory in AnsibleIaC and automation
269Build a test lab with VagrantIaC and automation
270Build an image-based server with bootcSystem
271Find services with ConsulNetwork
272Create a Google Cloud VM with gcloudCloud
273Give a GCP service account least privilegeCloud
274Use IAM roles instead of keys on EC2Cloud
275Restrict AWS accounts with an SCPSecurity
276Encrypt data with AWS KMSSecurity
277Store secrets in AWS Secrets ManagerSecurity
278Put a CDN in front of a websiteWeb
279Use Azure Key Vault from an appSecurity
280Run a container in Azure Container AppsCloud
281Set up a MongoDB replica setData
282Back up and restore MongoDBData
283Search logs in Elasticsearch and KibanaMonitoring
284Monitor servers with ZabbixMonitoring
285Speed up an app with MemcachedData
286Manage containers with PortainerContainers
287Build images without Docker using BuildahContainers
288Run a private registry with HarborContainers
289Build a small Go container imageLanguages and build
290Build a Java app with Maven in CILanguages and build
291Run a Node.js app as a serviceLanguages and build
292Run project tasks with MakeLanguages and build
293Edit YAML safely with yqLanguages and build
294Fill config templates with envsubstLanguages and build
295Run Python tests in CILanguages and build
296Host a website with Apache httpdWeb
297Get a wildcard certificate with DNS validationWeb
298Issue certificates in Kubernetes with cert-managerKubernetes
299Measure DORA metrics for your teamGit and CI/CD
300Plan and run a disaster recovery testMonitoring