Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/45684/wha…
What is the difference between ~/.profile and ~/.bash_profile?
The original sh sourced .profile on startup. bash will try to source .bash_profile first, but if that doesn't exist, it will source .profile. Note that if bash is started as sh (e.g. /bin/sh is a link to /bin/bash) or is started with the --posix flag, it tries to emulate sh, and only reads .profile. Footnotes: Actually, the first one of .bash_profile, .bash_login, .profile See also: Bash ...
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/83742/wha…
bash - What is the difference between .profile and .bash_profile and ...
The .profile dates back to the original Bourne shell known as sh. Since the GNU shell bash is (depending on its options) a superset of the Bourne shell, both shells can use the same startup file. That is, provided that only sh commands are put in .profile For example, alias is a valid built-in command of bash but unknown to sh. Therefore, if you had only a .profile in your home directory and ...
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/733465/wh…
When exactly do the scripts in /etc/profile.d get executed?
In /etc/profile.d I got a script called logchk.sh which is meant to send an email to the admin email address via /bin/mail. If someone logs in via ssh user@serveradress this script is properly executed and the email is sent.
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/64258/wha…
What do the scripts in /etc/profile.d do? - Unix & Linux Stack Exchange
It says that the /etc/profile file sets the environment variables at startup of the Bash shell. The /etc/profile.d directory contains other scripts that contain application-specific startup files, which are also executed at startup time by the shell.
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/106601/ho…
How to add a function to .bash_profile/.profile/bashrc in shell?
Well I tried your way for creating a custom function of printing it's argument, but even if I add that function in .bash_profile then also I have to do source ~/.bash_profile everytime I open terminal by shortcut Ctrl+Alt+T.
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/801431/wh…
Why do environment variables in `~/.profile` appear in `systemctl ...
Why do environment variables in `~/.profile` appear in `systemctl --user show-environment` but not in my terminal? Ask Question Asked 21 days ago Modified 20 days ago
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/476593/wh…
When should I use .bashrc and when .profile? [duplicate]
.profile is read by every login shell, .xxxrc is read by every interactive shell after reading .profile. You need to decide yourself depending on what you like to add. A good idea is to put everything that sets exported environment variables and thus propagates to sub shells into .profile. Things that are not propagated should be in .bashrc or whatever your shell looks into. This is e.g. alias ...
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/704610/wh…
What does the ". /etc/profile" do? - Unix & Linux Stack Exchange
I saw these instructions in a book and don't know what the . /etc/profile command does, what is it? Is it the same as source /etc/profile? Linux-specific Java steps On Linux systems, the following
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/117467/ho…
How to permanently set environmental variables
You can add it to the file .profile or your login shell profile file (located in your home directory). To change the environmental variable "permanently" you'll need to consider at least these situations:
Global web icon
stackexchange.com
https://unix.stackexchange.com/questions/680779/wh…
Where should I source /usr/local/etc/profile from? .bash_profile or ...
Many distributions have a directory /etc/profile.d, and put code in /etc/profile to source the files in /etc/profile.d. If your distribution does that, the best place for your machine-specific content would be a machine-specific file in /etc/profile.d.