semanage Verified current stable Not installed? Filesystem

Semanage / Add Labeling Equivalence Between Subpaths Linux

Add Labeling Equivalence Between Subpaths Linux

Semanage command syntax to add labeling equivalence between subpaths linux. Copyable examples, output expectations, and common mistakes.

$
Terminal
sudo semanage fcontext -a -e /<path/to/ref> /<path/to/target>

Command Breakdown

What each part is doing

sudo
Base Command
The executable that performs this operation. Here it runs Semanage before the shell applies any redirect operators.
-a
a| add
The value supplied for a| add.
-e
e| equal
The value supplied for e| equal.
<path/to/ref>
path to ref
The value supplied for path to ref.
<path/to/target>
path to target
The value supplied for path to target.
-a
Command Option
Tool-specific option used by this command invocation.
-e
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative filesystem tools for the same job.