Most (all?) Bourne Shell based shells (*sh shells) use a configuration file which is run every time a new terminal is opened. These (tend to|all) end with rc
. rc
stands for run commands.
These configuration files are good for using for local (for one user) CLI changes such as adding custom commands or variables.
Information on locating your configuration file can be found here. As a general rule they (tend to) be found at ~/.SHELLrc
where SHELL
is the name of your shell.
If the configuration file appears to be missing:
.
at the start of the file name indicates that it is a hidden file.ls -a
to see all files in a directory.~/.bashrc
.~/.cshrc
.~/.kshrc
.~/.zshrc
.Create your file at the correct location.
Add #!bin/sh
to the first line. Alternatively, you could just put a single colon (:
) instead however the first method is preffered.
If this returns errors later when run you can check the location of sh
using which sh
.