how to remove a directory from $PATH

I added my $HOME/bin to my PATH with the command
exportPATH=$PATH:/home/bin:

When $PATH is executed, I get the following error
bash:/sbin:/bin:/usr/sbin:/usr/bin:/home/bin:: No such file or directory

Im not sure how to remove this error

You probably should have used:

export PATH=$PATH:$HOME/bin

If you ran that “export” at the command line, the effects should go away when you close that terminal. If you put it in your “.bashrc” or “.profile”, then fix that file and then logout and login again.

This makes no sense. $PATH is not meant “to be executed”. Copy and paste exact command invocation that gives you that error.

On 1/19/19 2:06 PM, nrickert wrote:
>
> jarel1986;2891960 Wrote:
>> I added my $HOME/bin to my PATH with the command
>> exportPATH=$PATH:/home/bin:
>>
>> When $PATH is executed, I get the following error
>> bash:/sbin:/bin:/usr/sbin:/usr/bin:/home/bin:: No such file or directory
>>
>>
>> Im not sure how to remove this error
>
> You probably should have used:
>
> Code:
> --------------------
> export PATH=$PATH:$HOME/bin
> --------------------
>
>
> If you ran that “export” at the command line, the effects should go away
> when you close that terminal. If you put it in your “.bashrc” or
> “.profile”, then fix that file and then logout and login again.
>
>

No need to logout/in. just use
Code:


… .profile
or
… .bashrc


This causes the .profile/.bashrc to be reread.


Ken
unix since 1986
S.u.S.E.-openSUSE since 1998

Thank you. the error in fact did go away.