-2

I messed up my path but for some reason I cannot fix it I have not looked at those settings in a while and really I forgot but every time I open a new terminal I have to set the path:

root@root:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

If I don't then I get:

bash: ls: command not found

For all commands so every time I open a new terminal I have to set the path I don't know whats going on.

I have looked everywhere and i cant find any answers was hoping someone could help me on this and also my /etc/environment for some reason is empty now.

"setup"
root@root:uname -a
Linux dondata 5.3.0-kali2-amd64 #1 SMP Debian 5.3.9-1kali1 (2019-11-11) x86_64 GNU/Linux
jww
  • 97,681
  • 90
  • 411
  • 885
  • 1
    Stack Overflow is a site for programming and development questions. You should probably use another site on the [Stack Exchange network](https://stackexchange.com/sites) for this question. Also see [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. – jww Nov 19 '19 at 17:23

1 Answers1

0

Add this line in you .bash_profile file and logout then login again and check:

export PATH=/usr/sbin:/usr/bin:/sbin:/bin/:/usr/local/sbin:/usr/local/bin
Romeo Ninov
  • 6,538
  • 1
  • 22
  • 31