How do I add a location to my path in Unix?
Aha, FreeBSD. That's tcsh, I believe.
So:
set path=(/sbin $path)
bash & zsh syntax:
export PATH=${PATH}:/sbin
sh syntax (two separate commands):
PATH=${PATH}:/sbin
export PATH
csh and tcsh:
setenv PATH "${PATH}:/sbin"
set path=($path /sbin)
This will append /sbin
to your path, so when you type abc
, the shell will also look in /sbin
for it. You can also add the command to your ~/.bashrc
file (or ~/.cshrc
, ~/.tcshrc
, ~/.profile
, ~/.login
—depending on which shell you use).