Back to lessons

Web Server Rescue

Check the Current Release Symlink

A deploy uses a current symlink and you need to verify the active release.

Command

readlink -f releases/current && ls -ld releases/current

What changed

Nothing changes. The command resolves and displays the symlink.

Danger

safe

When to use it

Use after deploys, rollbacks, or suspicious version mismatches.

When not to use it

Do not use it if your platform does not use release directories or symlinks.

Undo or recovery

No undo needed because this command is read-only.

Expected output

The absolute path of the active release and the symlink metadata.

demo script

Disposable terminal steps

  1. ls -l releases
  2. readlink -f releases/current && ls -ld releases/current

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ ls -l releases
total 8
drwxr-xr-x 2 root root 4096 Jun 25 13:19 2026-06-25-1200
drwxr-xr-x 2 root root 4096 Jun 25 13:19 2026-06-25-1215
lrwxrwxrwx 1 root root   15 Jun 25 13:19 current -> 2026-06-25-1215
::exit-code::0
$ readlink -f releases/current && ls -ld releases/current
/lab/releases/2026-06-25-1215
lrwxrwxrwx 1 root root 15 Jun 25 13:19 releases/current -> 2026-06-25-1215
::exit-code::0

YouTube Short

Which release is live?

If deploys use a current symlink, readlink shows the real active release path immediately.

LinkedIn hook

One glance tells you which release directory production is pointing at.

Question: Does your deploy system make the active release obvious?

experiments

A/B tests to run

Metric: click_through_rate

A: Which release is live?

B: Check production's current symlink.