• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

errno: Look up errno names and descriptions

by admin

In computer programming, the term “errno” refers to a mechanism used by programming languages and operating systems to handle and communicate error conditions. It is typically an integer variable that holds a specific error code value when an error occurs during the execution of a program.

When an error occurs, the operating system sets the value of errno to a specific error code that represents the type of error encountered. These error codes are standardized and each code corresponds to a specific error condition. The purpose of errno is to provide developers with a way to identify and handle different types of errors in their code.

To make working with errno easier, most programming languages provide a way to look up the names and descriptions associated with specific errno values. This allows developers to understand the meaning of the error and take appropriate action based on the error code.

For example, if a file operation fails, the programming language or operating system may set the errno variable to a value like “ENOENT,” which stands for “No such file or directory.” By looking up this error code, the developer can determine that the file they were trying to access does not exist, and can handle the error accordingly, such as displaying an error message to the user or taking alternative steps.

The process of looking up errno names and descriptions usually involves referring to the documentation or header files provided by the programming language or operating system. These resources contain a list of all possible errno values and their corresponding names and descriptions.

By understanding the errno values and their meanings, developers can create more robust and reliable software by appropriately handling different error conditions that may arise during program execution.

errno Command Examples

1. Lookup errno description by name or code:

# errno name|code

2. List all errno names, codes, and descriptions:

# errno --list

3. Search for code whose description contains all of the given text:

# errno --search text

4. Search for code whose description contains all of the given text (all locales):

# errno --search-all-locales text

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to mount and umount a file system in Linux
  2. CentOS / RHEL : How to create new LVM based swap partition
  3. mons Command Examples in Linux
  4. login: command not found
  5. Example of using getnstimeofday in Linux kernel
  6. nmcli radio Command Examples in Linux
  7. local Command Examples
  8. What is the purpose of “wheel” group in Linux
  9. CentOS / RHEL : Converting an Existing Root Filesystem to LVM Partition
  10. btrbk: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright