diff --git a/docs/install/linux-repository.md b/docs/install/linux-repository.md
index 1e7e318c4ae70dbbbcc3c90ba7975db27d10ef60..4f3937f421469e79c8602d061a794aed68783739 100644
--- a/docs/install/linux-repository.md
+++ b/docs/install/linux-repository.md
@@ -66,7 +66,7 @@ To install the Runner:
     be done manually or automatically - will be done using the same source:
     >
     ```bash
-    cat > /etc/apt/preferences.d/pin-gitlab-runner.pref <<EOF
+    cat <<EOF | sudo tee /etc/apt/preferences.d/pin-gitlab-runner.pref
     Explanation: Prefer GitLab provided packages over the Debian native ones
     Package: gitlab-runner
     Pin: origin packages.gitlab.com