0
Command 'sed' is available in the following places
 * /bin/sed
 * /usr/bin/sed
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
sed: command not found
Command 'ls' is available in the following places
 * /bin/ls
 * /usr/bin/ls
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
1
  • 2
    Please, edit you post and add the output of this command echo $PATH
    – sotirov
    Commented May 27 at 11:35

1 Answer 1

2

Looks like your have a problem with your $PATH variable. To confirm this is the problem, check the output of:

echo "$PATH"

Executing this in your terminal should fix the problem temporary:

export PATH="/usr/bin:$PATH"

If you want to make the change permanent, add this line at the end of your ~/.bashrc file:

export PATH="/usr/bin:$PATH"
5
  • 2
    +1 but I've got a feeling there might be more to this (missing /bin etc), /usr/bin is in PATH even when bash is started with an empty environment (env -i bash)
    – kos
    Commented May 27 at 10:59
  • 1
    @kos Yep, I am pretty sure the OP is not telling us something. :) A probable scenario is: something else overwriting the default $PATH.
    – sotirov
    Commented May 27 at 11:14
  • I don't think /bin specifically matters too much since they made /bin a symlink to /usr/bin (maybe), my point was more they may have PATH set to an empty string or something, as I can't see something randomly and surgically slicing just /usr/bin away. shrug
    – kos
    Commented May 27 at 11:23
  • 1
    @kos What I mean by overwriting is that the OP may have export PATH=... somewhere without adding the $PATH part. For example doing something like export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin instead of export PATH=$PATH:/usr/lib/jvm/java-8-openjdk-amd64/bin.
    – sotirov
    Commented May 27 at 11:33
  • Sure, agreed, I guess they'll tell us :)
    – kos
    Commented May 27 at 11:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .