From owner-freebsd-questions Thu Feb 21 10:43: 7 2002 Delivered-To: freebsd-questions@freebsd.org Received: from PHSEXCHICO.MGH.HARVARD.EDU (phsexchico.mgh.harvard.edu [132.183.126.50]) by hub.freebsd.org (Postfix) with ESMTP id 77F5737B400 for ; Thu, 21 Feb 2002 10:43:01 -0800 (PST) Received: by phsexchico.mgh.harvard.edu with Internet Mail Service (5.5.2650.21) id <153VQ4MV>; Thu, 21 Feb 2002 13:42:59 -0500 Message-ID: <375F68784081D511908A00508BE3BB17DDDBBB@phsexch22.mgh.harvard.edu> From: "Morse, Richard E." To: 'DragonRyder' , freebsd-questions@FreeBSD.ORG Subject: RE: Prompt Help Date: Thu, 21 Feb 2002 13:42:59 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) 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 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