Matty Asked: 2011-08-30 06:08:57 +0800 CST2011-08-30 06:08:57 +0800 CST 2011-08-30 06:08:57 +0800 CST Reload bash's .profile without logging out and back in again 772 Is it possible to coerce bash to reload the .profile file without logging out and back in again? bash 2 Answers Voted Best Answer Lukas Stejskal 2011-08-30T06:11:35+08:002011-08-30T06:11:35+08:00 This should work for the current terminal: . ~/.profile . is a bash builtin and a synonym for source, see man bash: . filename [arguments] source filename [arguments] Read and execute commands from filename in the current shell environment (…). Amey Jah 2011-08-30T06:23:28+08:002011-08-30T06:23:28+08:00 If you don't want to start a new shell but execute the script in the current shell, you source it: source script_name.sh source = . The Bash source built-in is a synonym for the Bourne shell . (dot) command. courtesy - tldp.org
This should work for the current terminal:
.
is abash
builtin and a synonym forsource
, seeman bash
:If you don't want to start a new shell but execute the script in the current shell, you source it:
source
=.
The Bash
source
built-in is a synonym for the Bourne shell.
(dot) command.courtesy - tldp.org