In Windows, hiding a file is usually done through the graphical interface (Properties), but if you are using the command line, you use the attrib command.
While in Linux you "hide" a file simply by renaming it to start with a dot, in Windows you change its "attributes."
The Windows Command
To hide a file in a Windows Command Prompt (CMD), you would use:
attrib +h filename.txt
attrib: The command to change file attributes.+h: The flag to add the hidden attribute.-h: The flag to remove the hidden attribute.
How it differs from the Lab
In your current Linux environment, there is no "hidden attribute" button. The ls command is programmed to ignore any file name that starts with a ..
That is why in this step:
lsshowstest_file.txt(no dot at the start).ls -ashows.and..(dots at the start).
If you want to practice "hiding" a file right now in Linux, try renaming one of your existing files:
mv test_file.txt .test_file.txt
Now run ls — the file will "disappear" from the standard view! Run ls -a to see it again.
Does that make sense compared to how Windows works?