+2 votes
in Operating Systems by (72.8k points)

When I run $PATH in Ubuntu terminal, I see the libraries. But it also gives error/warning: "No such file or directory". Is it an error or it's fine?

$ $PATH
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin: No such file or directory
 

1 Answer

+1 vote
by (355k points)
selected by
 
Best answer

There is nothing wrong in your output. $PATH is a variable, not a UNIX command. Run 'echo $PATH' instead of '$PATH' in Ubuntu terminal and you will not see the warning message:"No such file or directory"

$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:

Related questions

+3 votes
1 answer
+2 votes
1 answer
+2 votes
1 answer

...