Void Linux discussion
 help / color / mirror / Atom feed
* how to enable .bash_history in Voidlinux
@ 2015-10-30 18:03 tuxracer
  2015-10-30 18:11 ` tuxracer
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: tuxracer @ 2015-10-30 18:03 UTC (permalink / raw)
  To: voidlinux


[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to enable .bash_history in Voidlinux
  2015-10-30 18:03 how to enable .bash_history in Voidlinux tuxracer
@ 2015-10-30 18:11 ` tuxracer
  2015-10-30 18:29 ` Duncaen
  2015-11-01 22:39 ` Stefan Mühlinghaus
  2 siblings, 0 replies; 6+ messages in thread
From: tuxracer @ 2015-10-30 18:11 UTC (permalink / raw)
  To: voidlinux


[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to enable .bash_history in Voidlinux
  2015-10-30 18:03 how to enable .bash_history in Voidlinux tuxracer
  2015-10-30 18:11 ` tuxracer
@ 2015-10-30 18:29 ` Duncaen
  2015-11-01 14:34   ` tuxracer
  2015-11-01 22:39 ` Stefan Mühlinghaus
  2 siblings, 1 reply; 6+ messages in thread
From: Duncaen @ 2015-10-30 18:29 UTC (permalink / raw)
  To: voidlinux


[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to enable .bash_history in Voidlinux
  2015-10-30 18:29 ` Duncaen
@ 2015-11-01 14:34   ` tuxracer
  0 siblings, 0 replies; 6+ messages in thread
From: tuxracer @ 2015-11-01 14:34 UTC (permalink / raw)
  To: voidlinux


[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to enable .bash_history in Voidlinux
  2015-10-30 18:03 how to enable .bash_history in Voidlinux tuxracer
  2015-10-30 18:11 ` tuxracer
  2015-10-30 18:29 ` Duncaen
@ 2015-11-01 22:39 ` Stefan Mühlinghaus
  2015-11-02 11:14   ` Christian Neukirchen
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Mühlinghaus @ 2015-11-01 22:39 UTC (permalink / raw)
  To: voidlinux


[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to enable .bash_history in Voidlinux
  2015-11-01 22:39 ` Stefan Mühlinghaus
@ 2015-11-02 11:14   ` Christian Neukirchen
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Neukirchen @ 2015-11-02 11:14 UTC (permalink / raw)
  To: Stefan Mühlinghaus; +Cc: voidlinux

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-02 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-30 18:03 how to enable .bash_history in Voidlinux tuxracer
2015-10-30 18:11 ` tuxracer
2015-10-30 18:29 ` Duncaen
2015-11-01 14:34   ` tuxracer
2015-11-01 22:39 ` Stefan Mühlinghaus
2015-11-02 11:14   ` Christian Neukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).