Shell

Polytropon freebsd at edvax.de
Tue Jun 30 15:28:24 UTC 2020


On Tue, 30 Jun 2020 15:10:16 +0000 (UTC), davidson at freevolt.org wrote:
> When logged in as that user, you can see what default shell they have
> like so:
> 
>   $ finger `whoami`
>   Login: poe            Name: little red riding hood
>   Directory: /home/poe  Shell: /bin/sh
>   [...]                 ^^^^^  ^^^^^^^
> 
> If the shell is /bin/sh, then the configuration file for that user's
> shell is in ~/.shrc. You might be able to set the prompt to something
> more helpful by uncommenting some lines in that file.
> 
> Uncomment these lines, for example:
> 
>   $ cat ~/.shrc
>   [...]
>   # # set prompt; ``username at hostname$ ''
>   # PS1="`whoami`@`hostname | sed 's/\..*//'`"
>   # case `id -u` in
>   # 	 0) PS1="${PS1}# ";;
>   #       *) PS1="${PS1}$ ";;
>   # esac

The following entry resembles the standard UNIX prompts as
seen in the default configuration (for the C shell):

	PS1="`whoami`@`hostname | sed 's/\..*//'`:`pwd`\$ "

The only exception is that the home directory is not
abbreviated as ~.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list