Questions tagged [.profile]

.profile is the local shell initialization script for Unix shells (such as sh, ksh, bash and zsh). $HOME/.profile, also known as ~/.profile, is run exactly once per session -- when you login. As it runs after system wide /etc/profile script, the typical thing you want to do in this script is set, or modify, environment variables. If you set a shell option or alias in this script, it will not be propagated to a subshell.

Like /etc/profile, ~/.profile runs automatically at startup, and it can be rerun after modification using the source command.

97 questions
1
vote
2 answers

Cannot find true $PATH file on Mavericks

I have both ~/.bash_profile & ~/.profile files. ~/.bash_profile contains one line: export PATH=/Applications/mamp/bin/php5.5.3/bin:$PATH ~/.profile contains three lines: # MacPorts Installer addition on 2014-02-02_at_20:54:53: adding an appropriate…
1
vote
0 answers

QT pro file environment variable lib path

Something I'm not getting. I want to include 3 libs in my .pro file. Created an environment variable, and then I add them to the LIBS path. This is OK for 2 times, the third time fails. In detail: Environment variable: NETSNMP_DIR…
ED8500
  • 41
  • 1
  • 9
1
vote
1 answer

How can I execute a script on AIX after my own .profile/.kshrc takes effect?

background: My colleagues and I all login a AIX server with user "root", after login everyone loads their .profile/.kshrc/.netrc etc., then start their work, to execute their own shell scripts. problem: when I crontab a script, it will fail because…
gangkui2008
  • 157
  • 1
  • 3
  • 14
1
vote
2 answers

How to get original system command after overwriting it with a function?

I'm at a Hackathon right now so if someone would answer this soon, you'd be doing me a huge favor. I've written a function called ls() in my .profile that looks like this: ls() { if(some condition); do something else ls; #(CALL TO…
Programming Noob
  • 1,755
  • 5
  • 19
  • 28
1
vote
1 answer

Unable to see processes using ps comand when I configure terminal to auto load my .bashrc

My default login shell is bash. From a few online forums, I configured my terminal to auto load my .bashrc file whenever I open the terminal by adding: source ~/.bashrc in .bash_profile OR by adding the following code snippet in .profile: if [ -n…
Abhi Leo
  • 11
  • 1
0
votes
0 answers

How can set different JAVA_HOME for each application?

I want use multiple application in Debian that each of them work with different version of java. In /etc/profile I can add only have JAVA_HOME and add JAVA_HOME/bin of that version to path. Is there any way that I can determine the version of java…
Tavakoli
  • 1,303
  • 3
  • 18
  • 36
0
votes
0 answers

How to load modules in a Linux HPC when running it through RStudio

I am using a Linux HPC environment to run C++ models. The models require certain modules to be loaded which I have specified through setting up a .profile file, therefore the modules are always loaded when I log into the HPC through the…
0
votes
1 answer

source ~/.profile paths are not being followed by OSX

I am having issues where the paths I created in source ~/.profile are not being used at all. I confirmed the paths I created by executing echo $PATH --- all of my custom-made paths in .profile show up. Separately, I checked for ~/.bash_profile and…
spizzi
  • 41
  • 5
0
votes
1 answer

Replace a section of code in .profile with a file using sed or awk

I am trying to change a .profile (Ubuntu) as follows: Original .profile file section: # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running…
0
votes
1 answer

cannot access variable environment from .profile using rails

In my rails application, I exported my database variables in .profile using ansible. the variables are accessible by the command printenv. However, when I run the application or use rails c via ENV['NAME'] , the variables aren't there. Does anyone…
Ndx
  • 517
  • 2
  • 12
  • 29
0
votes
1 answer

Permanent Env variable not recognised

I have a script placed in /etc/profile.d/script.sh that on SSH connect checks if the user has the environment variables 'GIT_AUTHOR_NAME' and 'GIT_AUTHOR_EMAIL' set in their ~/.profile file. If not, it asks to enter these details. Problem I am…
Jsack7
  • 15
  • 3
0
votes
1 answer

Why do I have to type source env.sh before I can use a geophysical processing software called Madagascar?

I recently installed a geophysical processing software called Madagascar in Ubuntu 1904. The installation of the program was smooth and I didn't encounter any problems. The problem is that in order to used any program of Madagascar I need to be in…
Shah5105
  • 57
  • 2
  • 8
0
votes
3 answers

How do i make the colour of the $ bit in a terminal change colour every line?

currently i have this: function xtitle2() # Adds some text in the terminal frame. { export var1=`echo $HOSTNAME | perl -pe 's/^([a-zA-Z0-9]+)\.(.*)$/\1/g'` export var2=`pwd` echo -n -e "\033]0;$var1 : $var2\007" a=$(( $a + 1 )) if (( $a > 36…
will
  • 10,260
  • 6
  • 46
  • 69
0
votes
1 answer

$PATH error every time Terminal is Opened

I had installed Postgres.app before and after I uninstalled via App Cleaner now every time I open terminal this error appears in the first line I should mention that a followed what documentation for uninstalling the Postgres on their website but it…
Dark star
  • 5,192
  • 9
  • 35
  • 54
0
votes
0 answers

How can I ensure an application is correctly found on the path with Ubuntu SSH

Context I have a shell script which is called from Jenkins remotely via SSH. If I SSH to the user account manually and then run the script it works. However, when Jenkins does this (same user account but executes command as an argument to the SSH…
David
  • 7,652
  • 21
  • 60
  • 98