Should I put an alias in . bashrc or . profile? - Ask Ubuntu As with Bash aliases in general, you can put your gc alias in ~ bashrc or in ~ bash_aliases but it should not go in profile If the variables are only ever needed in shells where the aliases (which expand to commands that use them) are available, then it is actually fine to put them in the same place as the aliases
Defining a variable with or without export - Stack Overflow This is what export exists for export is a Bash command to set environment variable for Bash All variables set with this command would be inherited by all processes that this Bash would create More on Environment in Bash Another kind of variable in Bash is internal variable
Global environment variables in a shell script - Stack Overflow From the bash man page: filename [arguments] source filename [arguments] Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename If filename does not contain a slash, file names in PATH are used to find the directory containing filename
What goes in ~ . profile and ~ . bashrc? - Ask Ubuntu I'm having trouble wrapping my head around what belongs in ~ profile and what belongs in ~ bashrc From what I've read, it seems to me that ~ profile should be used for environment variables and