2

I would like to edit my .bash_profile file. However it appears that in Ubuntu (and perhaps other Debian distros) this is named as .profile.

However I cannot seem to find the expected variables like $PATH, $PS etc. in the .profile file. The .bashrc file doesn't seem to do any good either.

I am wondering how I can possibly modify my environment variables in this case.

Jorge Castro
  • 73,717
DBS
  • 201

2 Answers2

4

According to the Ubuntu documentation, they do not recommend using ~/.profile, instead they recommend using ~/.pam_environment for adding items to $PATH:

~/.pam_environment - This file is specifically meant for setting a user's environment. It is not a script file, but rather consists of assignment expressions, one per line.
PATH DEFAULT=${PATH}:${HOME}/MyPrograms
1

You can configure your environment variables such as $PATH or $PS permanently for bash sessions in your .bashrc file that is your $HOME directory.

if you need to set it permanently, and system wide (all users, all processes) add set variable in /etc/environment

Raza
  • 121