Questions tagged [bash-profile]
19 questions
24
votes
4 answers
Completely restart Bash
Is there a way to completely restart Bash and reload .bashrc and .profile and the like? I'd like to make sure my changes worked out properly after editing these files.
Naftuli Kay
- 38,686
- 85
- 220
- 311
2
votes
1 answer
Set up .bash_profile and .bashrc for local and remote access
I've noticed that when I open a terminal on my ubuntu machine locally, it sources .bashrc, but when I connect via ssh, it sources .bash_profile. I added a line in .bashrc to source .bash_profile so I have both files sources when working locally. I'd…
Mei Zhang
- 177
- 2
- 6
2
votes
1 answer
sudo not executing bashrc as expected
Overall issue is when I log in, my prompt appears correctly formatted as per the /etc/bashrc but when I sudo to another user using bash, the prompt gets fubar'd.
Essential formatting in the /etc/bashrc
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007"…
rup
- 21
- 3
1
vote
1 answer
Why is my .profile export being ignored?
I have the following at the end of my .profile file on Ubuntu 18.04:
export PATH=$PATH:/home/tom/Desktop/PACS/moos-ivp/bin
export LD_LIBRARY_PATH=/home/tom/Programs/or-tools_Ubuntu-18.04-64bit_v7.2.6977/lib
export…
SirCipher
- 111
- 3
1
vote
0 answers
execute profile files at sftp login
My Debian server is configured to jail the users in ther home directory after login with sftp (that works). Now im trying to execute a profile for the user. I was thinking sftp is a non-login shell and should execute the files: /etc/profile.. ->…
Danloc
- 180
- 1
- 10
1
vote
1 answer
Is it a good practice to make different configuration files as symlinks to some scripts under the same directory?
I was wondering if it is a good practice to make the following configuration files as symlinks to some scripts under a directory e.g. ~/program_files/configurations/.
The scripts /etc/rc.local, /etc/profile, ~/.profile, ~/.bash_profile, ~/.bashrc…
Tim
- 98,580
- 191
- 570
- 977
0
votes
0 answers
What license does ~/.profile fall under?
On Unix & Linux, what license governs usage rights for the '.profile' file? Also what entity can be questioned about compliance?
Enkouyami
- 1,378
- 2
- 12
- 15
0
votes
1 answer
brew is not found when I sshpass to the server
brew is installed on the server but when I sshpass to the server, it throws bash: brew: command not found and same is happening for ideviceinstaller bash: ideviceinstaller: command not found
This is the command I'm using
sshpass -p password ssh…
Ram
- 1
0
votes
2 answers
CWD and filepath string get automatically concatenated in launchctl calls
I am currently trying to write a function for my bash profile which causes an OSX LaunchAgent passed as argument to restart. It might be a bit pointless but for one I want to stop having to write long paths for launchctl un/load
I have got almost…
Scott Anderson
- 133
- 1
- 10
0
votes
1 answer
How to only run a command in .bash_profile if its not already running?
Goal:
Run socat only once.
I'm trying to expose docker web services via TCP. On macOS/linux these services are bound to a unix socket. The following command accomplishes the task:
socat -d TCP-LISTEN:2376,range=127.0.0.1/32,reuseaddr,fork…
Sam Axe
- 103
- 3
0
votes
2 answers
Confused about Configuring Linux Path Environment /etc/profile.d/*.sh being Executed Twice?
I am trying to set PKG_CONFIG_PATH to CentOS here are the code I tried
export |grep PKG_CONFIG_PATH
no output, normal...
echo "$PKG_CONFIG_PATH"
:/usr/local/lib/pkgconfig
why there is output here??
and if I
sudo sh -c "echo 'export…
shadow_wxh
- 171
- 3
- 13
0
votes
0 answers
Fedora 29: not reading changes in .bash_profile
I have added some aliases and functions to the .bash_profile but they are not available when I start a new Command Line Prompt. Neither they are available after a reboot.
I need to execute a 'source ~/.bash_profile' each time.
So, I have added into…
Francesco Marchioni
- 276
- 4
- 9
0
votes
2 answers
none of command works after trying to add ~/.bash_profile
I was trying to add JAVA_HOME in the path variable.
I downloaded Java JDK and done following:
nano ~/.bash_profile
added following lines and saved the file:
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$JAVA_HOME/bin=$PATH
source…
Suban Dhyako
- 103
- 5
0
votes
1 answer
Customize bash looks for user profile on debian 9
I am trying to customize the bash prompt on Linux Debian 9.
I got the script from Github and I modified the file .bashrc
On the terminal, when I log in as root, I can see the customization I was looking for, but once I exit to the normal user, all…
dark sparrow
- 3
- 3
0
votes
1 answer
Role of export -f statement when creating functions in bash_profile
I came across a bash_profile file that makes use of the export -f statement in the following manner:
# Run xelatex and BibTeX
function xelatex_bibtex {
xelatex -shell-escape "${1}.tex" &&
bibtex "${1}" &&
xelatex -shell-escape…
Konrad
- 313
- 1
- 8