In Linux and other Unix-based operating systems, files and folders with names starting with a period (.) are considered hidden. By default, file managers such as Nautilus and Dolphin, as well as command-line tools like ls, do not display these hidden files and folders.
To reveal hidden files and folders in Linux, use the ls command in the terminal, which has a built-in option to display items starting with a period (.).
Steps to view hidden files and folders in Linux:
- Open the terminal.
- Navigate to the folder containing the hidden files or folders.
$ cd temp/
- Display regular files and folders in the directory using the ls command.
$ ls file folder
- To show all files and folders in the directory, including hidden ones, use the ls command with appropriate options.
$ ls -a . .. file folder .hidden-file .hidden-folder
ls option:
-a, --all do not ignore entries starting with .
- For additional information on the files, use the ls command with appropriate options.
$ ls -la total 16 drwxrwxr-x 4 user user 4096 Oct 31 09:27 . drwxr-xr-x 5 user user 4096 Oct 31 09:26 .. -rw-rw-r-- 1 user user 0 Oct 31 09:27 file drwxrwxr-x 2 user user 4096 Oct 31 09:26 folder -rw-rw-r-- 1 user user 0 Oct 31 09:27 .hidden-file drwxrwxr-x 2 user user 4096 Oct 31 09:26 .hidden-folder
. and .. are special folders which refers to current and one-up folder respectively
- You can also list files and folders using their absolute paths.
$ ls -la /home/user/temp/ total 16 drwxrwxr-x 4 user user 4096 Oct 31 09:27 . drwxr-xr-x 5 user user 4096 Oct 31 09:26 .. -rw-rw-r-- 1 user user 0 Oct 31 09:27 file drwxrwxr-x 2 user user 4096 Oct 31 09:26 folder -rw-rw-r-- 1 user user 0 Oct 31 09:27 .hidden-file drwxrwxr-x 2 user user 4096 Oct 31 09:26 .hidden-folder
![](https://www.simplified.guide/_media/page/author/shakir/mohd-shakir-zakaria.jpg?w=200&tok=d15487)
Author: Mohd
Shakir Zakaria
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
![](data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABOElEQVRIia2VYXHDMAyFPwiBEAiBYAYLg5lBC8EQyqBmsDFoGKQMFgYNg+1H5jtFtmMn6bvzj9jWe7IUSVBGD9yBh1p34KPCPosr8AJ+C+sFXPYQd8BYQazX+G9bJK/xeus1WRFJ7oAGsMAkCCbgKb5ncbcXIm1KQBoasd9kvGoTRDJcK1jWT+1THhTQKg4rD+c3CUien3BgFPlwgDzAKS4DcGPjaTvRKa4bLB5HqicQReOdAk2NwPWEgKkReJwQ0PkcALzaPBqmhrjNeIiLLJT7HpFcg7RBWcbfsQ7XhXyr+GSZC7nm14TLXnjeERdMKvH6n9fLa29CmYckO5YkfUtPFKYM+Uyio1pxoXZCDRkBmzPw4tIIfLH926YEfMkrlzCqFaguUsN6AJUEnhxsMT1LknNwFGbHH5UF4DVNwliLAAAAAElFTkSuQmCC)
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
Discuss the article:
Comment anonymously. Login not required.