How can we hide the file and folders with the terminal commands? Can we even hide the hard disk partitions?
In the world of Linux, any file or directory that's name starts with a
. is considered hidden.
Note that hiding a file or directory is not a measure of security, it's just for convenience, so that unnecessary files such as configuration files don't bother your daily routine. They can be listed easily if you wanted, e.g.
As for hiding partitions, you can use
gparted to set a "hidden" flag on partitions. This will hide the partition from operating systems. Note that this can be easily reverted, so don't use this for hiding sensitive data.
If you want to operate on the same disk you're booting from, you might need a live CD/DVD or (preferably) a live USB stick.
If you are looking for security, search this site (or Google) for encrypted folders and partitions.