David Christensen dpchrist at
Mon Jun 29 22:42:20 UTC 2020

On 2020-06-29 14:51, Donald Wilde wrote:
> On 6/29/20, Brandon helsley <brandon.helsley at> wrote:
>> There has been a difference in the hash sign of the command line. When I'm
>> logged in as user it is $. When I am logged in as root it is #, even when I
>> do not execute a shell. Usually it was root at machine17#. How do I change it
>> back? I have to do pwd instead of just knowing what directory I am in.
> The shell used for the root user is different than the shell used for
> a regular user, csh is leaner but also meaner than sh in many ways.
> Do some research: man csh.
> You can also get more examples on the web; google 'freebsd csh set prompt'.
> In order to modify your prompt, you need to alter the variable PS1 in
> your .cshrc (C-shell startup file, note the starting '.') in your
> /root directory. For your regular prompt, look in the .profile file in
> /home/myuser.
> I will warn you up front: the two shells are quite different. Save a
> backup of each of these files before you alter them. If your computer
> dumps you into shell mode without booting, having a .profile in /root
> is also a good idea. From the emergency shell you can 'source
> /home/myuser/.profile'


Another option is to set the shell program for 'toor' to whatever is 
desired, and then use that account for system administration tasks:

2020-06-29 15:38:09 toor at f3 ~/
# head -n 4 /etc/passwd | tail -n 2
root:*:0:0:Charlie &:/root:/bin/csh
toor:*:0:0:Bourne-again Superuser:/root:/usr/local/bin/bash

Note that this implies you enable logins for 'toor' and install bash(1).

(I would not change the shell for root, as this could break your system.)


More information about the freebsd-questions mailing list