.cshrc usage

Polytropon freebsd at edvax.de
Mon Jun 14 16:15:32 UTC 2010

On Mon, 14 Jun 2010 18:23:52 +0800, Aiza <aiza21 at comclark.com> wrote:
> I want to change the console prompt for all users that get accounts 
> created. I added it to /etc/csh.cshrc which says it a system-wide .cshrc 
> file. But after adding a new user with pw command with -m and logging in 
> as the user name the prompt is still the old way. Do I have to add it to
> /usr/share/skel/dot.cshrc to get the change to take effect?

Check the users' ~/.cshrc to see if they override those settings.
I also have some standard settings for all users in /etc/csh.cshrc,
and users' ~/.cshrc are usually empty (unless they add their own
settings or override mine).

	if ($?prompt) then
		set promptchars = "%#"
		set prompt = "%n@%m:%~%# "
		set autolist
#		... more stuff here ...

This is an example on how to properly implement the standard prompt
(username, hostname, current directory with home substitution, and
permission indicator).

The /usr/share/skel directory contains files that are copied to a
user's directory when an account is created. This means: See what's
in those files. If they override your global settings, change them.
If an account has already been created, check the user's files.

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

More information about the freebsd-questions mailing list