reuse terminal commands and parameters of commands
In linux terminal you don't have to type each command and its parameters letter by letter.


When you want to reuse the command that you used before you can press ctrl+r and type the part of that command. For example a few days ago you put


Now you can just press ctrl+r and type


The whole command should appear. If not press ctrl+r repeatedly.

Esc and . (Esc and dot)

You can also reuse the parameter part of the last command by pressing Esc and dot. (Not simultaneously)

Both tricks are very useful.
We can repeat the commands by pressing the up-arrow, how is this different than up-arrow?
Spoiler: show
Thanks Hostigation for VPS 18, and FreeVPS for being an awesome community!
Thanks NoUptime (@NoUptime) for the VPS!

I second @Jayce 's question.

I find the up arrow more convenient than the ctrl+r on a computer or on mobile
[Image: img.php?userid=19870&txt=1]
Thanks to  for VPS 14
A huge shoutout to @NoUptime for the steller cPanel Hosting
Follow my blog
View me on IRC @SlashNET
You can also Buy me coffee
Up and down arrows allow you to scroll through your command history to use commands you used before again. This guide is about a reverse search function in the command history that allows to find specific commands you want to use again instead of pressing the up arrow hundreds of times.
Using ctrl+r instead of up arrow may be quicker sometimes. Imagine you want to restart apache webserver. You remember that you restarted it two or three days ago. So you can use ctrl+r rest then and get it quickly.  In the case of pressing up arrow you would have to press it hundreds of times.

Of course knowing up arrow functionality is very helpful too.

Users browsing this thread: 1 Guest(s)

Switch to mobile version

Sponsors: Ftpit - ZXPlay - GalaxyHostPlus - Verelox- HostUS - HostMada - Host4Fun - Evolution-Host - NodeBlade - HostDare - VPSMost

BitCoin donations: 1DQxbstaTb5SWk6QC2gFeQUTFR64JX4cEo