thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Systems & Data Center · Intermediate

sed

The Linux stream editor that transforms text non-interactively, most often for search-and-replace.

Definition

sed applies commands such as s/old/new/g to each input line. -i edits files in place and -n with p prints selected lines.

Example

sed -i 's/^PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config hardens SSH.

Exam tip

The g flag replaces all matches on a line; without it only the first match changes.

Related terms