4

Am so tired of this..someone help..hv been settig temporary env variable each time i open a new terminal..i hv editted .profile and .bashrc yet no way..i want a global permanent setting..pls help!!!

Comments
  • 2
    You don't have /bin in your path?! What does echo $PATH say?
  • 0
    And pwd? And /bin/ls -a?
  • 1
    I did include /bin as seen here...😯
  • 0
    If you type "source .bashrc" right there, then ls? What does "echo $SHELL" say?
  • 0
    @progzilla well OK, you wrote that, but since it's not working, what does "echo $PATH" say?
  • 0
    @Gauthier thats the output
  • 0
    @Gauthier echo path and shell
  • 0
    Its really confusing
  • 1
    Why do you edit .profile with sudo? You shouldn't, it's your user's. Does ls work after this last screenshot?
  • 0
    Can you try removing /bin from the path variable. On my Linux machine, I am seeing that /bin is a symbolic link to /usr/bin.

    Also, can you check the output of the command 'which ls'? I got below output

    alias ls='ls --color=auto'
    /usr/bin/ls
  • 0
    @danglingPtr i got no output
  • 1
    @Gauthier i use to hv issues if i dont use sudo but i tried it now anyways
  • 0
    @danglingPtr removed /bin still same problem
  • 0
    Run ls with its path, "/bin/ls".
    And "which ls"
  • 0
    This might be nothing, but in my .bash_profile, there is an export PATH statement at the end. Probably you can try that.
  • 0
    execute that export command again and then try invoke ls command, see what happen
  • 0
    @blegh yes it works temporarily but i need to set for permanent
  • 0
    @progzilla make sure .profile have read and write access for your user, re-edit it and move/copy that PATH line outside if condition
  • 0
    Do edit it without sudo, I'm not sure it edits the right file if you do it as superuser.

    Put an 'echo "updating path"' right where you do it.

    And do add "export" before setting the path.

    Then start a new bash. Do you see the message?
  • 1
    @progzilla /bin should be first then /usr/bin then anything after that. The problem is that the bin isn't being called first. It should rectify.
Add Comment