0

When I run $tmux and open an instance of a tmux session and try to run a command such as ls I receive the following error:

∆ ls
Command 'ls' is available in the following places
 * /bin/ls
 * /usr/bin/ls
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.

ls: command not found

1 Answer 1

1

Check your PATH before and after invoking tmux

echo $PATH

Then check your ~/.bash_profile. There must be something there that is overriding your current $PATH.

3
  • It's more likely .tmux.conf that's overwriting $PATH - otherwise, bash alone would have the same problem. Commented Nov 17, 2020 at 9:38
  • not in tmux echo $PATH: /home/kcrum/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin in tmux echo $PATH: /home/kcrum/.local/bin Commented Nov 17, 2020 at 17:37
  • so I found in my .bash_profile I had export PATH="/home/kcrum/.local/bin" After getting rid of the line it startef to work. Im curious if it was never a problem before because previously my shell would only source .bashrc Commented Nov 17, 2020 at 17:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.