HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
BASH PROFILE
Create/Edit “.bash_profile”
- (Optional) Disable “Bracketed Paste”
bind 'set enable-bracketed-paste off'
echo 'set enable-bracketed-paste off' > $HOME/.inputrc
- E.g. File .bash_profile of user cbkadal at cbkadal
touch $HOME/.bash_profile
ls -al $HOME/.bash_profile
cat > $HOME/.bash_profile << EOF
# Thu 15 Jul 2021 15:16:28 WIB
umask 022
# If running bash
[ -n "\$BASH_VERSION" ] && {
# include .bashrc if it exists
[ -f \$HOME/.bashrc ] && . \$HOME/.bashrc
}
# Local PATH
[ -d "\$HOME/bin" ] && PATH="\$HOME/bin:\$PATH"
[ -d "\$HOME/.local/bin" ] && PATH="\$HOME/.local/bin:\$PATH"
EOF
ls -al $HOME/.bash_profile
source $HOME/.bash_profile
(RESULT)
cbkadal@cbkadal:~$ ls -al $HOME/.bash_profile
ls: cannot access '/home/cbkadal/.bash_profile': No such file or directory
cbkadal@cbkadal:~$ cat > $HOME/.bash_profile << EOF
> # Thu 15 Jul 2021 15:16:28 WIB
> umask 022
>
> # If running bash
> [ -n "\$BASH_VERSION" ] && {
> # include .bashrc if it exists
> [ -f \$HOME/.bashrc ] && . \$HOME/.bashrc
> }
>
> # Local PATH
> [ -d "\$HOME/bin" ] && PATH="\$HOME/bin:\$PATH"
> [ -d "\$HOME/.local/bin" ] && PATH="\$HOME/.local/bin:\$PATH"
>
> EOF
cbkadal@cbkadal:~$ ls -al $HOME/.bash_profile
-rw-r--r-- 1 cbkadal cbkadal 295 Jul 15 15:51 /home/cbkadal/.bash_profile
cbkadal@cbkadal:~$ source $HOME/.bash_profile
cbkadal@cbkadal:~$