AI Hints
Home›Linux Tutorial›ls Options
Linux · Lesson 20 of 120

Hidden Files

Names that start with a dot.

⏱ 2 min read▶ Video at 23:30🎓 Free
Watch this lesson in the Linux courseWatch on YouTube ↗Full Linux course

Your home folder looks tidy. But it isn't telling you everything. Linux hides some files, to keep things clean. And these hidden files are often the most interesting ones.

Hidden Files
From the video: Hidden Files
  • Home looks tidy
  • Some files are hidden
  • Often the interesting ones

Showing everything

The rule is simple. Any file whose name starts with a dot is hidden. Dash A, for all, shows them. Now we see dot bash RC, dot profile, and dot bash logout. These hold your shell's settings. We also see dot, and dot dot, this folder, and the parent.

Terminal
ls
Documents  Downloads  Music  Pictures  notes.txt  todo.txt
ls -a
.   .bash_logout  .profile   Downloads  Pictures   todo.txt
..  .bashrc       Documents  Music      notes.txt

What hidden files are for

Hidden files are usually settings, also called dotfiles. Dot bash RC configures your shell. Programs save their own settings in hidden files and folders too, like dot config. They're hidden, so they don't clutter your view, not for security. Anyone who can see the folder can still see them with LS dash A.

.bashrcyour shell's settings
.profileruns when you log in
.config/many programs' settings
Not secretjust out of the way

Making a hidden file

Making a file hidden is easy. Just start its name with a dot. Touch creates an empty file, and we'll learn it properly soon. Plain LS doesn't show dot secret, but LS dash A does.

Terminal
touch .secret
ls
Documents  Downloads  Music  Pictures  notes.txt  todo.txt
ls -a
.   .bash_logout  .profile  Documents  Music     notes.txt
..  .bashrc       .secret   Downloads  Pictures  todo.txt

Summary

Files that start with a dot are hidden, and LS dash A shows them. They're usually settings files. Next, let's read every column of the long listing.

Key takeaways
  • Dot = hidden
  • ls -a shows them
  • Usually settings
Next up: Reading ls -l — every column explained