From owner-freebsd-questions Sun Feb 16 13:49:42 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05C0437B401 for ; Sun, 16 Feb 2003 13:49:41 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5580043FF3 for ; Sun, 16 Feb 2003 13:49:35 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a123.otenet.gr [212.205.215.123]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h1GLnVSe007468; Sun, 16 Feb 2003 23:49:33 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.7/8.12.7) with ESMTP id h1GLnV9a002226; Sun, 16 Feb 2003 23:49:31 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.7/8.12.7/Submit) id h1GLnVDf002225; Sun, 16 Feb 2003 23:49:31 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 16 Feb 2003 23:49:31 +0200 From: Giorgos Keramidas To: David Banning Cc: questions@FreeBSD.ORG Subject: Re: shell prompt question Message-ID: <20030216214931.GB2106@gothmog.gr> References: <20030216152524.A14300@skytrackercanada.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030216152524.A14300@skytrackercanada.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-02-16 15:25, David Banning wrote: > My normal prompt is; > > david $ > > and my superuser prompt is; > > # The way that the shell prompt is set depends on the particular shell. What shell does your `david' user have? What shell does `root' have? > How do I get the super-user prompt when I just use the "su" command > rather than the full "su -" command? The default behavior of su is to run an interactive, but not login, shell AFAIK. How to set the prompt for interactive invocations of your root user's shell depends on the shell. > I want to stay in the same directory I am in sometimes but have su > authority. The problem is that my prompt doesn't change, so I forget > that I am su. Use `su -m' as below. How to set the prompt to something that changes when you switch from simple user to superuser and vice versa depends on the shell you have. Using bash here, I can see: $ echo "prompt = $PS1" prompt = \$ $ su -m Password: # - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message