• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 74
  • Last Modified:

I cannot execute lsnrctl in Linux RHEL7

I can clearly see the file:

[oid bin]$ ls -xl lsn*
-rwxr-xr-x. 1 775 oracle  65053 Jun 30  2014 lsnodes
-rwxr-x--x. 1 775 oracle 155872 Jan 31  2017 lsnrctl
-rwxr-xr-x. 1 775 oracle      0 Jul  6  2015 lsnrctl0

but get this:

[oid bin]$ lsnrctl status
bash: lsnrctl: command not found

I am new to Linux, but executed:
 sudo chown -R 775 /oracle directory name

still no love....

What gives?
  • 2
  • 2
1 Solution
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Try with ./lsnrctl status
cyimxtckAuthor Commented:
that was it mate!  THANKS a ton!!!  :)

Why do I need that preceding ./ in there when I am already in the directory?

Just curious...
cyimxtckAuthor Commented:
very easy solution, if you know what you are doing :)
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
For security reasons, the current working directory will not be searched for executables (including shell scripts). You need to extend the path variable by all paths you want to use those from. Or provide a path when calling, like shown above.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now