Linux Oracle 11g/12c DB Create Listener Oracle Net Services configuration failed. The exit code is 1

The Tip Solve the Oracle 11g/12c Database Listener Creation: “Oracle Net Services configuration failed. The exit code is 1” also in Not Supported OS like Ubuntu Linux.

  1. Check if Paths Parameters are Properly Set:

    For 11g: How-to SetUp Pahs for Oracle 11g R2 Database Installation on Linux
    For 12c: How-to SetUp Paths for Oracle 12c Database Installation on Linux

  2. Then Disable Display Access Control with:

    sudo xhost +
  3. Next Try to Open a New Terminal Window and Login as oracle User