How do I check if a file is an executable on Linux using Nim? Thanks in advance. Answer You can use getFilePermissions and check if a certain FilePermission is in the set it returns. You’d probably want to check if all three different Exec variants are in it: