How Linux Hides Files with a Leading Period Character

To hide the file on a Linux system, you have to start the filename with a specific character. What is the character?

  1. Tilde (~)
  2. Underscore (_)
  3. Period (.) Correct Answer
  4. Exclamation mark (!)
Answer Correct answer: C — On Linux, prefixing a filename with a period (.) makes it a hidden dotfile that standard listings like ls omit.

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The tested fact is that a leading period makes a file hidden on Linux; the trap is assuming any special or non-alphanumeric character hides a file, when only the dot prefix has that meaning.

On Linux, files and directories whose names begin with a period (.) are treated as hidden and are omitted from standard directory listings such as ls. This question confirms that the leading dot character is the mechanism, and that options like the tilde, underscore, or exclamation mark have no hiding property.

Learners sometimes pick Underscore (_) or Tilde (~) because those characters begin shell temporary or backup files, but those are naming conventions with no hiding effect — only the period prefix causes ls and file managers to treat a file as hidden.

Community Discussion (5 comments)

a307962 👍 1 Selected: C
...c...
LordXander 👍 1 Selected: C
..... C .....
MustafaDDD 👍 1 Selected: C
C is correct - Period (.)
insaniunt 👍 2 Selected: C
C. Period (.)
nosavotor 👍 1
Im not certain about this ethical hacking concept

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

In Linux, any file or directory whose name starts with a period is classified as a dotfile and is not shown by default by tools like ls, nor by most graphical file managers. This is a convention built into the standard listing utilities, not an encryption or permission feature — the data is fully readable to anyone who knows the exact filename or runs ls -a. Attackers and administrators alike use this for concealment, for example dropping payloads such as.bash_profile additions or hidden reverse shells in a user's home directory. The exam context of system hacking (M06) fits: hiding artifacts is a basic post-exploitation step on Linux hosts.

Why the Other Options Are Wrong

A. Tilde (~) is used by shells to denote the user's home directory (e.g., ~/config) and by editors for backup files, but a leading tilde does not hide the file from ls. B. Underscore (_) is merely a common name-prefix convention to force files to sort first alphabetically; ls still lists them normally. D. Exclamation mark (!) has shell history-expansion meaning and no relationship to hidden-file semantics, and it is generally awkward or restricted in filenames. Only the period prefix changes listing behavior, making C the only correct choice.

Community Comment Notes

The learner votes are unanimous for C, with commenters such as MustafaDDD stating "C is correct - Period (.)" and insaniunt echoing "C. Period (.)". No comment disputes the answer or raises a competing option, and LordXander and a307962 likewise mark C. One learner, nosavotor, expressed uncertainty about the ethical hacking concept itself rather than challenging the option, which the explanation above resolves.

Exam Strategy

Treat this as a quick-recall Linux fundamentals item: memorize the pairing "hidden file = leading dot" alongside the command ls -a (or ls -A) that reveals them. Do not overthink it by looking for a security or permission mechanism — hiding here is purely a name-prefix convention.

Frequently Asked Questions

Why doesn't starting a filename with an underscore hide it on Linux?

The underscore is only a sorting convention to make files appear first alphabetically. Tools like ls still list underscore-prefixed files normally; only a leading period is treated as hidden.

How do you view files hidden with a leading period on Linux?

Use ls -a (show all) or ls -A (exclude . and ..), or enable 'show hidden files' in a graphical file manager. The file contents are never protected — only omitted from default listings.

More 312-50v12 FAQ →

Related Analysis

← Back to 312-50v12 Study Guide