[-- Attachment #1.1: Type: text/plain, Size: 262 bytes --] Hello, Every time I use up and down arrow keys to get previously issued command, I get garbage "l^&($" I edited .bashrc in /root and added HISTFILE=$HOME/.bash_history HISTFILESIZE=500 HISTSIZE=500 but it failed. How do I enable .bash_history in Void Linux? [-- Attachment #1.2: Type: text/html, Size: 1235 bytes --]
[-- Attachment #1.1: Type: text/plain, Size: 406 bytes --] I forgot to mention but I also added set -o history On Friday, October 30, 2015 at 11:03:34 AM UTC-7, tuxracer wrote: > > Hello, > > Every time I use up and down arrow keys to get previously issued command, > I get garbage "l^&($" I edited .bashrc in /root and added > > HISTFILE=$HOME/.bash_history > HISTFILESIZE=500 > HISTSIZE=500 > > but it failed. How do I enable .bash_history in Void Linux? > [-- Attachment #1.2: Type: text/html, Size: 1685 bytes --]
[-- Attachment #1.1: Type: text/plain, Size: 415 bytes --] Have you set the default shell for root to bash or is it still dash? Am Freitag, 30. Oktober 2015 19:03:34 UTC+1 schrieb tuxracer: > > Hello, > > Every time I use up and down arrow keys to get previously issued command, > I get garbage "l^&($" I edited .bashrc in /root and added > > HISTFILE=$HOME/.bash_history > HISTFILESIZE=500 > HISTSIZE=500 > > but it failed. How do I enable .bash_history in Void Linux? > [-- Attachment #1.2: Type: text/html, Size: 1126 bytes --]
[-- Attachment #1.1: Type: text/plain, Size: 632 bytes --] No I don't think so, I think it is still in dash mode. How do I switch root shell type? What file to edit? Thanks for the hint. On Friday, October 30, 2015 at 11:29:12 AM UTC-7, Duncaen wrote: > > Have you set the default shell for root to bash or is it still dash? > > Am Freitag, 30. Oktober 2015 19:03:34 UTC+1 schrieb tuxracer: >> >> Hello, >> >> Every time I use up and down arrow keys to get previously issued command, >> I get garbage "l^&($" I edited .bashrc in /root and added >> >> HISTFILE=$HOME/.bash_history >> HISTFILESIZE=500 >> HISTSIZE=500 >> >> but it failed. How do I enable .bash_history in Void Linux? >> > [-- Attachment #1.2: Type: text/html, Size: 1485 bytes --]
[-- Attachment #1.1: Type: text/plain, Size: 414 bytes --] You can edit /etc/passwd and change roots default shell from /bin/sh to /bin/bash if you want to make the change permanent. For a one-time change you can always just switch the shell by running "exec bash". I personally prefer the second option because that way shell scripts run as root will run under dash which is more restricted by simply having fewer features than bash and thus is somewhat more secure. [-- Attachment #1.2: Type: text/html, Size: 464 bytes --]
Stefan Mühlinghaus <master...@googlemail.com> writes: > You can edit /etc/passwd and change roots default shell from /bin/sh to > /bin/bash if you want to make the change permanent. For a one-time change > you can always just switch the shell by running "exec bash". Just use chsh(1). > I personally prefer the second option because that way shell scripts run as > root will run under dash which is more restricted by simply having fewer > features than bash and thus is somewhat more secure. This is not true, since almost all shell scripts have a shebang line of #!/bin/sh (or #!/bin/bash) which is unrelated to the set shell. (It would indeed make a difference when no shebang is used.) -- Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org