From owner-freebsd-questions@FreeBSD.ORG Thu Sep 6 15:53:17 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DD6E16A46B for ; Thu, 6 Sep 2007 15:53:17 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (66-230-99-27-cdsl-rb1.nwc.acsalaska.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 7129D13C45B for ; Thu, 6 Sep 2007 15:53:17 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 3E4DC1CCA6 for ; Thu, 6 Sep 2007 07:53:14 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Thu, 6 Sep 2007 17:39:41 +0200 User-Agent: KMail/1.9.7 References: <20070906150602.GE61602@pcjas.obspm.fr> In-Reply-To: <20070906150602.GE61602@pcjas.obspm.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709061739.41650.fbsd.questions@rachie.is-a-geek.net> Subject: Re: bash on login. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2007 15:53:17 -0000 On Thursday 06 September 2007 17:06:02 Albert Shih wrote: > I'm using bash for standard shell, what I don't understand is when I'm > connect by ssh on my server the bash don't parse .bashrc file. man bash, section INVOCATION: A login shell is one whose first character of argument zero is a -, or one started with the --login option. An interactive shell is one started without non-option arguments and without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)), or one started with the -i option. PS1 is set and $- includes i if bash is interactive, allowing a shell script or a startup file to test this state. ... When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc. Ssh is a login shell. For most practical uses: cat ~/.bashrc >> ~/.bash_profile && rm -f ~/.bashrc and live happily ever after. -- Mel