Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #172305
| From | "der.hans" <deb-user@LuftHans.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: permanently add dir to $PATH |
| Date | 2016-09-16 16:30 +0200 |
| Message-ID | <si2jo-5SZ-49@gated-at.bofh.it> (permalink) |
| References | <si202-5IX-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Am 16. Sep, 2016 schwätzte Tony Baldwin so:
moin moin Tony,
> as mentioned, I'm working with a new Jessie installation and having a coupl
> headaches, the first had to do with getting a kernel module to load on boot
> (already wrote to the list about it.)
>
> The other problem is trying to permanently add $HOME/bin to the $PATH.
>
> I have in .bash_profile
> PATH=$PATH:$HOME/bin
> export PATH
>
> But every time I boot I have to manually add it again.
You have to add it to the file again?
/etc/skel/.profile includes $HOME/bin
$ tail -4 /etc/skel/.profile
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
$
But, the top of the file lets us know it's not used if ~/.bash_profile
exists.
The bash manpage lists the purpose of ~/.bash_profile and ~/.bashrc.
~/.bash_profile
The personal initialization file, executed for login shells
~/.bashrc
The individual per-interactive-shell startup file
~/.bashrc gets read for all shells, including screen and tmux instances
and GUI logins that don't invoke login shells, so I put my changes
in ~/.bashrc rather than ~/.bash_profile. If I had interactive
configurations, then I would put those in ~/.bash_profile, everything else
goes in ~/.bashrc.
Actually, I put them in ~/.bashrc_local and include that from ~/.bashrc
so it's easier to keep my localizations synced across systems.
if [ -f ~/.bashrc_local ]; then
. ~/.bashrc_local
fi
ciao,
der.hans
--
# http://www.LuftHans.com/ http://www.PhxLinux.org/
# "The world is a dangerous place to live, not because of the people who
# are evil, but because of the people who don't do anything about it."
# --Albert Einstein
Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread
permanently add dir to $PATH Tony Baldwin <tonybaldwin@gmx.com> - 2016-09-16 16:10 +0200
Re: permanently add dir to $PATH Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-16 16:10 +0200
Re: permanently add dir to $PATH Liam O'Toole <liam.p.otoole@gmail.com> - 2016-09-16 19:50 +0200
Re: permanently add dir to $PATH "der.hans" <deb-user@LuftHans.com> - 2016-09-16 16:30 +0200
csiph-web