On Thu, Jun 20, 2013 at 11:13 PM, carlosinfl . <carlos.mennens@gmail.com> wrote:
> Can someone please help me set the 'postgres' users home ENV so that I
> can simply type 'psql' rather than the rull path and bash doesn't say
> '-bash-4.1$'?
>
> -bash-4.1$ whoami;ls -l;pwd
> postgres
>
> total 12
> drwx------ 2 postgres postgres 4096 Apr 4 18:33 backups
> drwx------ 15 postgres postgres 4096 Jun 18 20:52 data
> -rw------- 1 postgres postgres 1493 Jun 14 21:11 pgstartup.log
>
> /var/lib/pgsql9
>
First you have to find out where 'psql' executable is, and from the
path I guess it is a linux distro with a packaged postgresql version.
Usually psql lies in /usr/local/bin or /usr/bin, so setting the PATH
variable to include such directory should work.
First of all check what the PATH varaible is:
echo $PATH
and then find out where psql is and add the directory to PATH:
PATH=$PATH:<new-dir>
and make it permanent.
However, as already suggested, you should not use the "postgres" user,
but you can do the above steps also for a normal account.
Hope this helps.
Luca