Shell
Brandon helsley
brandon.helsley at hotmail.com
Mon Jun 29 22:36:01 UTC 2020
>
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.
>
.cshrc I found in the usr directory with .profile. I don't want to change the prompt for the usr, just for the csh shell for root. How do I do this if my .cshrc file is in usr directory?
>
> On Jun 29, 2020 at 3:51 PM, Donald Wilde <dwilde1 at gmail.com> wrote:
>
>
> On 6/29/20, Brandon helsley <brandon.helsley at hotmail.com> 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 com
puter 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' -- Don Wilde **************************************************** * What is the Internet of Things but a system * * of systems including humans? * ****************************************************
>
More information about the freebsd-questions
mailing list