Date: Tue, 30 Jun 2020 14:46:47 +0530 From: Manish Jain <bourne.identity@hotmail.com> To: Brandon helsley <brandon.helsley@hotmail.com>, freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Shell Message-ID: <DB8PR06MB644250DD9435C290F90C735BF66F0@DB8PR06MB6442.eurprd06.prod.outlook.com> In-Reply-To: <b8ba64b6-10d2-ff52-758e-4b21eb5a1c27@hotmail.com> References: <> <CY4PR19MB010400AC4940C67421BFADE8F96E0@CY4PR19MB0104.namprd19.prod.outlook.com> <b8ba64b6-10d2-ff52-758e-4b21eb5a1c27@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DB8PR06MB644250DD9435C290F90C735BF66F0>