-1

Aliases set in /etc/profile.d are present in a bash shell as expected when I log in to the server using ssh. When starting a new bash shell the aliases are not there. This is a major problem since logging in using NX to get a desktop, there is no possibility to get the aliases since to get a terminal any user need to start a new bash shell.

The system is RH ES 5.5.

Christer

  • 2
    .profile stuff gets executed ONLY at a login.....not between different shell invokations. – mdpc Jun 03 '13 at 17:49

1 Answers1

2

If you want it to show up on a shell invocation it needs to go in /etc/bashrc. The /etc/profile.d directory is for logins (su -, or ssh into the box). Check out the INVOCATIONS section of the bash man page if you want more info on the differnces.

slm
  • 7,615
  • 16
  • 56
  • 76
  • Comment to slm (the "Add Comment" function gives uknown erro): Thank you for your answer. The Invocation section doesn't say anything about that /etc/bashrc is executed when starting an interactive shell. Adding traces to /etc/bashrc shows that it is not executed. So, my simple question is: is there any possibility to add world-wide aliases for interactive shells? – Christer Jun 04 '13 at 06:02