Terminal energy customers already know log of all of the instructions you execute are stored in
historical past. (Go forward, kind
historical past to see them.) Last week we noticed you could sudo your previous command utilizing the !! (bang-bang) notation. Well, you may also search your command historical past as you kind utilizing the very helpful Ctrl+R key mixture.
Give it a strive: within the terminal, maintain down Ctrl and press R to invoke “reverse-i-search.” Type a letter – like s – and you will get a match for the newest command in your historical past that begins with s. Keep typing to slim your match. When you hit the jackpot, press Enter to execute the instructed command.
!characters will execute the final command that matches the desired characters. (So
!ssh will run the final
ssh you used.)
Of course good historical past search solely works in the event you’ve obtained an extended historical past. To prolong the size of the historical past listing in your terminal, add the next traces to your
Once you have obtained your historical past constructed up, you need to use this command to see what gadgets you kind within the terminal probably the most. (Great solution to resolve what aliases you might want to arrange.) What are your favourite terminal historical past methods? Let us know within the feedback. Thanks, Tom!
What’s in your bash History? [ONLamp]