OpenVZ Forum


Home » General » Support » No bash history in VE
No bash history in VE [message #8784] Wed, 06 December 2006 09:43 Go to next message
ataraxis is currently offline  ataraxis
Messages: 19
Registered: August 2006
Junior Member
Hi,

When I enter a machine with vzctl enter <NAME>, not all environment variables are set.
I have read that OpenVZ devs see vzctl enter as last ressort to enter a machine, but I would still like to use it as a normal way.

For example:
HISTFILE=/dev/null

after a su - :
HISTFILE=/root/.bash_history

What does su - do?
Disadvantage of su is, that I have to type exit twice.

Any ideas?

Ataraxis


Re: No bash history in VE [message #8786 is a reply to message #8784] Wed, 06 December 2006 10:00 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
Use ssh instead? Rolling Eyes

http://static.openvz.org/openvz_userbar_en.gif
Re: No bash history in VE [message #8790 is a reply to message #8784] Wed, 06 December 2006 10:27 Go to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
The problem is that vzctl set HISTFILE variable to /dev/null (why?), so I use the following trick to get history work in VE after vzctl enter:

I add the line
HISTFILE=~/.bash_history

to file /root/.bashrc

HTH,
Vasily.
Previous Topic: ERROR: Core::SplitDevPath: Cannot get device for
Next Topic: *SOLVED* nmap: Failed to find interface venet0 mentioned in /proc/net/route
Goto Forum:
  


Current Time: Sat Aug 02 04:35:49 GMT 2025

Total time taken to generate the page: 0.77513 seconds