# Hopefully a very simple question re Bourne shell



## nikosniko (Feb 18, 2011)

I'm administering a FreeBSD server and added an account I will use for testing scripts.  I chose the Bourne shell as the default shell to use, and I login using ssh from a macOSX terminal window.

When I login, there usually are some default shell script files that get executed by the system, and that's where I usually set my custom aliases for commands, modify my path and other environmental variables.  

The default account contained some files such as ".login", ".rshrc", ".cshrc", ".rshrc" and some others, but these apparently are not run at login, and some other shell script seems to run even after I edit and run one of these files on the command line (e.g. I add "alias ls='ls -F'" and it works inside the script, but not outside of it).

I wanted to first know what is being run when I log onto my user account on the FreeBSD server, where these 'template scripts' are located (/etc/?), and force the system to use my own personal shell scripts at login.

This might be a more general unix admin question; I'm not sure.  I mostly do scripting to schedule and control personal applications I write, and have usually have the central unix admin person tell me which files to fiddle with for personal paths, env vars, aliases, etc.


----------



## aragon (Feb 18, 2011)

sh(1)

Read paragraph "Invocation".


----------



## rambetter (Feb 18, 2011)

If your login shell is /bin/sh, the file you most likely want to pay attention to is ~/.shrc.  I _believe_ this gets created by default on FreeBSD systems when an account is created (it's a skeleton file).


----------



## nikosniko (Feb 26, 2011)

The explanation from the sh(1)) man page under "invocation" was exactly what I needed.


----------

