Shell
Manish Jain
bourne.identity at hotmail.com
Tue Jun 30 09:31:09 UTC 2020
On 2020-06-30 14:44, Manish Jain wrote:
>
>
> On 2020-06-30 02:44, Brandon helsley 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.
>
> Hi Brandon/others,
>
> It is often unnoticed that FreeBSD has a mirror of the root user
> appropriately named toor (whose shell can be anything).
>
> The better thing to do is :
>
> 1) Install bash and poshinit: pkg install bash poshinit
> 2) Modify the shell for the user toor: chsh -s /usr/local/bin/bash
> 3) Set the password for toor: passwd toor
> 4) Logout and login as toor, and run the command poshinit
>
> poshinit will :
>
> 1) automatically adjust your bash prompt to the current directory
>
> 2) create a portable shell environment (stored under $HOME/.shell/) that
> you can reuse across Bash/Zsh under any OS: FreeBSD/Linux/Cygwin
>
> If you do not want to use poshinit, you can yourself put the following
> into your .bashrc:
>
> export PS1='`pwd` # '
>
>
> Hope this helps,
> Manish Jain
Typo :
"chsh -s /usr/local/bin/bash" -> "chsh -s /usr/local/bin/bash toor"
More information about the freebsd-questions
mailing list