The bash man page says:
"When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, "
I can see that bash.bashrc is executed because I put echo in it, but .bashrc is not.
I have been looking at /etc/profile. bash.bashrc to see how they are run, and notice that some are executed by non-login shells, some work with interactive shells etc.
What are the differences in this type of shells, ie interactive & non-interactive, login & non-login etc?
The question may be pretty basic,but it seems I need to ask what a shell is, first and foremost.
I have been looking at /etc/profile. bash.bashrc to see how they are run, and notice that some are executed by non-login shells, some work with interactive shells etc.
What are the differences in this type of shells, ie interactive & non-interactive, login & non-login etc?
The question may be pretty basic,but it seems I need to ask what a shell is, first and foremost.
I am looking for ideas on customizing my bash shell when I remotely connect to a server.
Currently, I run the following in my remote bash shell to change the prompt to indicate that I am connected to a remote system:
if [ -n "$SSH_CLIENT" ]; then text=" ssh"
fi
export PS1='\[\e[0;31m\]\u@\h:\w${text}$\[\e[m\] '
Additionally, I source the .bashrc file from the .bash_profile file when I ssh in t
On one of my Ubuntu 11.10 servers, when I use sudo -i to become the root user, root's .bashrc is not being executed.
I am fuzzy about how to set a command in a script to be run only when the shell is running within an X session.
basically, in ~/.bashrc I set my keyboard maps as
setxkbmap -layout 'us,gr' -variant 'altgr-intl,extended' -option grp:alt_shift_toggle
If I am connecting through putty , or otherwise, and i just open a command prompt window, I DONT want this command to run.
hello everyone,
I am fuzzy about how to set a command in a script to be run only when the shell is running within an X session.
basically, in ~/.bashrc I set my keyboard maps as
setxkbmap -layout 'us,gr' -variant 'altgr-intl,extended' -option
grp:alt_shift_toggle
If I am connecting through putty , or otherwise, and i just open a command prompt window, I DONT want this command to run.
If on the
hello everyone,
I am fuzzy about how to set a command in a script to be run only when the shell is running within an X session.
basically, in ~/.bashrc I set my keyboard maps as
setxkbmap -layout 'us,gr' -variant 'altgr-intl,extended' -option
grp:alt_shift_toggle
If I am connecting through putty , or otherwise, and i just open a command prompt window, I DONT want this command to run.
If on the
man bash
When bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads a... [by TrevorH]