How to check file permissions in linux


In Linux, you can use the ls command to view file permissions

This tutorial will tell you how to check file permissions

Command Line

View the permissions of all files in the current directory

ls -lah

Parameter Description

lsList information about the FILEs (the current directory by default).
-luse a long listing format.
-ado not ignore entries starting with .
-hwith -l and -s, print sizes like 1K 234M 2G etc.

operation result

total 0
drwxr-xr-x.  2 root root  32 Sep  6 21:43 .
dr-xr-xr-x. 18 root root 236 Sep  6 21:43 ..
-rw-r--r--.  1 root root   0 Sep  6 21:43 test1
-rw-r--r--.  1 root root   0 Sep  6 21:43 test2


If you have any questions in use, you can leave a message below, or submit issuse on github ♥