B.17. Lab B.17: Hide a Linux File

This lab requires a Linux workstation.

If an attacker is truly looking for something on your system, they will find it. A great many problems, however, occur from users who are acting out of maliciousness, spite, or similar motives, and it is much easier to keep files safe from them because they often don't have the same tools or knowledge as outside attackers.

One simple method for "protecting" a file is to hide it. To hide a file in Linux, you use the period character (.) as the first character of its name. It will then no longer appear in listings unless you use the –a option (such as ls –a). Here are the steps for the user sven to hide the text file pageup within his home directory:

  1. From the desktop, choose ...

Get CompTIA Security+™ Deluxe: Study Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.