[Bio-Linux] BioLinux 8 question - Adding and removing Paths - Velvet

Tony Travis tony.travis at minke-informatics.co.uk
Wed Apr 8 08:29:59 EDT 2015


On 08/04/15 11:49, Tim Booth wrote:
> Hi,
> 
> I think the quick answer is - you are probably running ZSH so edit
> ~/.zshrc and add the PATH setting there.  The actual syntax for variable
> assignment in ZSH is the same as for BASH.

Hi, Tim.

Under Bio-Linux 8, you set up the environment for "zsh" in:

  /etc/zshrc

Which sources 'profile' fragments in:

  /etc/zshrc.d/*

Finally, "zsh" sources:

  ~/.zshrc

However, the default order of files read by a "zsh" login shell is:

  /etc/zsh/zshenv
  ~/.zshenv
  /etc/zsh/zprofile
  ~/.zprofile
  /etc/zsh/zshrc (sources /etc/zsh/zshrc.d/* in Bio-Linux)
  ~/.zshrc
  /etc/zsh/zlogin
  ~/.zlogin

Common practice is only to source the start-up files once, at login,
regardless of the shell you are using. We had a discussion about this
recently because I had put some of my "bash" 'profile' fragments in:

  /etc/profile.d/*

This is similar to what your "zsh" files do under Bio-Linux in:

  /etc/zsh/zshrc.d/*

The environment of an interactive shell is inherited from the login
shell that spawned it, except in the case of a Unity/MATE GUI terminal,
in which case you have to edit the terminal preferences (once) to make
the terminal run as a login shell - Is that why you prefer "zshrc*"?

I note that the official Ubuntu "base-files" package contains:

  /etc/profile.d

And, you have put some 'profile' fragments in there from packages:

  bio-linux-cd-hit
  bio-linux-blast

Does this signal a change of heart about Bio-Linux supporting "bash"?

If so, it might it be worth considering "zsh" and "bash" sourcing the
same start-up files in order to create the same environment for both
(with adjustments based on the SHELL environment variable if needed).

> Regarding paths for programs in general, this is a fairly fundamental
> question regarding modern Linux systems but I actually don't know
> anywhere that it is spelled out clearly and simply, so I'll give you my
> own summary:

The Filesystem Hierarchy Standard is a widely used reference:

  http://www.pathname.com/fhs/

HTH,

  Tony.

-- 
Minke Informatics Limited, Registered in Scotland - Company No. SC419028
Registered Office: 3 Donview, Bridge of Alford, AB33 8QJ, Scotland (UK)
tel. +44(0)19755 63548                    http://minke-informatics.co.uk
mob. +44(0)7985 078324        mailto:tony.travis at minke-informatics.co.uk



More information about the Bio-linux-list mailing list