Linux errno 2 (ENOENT) — No Such File or Directory
Warningerrno
Overview
Linux errno 2 (ENOENT) means the specified file or directory does not exist at the given path.
Key Details
- ENOENT — most common Linux error
- Path component does not exist
- Can occur with files, directories, sockets, or devices
- Shell may show "No such file or directory" message
Common Causes
- File path is misspelled or incorrect
- File was deleted or moved
- Symbolic link points to non-existent target
- Missing directory in the path hierarchy
Steps
- 1Verify the path exists: ls -la /path/to/file
- 2Check for typos in the filename or path
- 3Check symlinks: ls -la to see if link target exists
- 4Use find or locate to search for the file
Tags
linuxerrnoerrno 2 enoenttroubleshootingfix
More in Errno
linux-errno-1-epermLinux errno 1 (EPERM) — Operation Not Permitted
Warninglinux-errno-5-eioLinux errno 5 (EIO) — Input/Output Error
Errorlinux-errno-11-eagainLinux errno 11 (EAGAIN) — Resource Temporarily Unavailable
Informationallinux-errno-12-enomemLinux errno 12 (ENOMEM) — Out of Memory
Criticallinux-errno-13-eaccesLinux errno 13 (EACCES) — Permission Denied
Warninglinux-errno-22-einvalLinux errno 22 (EINVAL) — Invalid Argument
WarningFrequently Asked Questions
Check the full path — a parent directory may not exist, or there may be invisible characters.