Commands not found.

First of all I want to say sorry for not where to ask this question.

The commands do not work on my FreeBSD, ie for example: pkg_add-r fluxbox
He says the console:
Code:
pkg_add: command not found

Code:
pw show Greep wheel:
  command not found: pw

And so with many other commands you need. :\
 
Some commands to help you debug:

# which pkg_add
% echo $PATH

most likely your path needs to be set correctly. Also you need to be root to use that command.

look at /etc/group to see if your in wheel.
 
  • Thanks
Reactions: lin
Code:
# which pkg_add
pkg_add not found

Code:
# echo $PATH
/usr/local/lib/cw:/bin:/usr/bin:/usr/local/bin


I get that but not if it's okay.
 
By default $PATH is set to
Code:
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/[B]username[/B]/bin
 
  • Thanks
Reactions: lin
killasmurf86 said:
By default $PATH is set to
Code:
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/[B]username[/B]/bin

If it works. I use zsh and me .zshrc I have:
Code:
export PATH="/usr/local/lib/cw:$PATH"

I use it for cw (color wrapper) to color the output of the commands.
Also add the path by default:
Code:
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/lin/bin:$PATH"
Wrapper Color but no longer works.
 
EDIT:
Change the order of the path and it works pkg_add and other commands.

Solved ;)
 
I'm a dumbass I actually didn't realize that which()(1) depended on $PATH.

lin you could use $HOME/.bin (or without the dot) instead of home/lin/bin
It will be more portable if you ever reuse it under a different user.

btw zsh is a great shell. I use it myself.
 
Back
Top