Terminal history

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Louis
Level 1
Level 1
Posts: 22
Joined: Wed Dec 20, 2006 5:29 pm
Location: Denmark
Contact:

Terminal history

Post by Louis »

Hi
I use Linux Mint 7 Main Edition x86 on my Eee S101 and I have a problem.
If I open a Terminal the history is empty. Is the a special Mint-feature and how do I fix that, so I can see my previous history and use !cat commands?

Regards Louis
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
miket

Re: Terminal history

Post by miket »

Hi !

Add the following to the end of /etc/bash.bashrc :

Code: Select all

set -o vi
Then log out and login in again to get the new setting.
You can now use vi commands on the command line to scroll back and forth through your last used commands.

ESC k to go back one command, hit k over and over to go back one more command each time
ESC j to move forward through the command history
ESC /part-of-command to search the history for a particular command, for example ESC /ls will search for all command you have used that start with ls

A full command set for vi can be found here :

http://www.cs.rit.edu/~cslab/vi.html

MikeT.
Louis wrote:Hi
I use Linux Mint 7 Main Edition x86 on my Eee S101 and I have a problem.
If I open a Terminal the history is empty. Is the a special Mint-feature and how do I fix that, so I can see my previous history and use !cat commands?

Regards Louis
Louis
Level 1
Level 1
Posts: 22
Joined: Wed Dec 20, 2006 5:29 pm
Location: Denmark
Contact:

Re: Terminal history

Post by Louis »

Isn't is possible just use the "history" command and arrow up and down keys like I do at other distributions?
Louis
Level 1
Level 1
Posts: 22
Joined: Wed Dec 20, 2006 5:29 pm
Location: Denmark
Contact:

Re: Terminal history

Post by Louis »

Fixed it. Just renamed .bash_logout to .bash_logout_old and then the terminal remembers my history.

In .bash_logout I can read that the reason why the history-feature has been disabled, is to increase the level of privacy.
Linux Mint is a distribution which mission is to be easy to use, and it's not easy to learn Linux when your terminal history gets deleted every time you close the terminal. At that way you can't run commands like "history" and "!cat", and the user gets frustrated when he/she followed a guide for Ubuntu or general Linux that doesn't works with Linux Mint.

Sure privacy is an important thing, but I will mean that Linux Mint is secure enough with password protection an so on.
If you want extreme privacy you should try distributions like http://www.polippix.org/. Linux Mint is an easy to use distribution and therefore I'll recommend the Mint team to disable the history-feature ;)
Locked

Return to “Other topics”