Where exactly in .bashrc set PATH?

debian, linux, path

Solution

You are using the wrong syntax. Drop the spaces:

export PATH=$PATH:/home/username/foo

Regarding `/etc/login.defs`or any other global configuration: Well, it is global configuration, so probably a bad idea to add paths within your `$HOME` directory there. ;)

Problem

At the end of .bashrc file I added these lines to set path to `foo` folder in my home directory: ``` PATH = $PATH:/home/username/foo export PATH; ``` Then I typed in bash: ``` source .bashrc ``` These produced error: ``` bash: PATH: command not found ``` I am using Debian Squeeze. In a similar question here it was advised to modify /etc/login.defs. I don't want to do this as in the very login.defs it is written: ``` add the rest [of your paths] in the shell startup files ``` How to add folder `foo` to PATH in .bashrc?

Original source

Related problems