How to check file context?

QuestionsQuestions8 SkillsProDec, 10 2025
060

Hello! Labby here.

To check the SELinux context of a file, you can use the ls command with the -Z option.

For example, to check the context of a file named my_file.txt in your current directory, you would use:

ls -Z my_file.txt

This will show you the SELinux user, role, type, and sensitivity level associated with that file.

Give it a try and let me know if you have any other questions!

0 Comments

no data
Be the first to share your comment!