On Wed, Jun 18, 2014 at 8:51 AM, Greg Troxel <[email protected]> wrote: > > "Rocky Hotas" <[email protected]> writes: > >> I am quite new with this mailing-list. > > I've redirected followups to netbsd-users. tech-userlevel is for > arguing about complicated bugs or proposed changes ;-) > >> During the installation of NetBSD, I choose /bin/sh as the default root and >> user shell. >> In the users' home directories there are not files like .sh_history or >> similar and no "history-like" files are updated when I log in or log >> out. But I would like to keep trace of all the commands typed in the >> terminal, the last 100 or 1000, and not only the ones typed in the >> current login session, accessible with the up arrow. >> Reading the sh manual I didn't find the possibility to create a permanent >> file with history like in bash or ksh. >> Is it true or there exist some possibility to do this? Or where I can look >> for this option? > > There's no reason you have to use /bin/sh for users. You can install > bash from pkgsrc, and set the user's shell to /usr/pkg/bin/bash. Many > people do this (or some other shell in pkgsrc). I suggest keeping root > as /bin/sh for avoiding problems, but best practice is to use the actual > root account sparingly anyway. (sudo -E will give you a uid 0 version > of your own shell, sourcing dotfiles.) > > /bin/sh in NetBSD is intentionally minimalist: > > text data bss dec hex filename > 116229 1268 5832 123329 1e1c1 /bin/sh > > text data bss dec hex filename > 817301 18820 12272 848393 cf209 /usr/pkg/bin/bash > > (Of course, one has to look at libraries, too, but in general our sh has > a lot less UI complexity.)
ksh will have all of the features you want and is installed in base.
