​​ ​

The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.


You can continue to find trusted guidance and support on the official Apple Support site. 


We want to thank the community members who have contributed their time and expertise to help others with their Apple products.


ls: : Operation not permitted

How can I list the contents of the Desktop using the 'ls' command in bash and zsh? Currently I'm getting the message:

ls: : Operation not permitted


The execution is not permitted even using 'sudo'


Posted on Apr 23, 2021 5:54 PM

Question marked as Top-ranking reply

Posted on Apr 23, 2021 8:57 PM

System Preferences > Security & Privacy > Privacy > select Full Disk Access on the left, add Terminal.app on the right, and see if things work better.

3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ls: : Operation not permitted

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.