From owner-freebsd-questions Thu Feb 21 10:49: 1 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.dra.com (mail.dra.com [192.65.218.159]) by hub.freebsd.org (Postfix) with ESMTP id 49D2837B402 for ; Thu, 21 Feb 2002 10:48:52 -0800 (PST) Received: from stlmail.dra.com (stlmail.dra.com [192.65.218.119]) by mail.dra.com (8.9.1/8.9.1) with ESMTP id MAA05662; Thu, 21 Feb 2002 12:48:48 -0600 (CST) Received: by stlmail.dra.com with Internet Mail Service (5.5.2653.19) id <1CJCNLW4>; Thu, 21 Feb 2002 12:48:47 -0600 Message-ID: From: Eric Six To: "'Morse, Richard E.'" , "'DragonRyder'" , freebsd-questions@FreeBSD.ORG Subject: RE: Prompt Help Date: Thu, 21 Feb 2002 12:48:45 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" 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 echo $SHELL will return the current shell. In bash, PS1="[whateverprompt]#" Will set your prompt. You can put that in your .login so it's set when you login. I am not sure on the other shells.. you can always do a google search. Eric -----Original Message----- From: Morse, Richard E. [mailto:REMORSE@PARTNERS.ORG] Sent: Thursday, February 21, 2002 12:43 PM To: 'DragonRyder'; freebsd-questions@FreeBSD.ORG Subject: RE: Prompt Help Hi! This will vary from shell to shell, so the first thing you need to know is what shell you are using. I'm going to assume that you are using FreeBSD here, because that is the list you posted to. There are several ways to find out which shell you are using. One way is to type 'ps' at the prompt. This will return a list of the currently running processes being run by the current user. In my case, I get told that one of the processes is 'tcsh', which is a shell. In general, shell names end with 'sh'. Common shells are 'sh', 'tcsh', 'csh', 'bash', 'ksh', and 'ash'. Another option is to look in /etc/passwd for your entry to see if what shell you are using. You can also do a 'chsh', which allows you to change the shell. Once you know which shell you are using, you need to read the man page for that shell. IE, type 'man tcsh', or 'man bash', or 'man sh' at the prompt. It's probably a good idea to read this manpage anyways. This will tell you something about which files are accessed at startup, so that you can tell where to look for any currently existing prompt statements and modify them. Just off the top of my head, in either csh or tcsh, you would do something like set prompt = '[%n@%m %/]%# " and in bash you need to export PS1, I think -- I've not had to configure bash as much, and right now I don't have a bash manpage available, as it isn't installed on my FreeBSD box... HTH, Ricky -----Original Message----- From: DragonRyder [mailto:dragonr@xmission.com] Sent: Thursday 21 February 2002 12:44 PM To: freebsd-questions@FreeBSD.ORG Subject: Prompt Help I am new to UNIX and FreeBSD. I just started the first month of a three month course on UNIX Programming. I am enjoying the class and look forward to learning more about this OS. My question is this... I don't like using pwd to determine where I am everytime I go to use a command. Is there a way of changing the prompt so I don't have to use the pwd all the time? NOTE: The server that I am using for my class is my own hard drive. We reformat the drives and install UNIX on a daily bases. Therefore, if I mess up on the commands and instructions you give me, I can always install and try again. Thank you for your help, Jef Sullivan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message