0

I am facing issues with linux command execution:

root@PGStaging:/etc# ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
root@PGStaging:~# ps
Command 'ps' is available in '/bin/ps'
The command could not be located because '/bin' is not included in the PATH environment variable.
ps: command not found

How to solve above issues?

Volker Siegel
  • 13,065
  • 5
  • 49
  • 65

1 Answers1

1

I have never faced this problem before, so I really don't know if this will work or not. Try this: Go to your home directory, there you can find a file named .bashrc (it is a hidden file, so enable 'show hidden files' in your file explorer for convenience). Open the file with a text editor. Then, at the end of the file, add this:

export PATH=$PATH:/bin

In theory, this will add /bin to your PATH variable. Then save the file. I hope this works. Good luck.