I'm kind of used to linux. I'm using Busybox from the Busybox Free installer, with Busybox 1.21.0-Stericson. Trying to chance my shell to the Busybox shell using busybox ash gives the following error after every single command:

ash: precmd: not found
echo $PS1
$(precmd)$USER@$HOSTNAME:${PWD: -?} $ 

I tried to go back to the normal shell and find out WHERE precmd is:

which precmd

It just changes the prompt to have "1|" in front of it, without giving me WHERE it is. I found a solution here, but have no idea where to put it. I'm basically trying to do the same as this question (make Busybox shell the default).


1 Answer 1


If you are using Connectbot: according to an article at XDA-Developers, this is nothing but a cosmetical error:

Connectbot seems to set shell variable 'PS1' to "$(precmd)$USER@$HOSTNAME:${PWD:-?} $ ".
It means your shell (the busybox's ash applet) will try to use output from 'precmd' as a part of a command prompt. So when 'precmd' was not provided, error messages will be generated wenever a prompt was to be shown.

To fix this, mentioned post says you can use PS1="> " (or simply unset PS1) to work around that error.

  • Looking for further references, I found you already cross-posted this to stackoverflow and got an answer there. It would have been fair to update your question here accordingly, as you obviously got a solution there (the same, it seems) which solved your issue.
    – Izzy
    Mar 15, 2013 at 16:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .