Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you're using an xterm-based (gui) application, then it probably depends on the settings of that program. I use konsole, for example, and it has a setting for how much history you want.
In a pure cli terminal I believe it depends on the buffer that's been hard-coded into the kernel video driver you're using, probably vesa. The only way to change that is to recompile your kernel.
There is however a program called screen which provides multiple virtual terminals in cli mode, and I'm pretty sure you can adjust the scrollback buffer there, just like you can with gui consoles.
thanks a super ton for a quick response,
i mean while using command in virtual console,we can see the history of command we used using page-up,down keys
is there any setting to limit those list,like i can only see the last used 10 or 20command not more than that?
Ah, so you mean the command history, and not the scrollback. In the future, if you aren't sure about the terminology, you should take more care to make it clear what you are referring to.
In bash, the command history size is controlled by the environmental variables HISTSIZE and HISTFILESIZE. Other shells probably have similar settings.
There are other useful settings as well, such as HISTCONTROL, where you can set options such as ignoring duplicate entries. The man page for bash will tell you more about them.
BTW, <20 commands is incredibly small. My bash man page says the default is 500 lines. Strange.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.