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
28
votes
6 answers

.profile not working from terminal in mac

I had a .profile file that I was reading and using aliases from in my terminal, but at some point the aliases stopped working for no clear reason (other commands were still working). Thinking to make a quick fix, I deleted (rm) and recreated my…
user2950933
  • 281
  • 1
  • 3
  • 4
24
votes
4 answers

How to interactively set syntax highlighting in VI editor

Using vi, I want to display files in distinguished colors in unix. If I save a file as .sql or .java it will highlight the keywords. I want to make changes to which words are highlighted, and in what color. How do I control syntax highlighting and…
Toshi
  • 243
  • 1
  • 3
  • 7
24
votes
3 answers

Export path in .profile on mac

I can't believe there isn't any tutorials about this after googling. Can someone point me a direction or explain what these lines and variables mean in .profile on mac? How can someone configure them? export…
tipsywacky
  • 3,374
  • 5
  • 43
  • 75
8
votes
4 answers

Sourcing rvm from my Ubuntu .profile only works manually, not at login

I'm having trouble getting the Ruby Version Manager rvm to source from my Ubuntu 10.04 .profile. The code: [[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" ...never does what I expect it to (i.e. give me the rvm program when I open a…
bschuth
  • 135
  • 1
  • 8
6
votes
1 answer

psql command not found

I am using Mac OS X 10.5.8. I installed Postgresql 9.1 using macports, which has installed it in /opt/local/lib/postgresql91 and created a bin folder with psql and other unix executable files. As far as I understand that is the heart of the…
user2054545
  • 161
  • 3
  • 9
4
votes
1 answer

Having trouble with Ubuntu .profile and .bashrc

I am new to linux. I am currently going through a setup tutorial for Kafka online. It says to add the path of my kafka bin directory as follows to my .profile file which I did as below: # ~/.profile: executed by the command interpreter for login…
T Anna
  • 874
  • 5
  • 21
  • 52
4
votes
1 answer

Terminal (Mac) create alias that includes user input

In Mac OS Terminal, I'm learning the basics of Unix. I'm having trouble with a hopeful easy fix, but cannot figure out where to start looking. cd __________ && ls That is a pretty common pattern for me, to check and see the file folder I'm working…
asshah4
  • 164
  • 10
4
votes
2 answers

Alias definition of multiple commands after ssh

I'm logging in and out of a remote machine many times a day (through ssh) and I'd like to shorten a bit the whole procedure. I've added an alias in my .bashrc and .profile that looks like: alias connect='ssh -XC username@remotemachine && cd…
mannaroth
  • 1,473
  • 3
  • 17
  • 38
3
votes
2 answers

Execute commands after ssh login

I'm working with lots of remote machines via ssh. My need is to have a common .profile (or an alias for ssh or anything else) to use with all the ssh sessions, because changing it in every machine (which I should never re-login in) it is a really…
noliv-mov
  • 113
  • 1
  • 6
3
votes
4 answers

How to fetch environment variables in Mac OS X using python?

How can I lookup environment variables (e.g. export HG_USER from .profile) using python code in Mac OS X?
Afiku
  • 251
  • 1
  • 6
  • 14
3
votes
2 answers

Create Alias for Function in .profile

I want to run executables in my $GOPATH/bin directory without having to cd there so I've added the following to my .profile file: export GOBIN=$HOME/go-workspace/bin function _rungo() { "$GOBIN" "@$1" } alias rungo='_rungo' The alias…
Steve Murphy
  • 431
  • 2
  • 7
  • 17
3
votes
2 answers

.profile: line 31: syntax error: unexpected end of file

I'm bad at bash programming. Where is the error? Here is my .profile file: # WARNING: For help understanding this file, and before you try # to change any of it, type "man .profile" and read carefully. # # # Set command search rules # if [ -x…
name
  • 31
  • 1
  • 2
3
votes
1 answer

How do I fix my GOROOT and GOPATH variables to run go?

Operating system: Ubuntu 14.04 lines in the .bashrc (tried both of the following) # GoPath (without goroot) export GOPATH=$HOME/gowork ... # GoPath (with goroot) export GOROOT=/usr/local/go export GOPATH=$HOME/gowork Note: I tried to set the above…
Bangash
  • 1,152
  • 3
  • 10
  • 30
3
votes
0 answers

IONIC : run Android error ( ANDROID_HOME )

I want to run my IONIC project on my Android device. When I try : ionic android run I have this error : ERROR: Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually. Failed to find 'android' command in your…
damien marchand
  • 864
  • 1
  • 13
  • 30
3
votes
3 answers

-bash: initdb: command not found

I have installed PostgreSQL using the EnterpriseDB installation. I ran sudo ./postgresql-9.3.5-3-osx.app/Contents/MacOS/installbuilder.sh --mode unattended and then ran open /Applications/TextEdit.app .profile to edit my .profile file newly created…
Dhruv Ghulati
  • 2,976
  • 3
  • 35
  • 51
1
2 3 4 5 6 7