Your .profile
, like any “dot file” (configuration file whose name begins with a .
), is located in your home directory. This is the default directory when you log in, you can use the cd
command with no argument to return there, and you can use ~
as a shortcut to it, e.g. you can refer to your .profile
as ~/.profile
no matter what the current directory is.
If your .profile
is absent, the system behaves as if it was empty (this is the case for most dot files). So if you want to add something, create the file if necessary. Use the text editor of your choice.
Adding echo $PATH
to .profile
is useless, and even a bad idea because it can break remote file copying tools such as rsync
. I don't understand what you're trying to do. If you want to add a directory to your PATH
, put this in your ~/.profile
:
PATH=$PATH:/some/extra/directory
This adds the specified directory last in the search path. Or if you want to add the subdirectory bin
from your home directory to the front of the search path:
PATH=~/bin:$PATH
Some antique shells require an additional line export PATH
, but I think even on SCO it isn't necessary this millennium.